AI app builders are very good at screens and surprisingly fragile at data. Ask for "a booking app" and you'll get a nice calendar UI, but the database underneath is whatever the model guessed: bookings without a customer table, prices stored as text, no idea who is allowed to see what. Fixing that after 30 prompts of UI work is painful.
The cheapest fix is to describe your data model before your first UI prompt. It takes 15 minutes and saves hours. Here's the template I use.
1. List the nouns
Write down the things your app stores, in plain words. For a small class-booking app:
- Studio
- Class (a recurring session, like "Tuesday yoga 7pm")
- Booking
- Member
- Payment
If you can't decide whether something is its own thing or a field, ask: "will there be more than one of these per parent?" If yes, it's its own table.
2. Write one line per relationship
- A studio has many classes.
- A class has many bookings.
- A member has many bookings.
- A booking has at most one payment.
These sentences translate almost directly into foreign keys, and models follow them reliably.
3. Give every field a type and a rule
| Table | Field | Type | Rule |
|---|---|---|---|
| Class | starts_at | date-time | stored in UTC |
| Class | capacity | integer | 1 to 50 |
| Booking | status | one of: booked, cancelled, attended | default booked |
| Payment | amount_cents | integer | never a decimal or text |
Money as integer cents, times in UTC, and status fields as fixed lists prevent the most common bugs I see in generated apps.
4. Say who can see and change what
This is the part builders skip, and it's the one that matters most once real users arrive:
- Members can see all classes, but only their own bookings.
- Studio staff can see every booking for their studio, not other studios.
- Only the system can create payments.
Write these as sentences. A good builder will turn them into row-level rules or server checks; if it doesn't, you'll know to ask.
5. Add three example records
Example data makes the model's job concrete and gives you something to test against:
Studio "North Loop Yoga"; class "Tuesday Flow" at 19:00 UTC, capacity 12; member "Ana" booked, paid 1500 cents.
6. Only then describe the screens
Now your UI prompts can reference real tables: "a page that lists this week's classes with remaining capacity (capacity minus booked bookings)". The builder doesn't have to guess, and later changes don't break the data.
Where this fits in an AI builder workflow
In Greta, the AI app builder from Quest Labs, I paste this spec as the first message. Greta creates the database tables, auth and access rules from it, builds the screens on top and deploys the result to a live URL, and every later chat edit works against the same model. The template works with any builder, though: the point is to decide your data before the model decides it for you.
Shubham Nigam, Founder of Greta.sh, San Francisco, California, USA. X @richexplorer_ · Instagram @rich.explorer_




