guide·intermediate·updated 2026-05-19·~25 min read

An AI-assisted full-stack workflow that doesn't get messy

How to plan, prompt, and ship a full-stack app with AI coding tools without ending up with hallucinated code and brittle architecture. Stack, rules, PRD, vertical slices, and the exact prompts.

AINext.jsWorkflowArchitecture
you'll need
  • Cursor, Claude Code, or another AI coding tool
  • A stack you're willing to commit to for the whole project
  • 30 minutes of quiet to plan before you generate anything
you'll end up with

A foundation that survives AI assistance: a fixed stack, a `.cursor/rules` directory, a real PRD, and a vertical-slice plan you can hand to the agent one slice at a time.

Most AI-assisted projects don't fail because the model is bad. They fail because the architecture is fuzzy, the rules aren't written down, prompts are too big, and nobody is documenting what shipped. This guide is the workflow we use to keep that from happening.

§Before you start

AI coding tools work best when the architecture is clear, the rules are structured, the prompts are focused, and the development is iterative. They fail when you ask them to do everything at once.

  • Build feature-by-feature.
  • Use vertical slices (DB → API → UI in one go).
  • Maintain strict project rules.
  • Document continuously — even one line per slice.
  • Keep prompts focused on a single outcome.

§Recommended stacks

Pick one stable stack and stay consistent. The exact choice matters less than the discipline of not switching mid-build.

Frontend

Backend

Database

Auth

AI coding tools

UI-first / prototyping tools

Boilerplates

§Step 1 — Lock the foundation

Before generating any code, write down the stack, the database, the auth provider, the UI library, and the folder structure. Pin them.

Frontend:  Next.js + Tailwind + shadcn/ui
Backend:   FastAPI
Database:  PostgreSQL
Auth:      Clerk

§Step 2 — Write AI rules

AI coding tools need explicit project rules or your code quality drifts, the folder structure goes feral, and APIs become inconsistent. Drop a .cursor/rules/ folder at the repo root and seed it with files for naming, styling, APIs, project context, error handling, database, and auth.

mkdir -p .cursor/rules
touch .cursor/rules/{naming,styling,api-conventions,project-context,error-patterns,database-rules,auth-rules}.mdc

Example rule files

.cursor/rules/naming.mdc
text
- Use PascalCase for components
- Use camelCase for variables
- Use kebab-case for folders
- Use descriptive filenames
.cursor/rules/api-conventions.mdc
text
- Always use async/await
- Validate all inputs (Zod)
- Never trust frontend data
- Use consistent API response shapes

§Step 3 — Generate a PRD

The PRD becomes the source of truth for developers, AI tools, architecture, and feature planning. A good PRD prevents the AI from inventing.

  • User roles
  • Complete user flows
  • Entities + permissions
  • Validations + error states
  • Edge cases
  • UI behavior + API behavior
  • Admin functionality
  • Mobile behavior
  • Integrations

§Step 4 — Vertical slice plan

Never build the whole app at once. Each slice goes Database → Backend logic → API → Frontend UI → Validation → Testing. Start with auth, then core CRUD, then advanced workflows.

1. Authentication
2. User Profile CRUD
3. Dashboard
4. Payments
5. Notifications
6. Admin Panel

Shipped it but want a second pair of eyes on your copy, DNS, or email deliverability? bitroot.club does a $0 launch review for anyone who followed this guide. →