How to build a polished web app prototype for demo day
Demo day needs an app that looks finished, signs people in, and does not break when the judges click twice. Here is a real run: a study-room booking app built by the awx agent, with a link and screenshots for the slides.
The request
We made a new Small computer called demo-day-app and sent this in its Chat tab:
Build a polished web app prototype for our demo day: StudyRoom, a booking app for our faculty's study rooms. People sign in (make a demo account [email protected] with the password demo1234, and store passwords hashed). After signing in they see 4 rooms with their capacity, pick a date and a time slot, book a room, and see and cancel their own bookings. Two people must not be able to book the same room at the same time. Use Python with Flask and SQLite, and make it look clean and professional on a laptop and on a phone. Add a few sample bookings so it does not look empty. Run it on port 8000 so it keeps running and comes back if the computer restarts, and give me a public link. Then open it in Chrome on the desktop so I can see it.
The parts that make a prototype look finished are all in the request: a demo account, sample data so it is not empty, a rule against double bookings, “clean and professional on a laptop and on a phone”, and “keeps running”.
What the agent did
It checked what was on the computer, installed Flask in a virtual environment (a private folder of Python packages), then wrote the app file by file: the server code, four page templates and a style sheet. Then it tested the sign-in and the booking rules, made the public link and opened the app in Chrome. In all it took 10 steps and about two and a half minutes, with two approvals from us along the way: a test command that deleted two of its own temporary files, and making the app public.
What the agent built
- Sign-in with the demo account, passwords stored as scrypt hashes, and a form token against forged requests. The sign-in page shows the demo account so visitors can try it.
- Four rooms, Newton (4 seats), Curie (6), Turing (8) and Lovelace (12), with one-hour slots from 08:00 to 19:00 and dates up to 30 days ahead. Free, taken and your own slots have different colours.
- My bookings, with a Cancel button that asks first, and only for your own bookings.
- No double bookings, enforced by the database. The agent tested it by sending 8 bookings for the same room and time at once: “Exactly one succeeded and the other 7 got a ‘just booked, pick another time’ message.” Then it removed its test booking.
- Sample data: two other demo people with 8 bookings today and tomorrow.
- Stays running under supervisor with gunicorn, a production-grade Python web server, so it comes back if it crashes or the computer restarts. It said plainly that it had not tested a real restart.
The code is in ~/studyroom: app.py, four templates and a style sheet. Open it on the Files tab and read it before you present it; the judges may ask how it works.
How it looks
Screenshots for your slides
The pictures above came from the agent too. We asked:
Great. For my demo-day slides, please take screenshots: sign in as the demo account and save, in ~/studyroom/shots/, a laptop-size picture (1280x800) of the rooms page, one of the My bookings page, and a phone-size picture (390x844) of the rooms page. Plain page pictures without the Chrome window around them. Tell me when they are saved.
It wrote a small script that signs in with a hidden Chrome and saves the page alone, ran it, and opened the three pictures to check them, in 6 steps and 42 seconds. It also left the script behind, take_shots.py, so you can take fresh pictures on the morning of demo day with one command. Download them from the Files tab.
Before demo day
- Set the time zone. The computer’s clock runs on UTC, eight hours behind Malaysia, so at 3pm our app still offered the 08:00 slot for today. Ask the agent: “Use Malaysia time (Asia/Kuala_Lumpur) for dates and slots.”
- Get a link that lasts. On the Free plan a public link lasts up to an hour. Give the app a permanent name such as
studyroom-demo.awanbox.com(RM1, once) on the Links and domains tab, and turn on Keep it running under Settings, Power for the day. How, step by step. Our run was on an admin account, which is why its link lasted 7 days. - Try it on your own phone, the night before, on mobile data.
- Remember it is public. Anyone with the link can sign in with the demo account. Use made-up data only.
- Know your code. A prototype an agent wrote is still yours to explain. Ask the agent to walk you through
app.py.
Common questions
Can the awx agent build a web app with a login?
Yes. In our run it built a Flask app with sign-in, passwords stored as scrypt hashes, a protection against form forgery, and a demo account, on a Small computer.
How do I stop two people booking the same slot?
Ask for it in plain words, as we did. The agent made the database refuse a second booking for the same room and time, then tested it by sending 8 requests at once: one booking was made and 7 were refused.
How long does a demo link last?
On the Free plan a public link lasts up to an hour. For demo day, give the app a permanent name such as yourteam.awanbox.com (RM1, once) and keep the computer running. Our run was on an admin account, which is why its link lasted 7 days.
Can I ask for changes after the first version?
Yes. Send another message in the same chat, such as adding a sign-up page or more rooms. The agent works on the same files on the same computer.
Cautions
- Running time uses credit on the Free plan: RM0.03 an hour for a Small computer. Stop computers you are not using.
- A public link is public. Share it only with the people who should see it, and use made-up data.
- Keep your own copy of your work.
awxis in early alpha.
Keep reading
- awanbox or Lovable: which one for your assignment?
- How to make a landing page for your club event today
- How to build a student portfolio at yourname.awanbox.com
- How to test your website in a real browser with AwanBox
Getting started
Sign in with your Google account and ask to join. Once you are approved, make a Small computer and send the agent your own version of the request above.
Awi, signing off.