Concepts
File Structure
Start at the file that controls the behavior you want to change. Ask the agent to inspect it and nearby code before introducing another abstraction.
| Change | Start here |
|---|---|
| Landing page | app/page.tsx |
| Header/footer | components/header.tsx, components/footer.tsx |
| Theme and branding metadata | app/globals.css, app/layout.tsx |
| Plans and pricing | lib/plans.ts, app/pricing/page.tsx |
| Sign-in | app/login/page.tsx, app/callback/route.ts, proxy.ts |
| Dashboard and settings | app/dashboard/page.tsx, app/dashboard/settings/page.tsx |
| Auth clients and user queries | lib/supabase/ |
| Schema | supabase/setup.sql and any later migration files |
| Checkout and portal | app/api/stripe/, lib/stripe.ts |
| Stripe subscription events | app/api/webhooks/stripe/route.ts |
| Email templates and sending | emails/, lib/resend.tsx |
| AI calls | lib/openrouter.ts |
| Shared agent instructions | AGENTS.md; Claude Code adapter in CLAUDE.md |
| Offline guide reference | docs/ — generated Markdown for you and your agent, not app routes |
Files under app/ define pages and API routes. Files under lib/ hold server/client helpers. components/ contains shared UI. emails/ uses React Email and inline styles, separately from the app's DaisyUI theme.
The current beginner guides are hosted at getghoststack.dev/docs; docs/ is an offline reference copy. The starter does not include a documentation website or its rendering dependencies. Add your own help pages when needed.
Prompt: find where to change something
I want to change [BEHAVIOR]. Read AGENTS.md and identify the files responsible.
Explain the smallest change and which user flow needs testing afterward.See architecture for how requests pass between these files and services.