In this tutorial, we discuss how to use Anvil to build a ticketing app entirely in Python, integrating mock ups into the drag-and-drop designer. Anvil makes it simple to build large-scale, shippable new products with Python. Let’s get started with how to design a Python Webapp using Anvil.
This article was originally published by Anvil.
The End Result
Here it is! A fully-featured ticketing system, built entirely in Anvil.
Below, I’ve outlined the process involved in building the ticketing system, from concept to final product.
Read on to learn how you can build your own business applications with Anvil.
The first step is to decide on the key requirements for your system:
Next, work through these requirements and decide on a list of screens that will satisfy each requirement.
I decided my ticketing system would need these screens:
- Ticket inbox
- Single ticket view
- Customers view
- Add a ticket view
Next, sketch up some simple wireframes for each of these screens, ready to send to your designers.
Here’s my wireframe for the ticket inbox:
3. Professional Design
Send your wireframes to a professional designer to provide mock ups of each of your screens.
Here’s the mock up for the wireframe above:
4. Build the UI
The next step is to build your UI.
Anvil makes it simple to integrate custom designs into an app built with the drag-and-drop designer. For a step-by-step example on customising the look and feel of your Anvil apps, see this post on hand-drawn web apps.
Here’s the final view of the ticket inbox:
Next, you’ll want to set up your database. Anvil’s Data Tables are a full database system built on top of PostgreSQL, with a nice GUI for creating, editing and deleting tables. This makes it simple to define your schema.
Getting my database set up took a matter of minutes:
6. Build the Application Logic With Python
Finally, the fun bit – writing the logic of your application with Python.
Wiring up the UI and components was great fun, and surprisingly simple – the backend of the ticketing system is less than 300 lines of Python.
Anvil makes building large-scale, powerful applications simple, straightforward and fast. It does this by automating of a lot of the things that make web development using traditional tools slow, and painful. It can power anything from small, simple web apps to large-scale, fully-featured business applications.
You can build your whole new product yourself, all your need is a little Python.
This ticketing system has all the features of a traditional “CRUD” app, is rather nice on the eyes (if I do say so myself..) and it’s very powerful. It’s backed by Postgres, email-driven, and has built-in user authentication. It’s powered by Python running in the browser, as well as on the server, meaning that it’s extremely customisable – clone it into your account, and have a play around for yourself.