← BACK TO THE BLOG/BUILD WITH AI

Database-First Development:Design Before You Prompt

Database-first development: spend two weeks designing entities, services, and user flows before AI writes any code — and save two months of refactoring.

CATEGORYBuild with AI
READ TIME5 min
PUBLISHEDJun 25, 2026
AUTHORLuis Goncalves
Database-First Development: Design Before You Prompt

Database-first development means designing your database before you write a single line of application code. The two weeks you spend designing the system before you build it will save you two months of refactoring during the build. That's not a hypothesis — it's a math problem that's been proven in every codebase I've ever seen, including my own.

The most important two weeks of building FIKR Space were the two weeks I spent designing the database schema before writing any application code. Most people nod at that sentence and then ignore it. This is the practical version: the three things "designing the architecture" actually means, and the build timeline that follows once you've done it.

Database-first development: why the temptation is the trap

You will be tempted, the moment you finish validation, to open Claude or Cursor and start building. You'll want the dopamine of code accumulating. You'll want to show your spouse a screenshot at the end of the weekend. Resist this.

Starting to code before the database is designed is the master mistake — every other building pitfall is downstream of it. You feel productive on day one because the AI is generating screens, but the foundation underneath them is fluid, and every week the foundation shifts, everything built on top of it has to be reworked. That accelerating rework loop is exactly how the vibe coding trap closes around people who felt unstoppable in week one.

Step 1: Design the database — on paper

List every entity in your product. Users. Companies. Subscriptions. Whatever the core nouns are. Then list the relationships: a user belongs to a company, a company has many users, a subscription belongs to a company and tracks usage.

Draw these on paper. Yes, paper. The act of drawing makes you think about edges you'd miss in a head-only design. When the boxes and arrows stop changing, you have a schema. Then describe the entities clearly to Claude, and it will write the actual SQL for you in twenty minutes. Now you have your foundation.

Step 2: Define the service boundaries

What are the major operations your system performs? Sign up. Process a payment. Generate a report. Send a notification. Each of these is a service — a self-contained piece of the system with a defined job. Define the inputs and outputs of each service before you write the service.

This sounds bureaucratic. It isn't. It's the difference between a system that can evolve and a system that calcifies after three months.

Step 3: Walk the user flows

Walk through the three most important things a user will do with your product: sign up, complete their first valuable action, renew their subscription. Sketch each flow as a sequence of screens or interactions — don't design the screens yet, just the sequence. You're hunting for the places where the flow breaks, or where you've assumed something that won't be true.

When the database, the services, and the flows all make sense on paper — and still make sense after you've looked at them with fresh eyes a day later — you have an architecture. Now you can build.

The bookThe Solopreneur RevolutionLuis Gonçalves on building a solopreneur business with AI while employed.Get the book →

The eight-week timeline that follows

Architecture-first isn't slower. It's what makes the fast part fast. Here's the schedule it unlocks, at four to eight hours per week of focused building:

WeeksPhaseWhat happens
1–2ArchitectureDatabase, services, flows. No application code — at most the schema, which Claude generates cleanly once you've designed it
3–6Core buildOne major feature per week: brief it, build it, validate it, ship it to staging
7PolishError states, loading states, the email template, the pricing page — the things every founder underestimates and every customer notices
8BetaShip to the five to ten people who paid in your presell; fix the most important three things they hit

By the end of week six, the product has its three or four core flows working: sign up, do the main thing, get billed, come back tomorrow and do it again. This is what one person can do in 2026 that ten people couldn't do in 2020 for any amount of money — and each of those weekly features starts with a written brief, not a hopeful prompt. That's the PRP method, and it only works because the architecture underneath it has stopped moving.

Don't let the AI be the architect

Claude is a brilliant implementer and a mediocre architect. Ask it "should this be a separate table or a JSON column?" and it'll give you an answer — usually fine, sometimes bad, occasionally great. The problem is you have no way to evaluate which case you're in unless you have your own architectural taste. Develop it deliberately: look at how other products structure their systems, work through the tradeoffs on paper, and write the architecture down before you ask Claude to implement it.

The architectural decisions are yours. The implementation decisions are Claude's. Keep that boundary and the codebase compounds in quality; blur it and the codebase decays.

If you're at this stage right now, here's the week: spend three evenings on entities and relationships. Draw the schema on paper. Refine it. Have Claude generate the SQL. Sanity-check it by walking your three most important user flows and seeing whether the schema supports them cleanly. Don't write application code yet. By Sunday night, you have a schema you're confident in and a list of the four to six core features you'll build over the next six weeks. Boring. Slow. Worth every hour.

12 weeksYour corporate career was never the planApply to the Solopreneur Accelerator.Apply now →

Frequently asked questions

What is database-first development?

Building the data model before any application code: list your product's entities and relationships, refine them on paper until they stop changing, and only then generate the schema and start building features. The database is the foundation — everything else is built on top of it, so it has to stop moving first.

How long should I spend on architecture before coding?

Two weeks — database, service boundaries, and user flows. Those two weeks save you two months of refactoring during the build, because features built on a stable foundation don't need to be reworked every time the foundation shifts.

Can AI design my database for me?

AI can write the schema — describe your entities clearly and Claude produces the SQL in twenty minutes. But it shouldn't make the design decisions. Claude is a brilliant implementer and a mediocre architect: the entities, the relationships, and the tradeoffs are your calls to make before you prompt.

I'm not technical — can I really design a schema?

Yes, because the hard part isn't technical. It's listing the nouns of your business — users, companies, subscriptions — and how they relate, which you know better than any developer. Boxes and arrows on paper. When they stop changing, the design is done and the AI handles the translation to SQL.

How trapped are you, really?

Take the Corporate Suffocation Index, the free solopreneur readiness assessment.

Start the assessment →