# {{PROJECT_NAME}} — Project Context for Claude Code

> Drop this file at the root of your repository. Claude Code (and Cursor's
> agent mode) loads it automatically as system context for every session.
> Replace the placeholder values with your actual project details.

---

## Overview

{{PROJECT_NAME}} is {{ONE_SENTENCE_DESCRIPTION}}.

Target user: {{ICP_ONE_LINE}}.

The single core action a user takes: {{CORE_ACTION}}.

## Tech Stack

- **Framework**: {{e.g. Next.js 14 App Router, TypeScript}}
- **Database**: {{e.g. PostgreSQL + Prisma ORM (Neon)}}
- **Auth**: {{e.g. Clerk, Supabase Auth, NextAuth}}
- **Payments**: {{e.g. Razorpay (India) + Stripe (global)}}
- **AI**: {{e.g. Claude (primary), OpenAI (fallback) — `src/lib/ai/router.ts`}}
- **Styling**: {{e.g. CSS variables, no Tailwind}}
- **Deployment**: {{e.g. Vercel}}

## Architecture

- `src/app/(marketing)/` — Public marketing pages
- `src/app/app/` — Authenticated routes (dashboard)
- `src/app/api/` — API routes
- `src/lib/` — Shared utilities (auth, db, AI router)
- `src/components/` — Shared UI primitives

## Conventions Claude Should Follow

1. **No hardcoded hex colors** — use CSS variables from globals.css.
2. **No emoji** — use Lucide React icons only.
3. **Use the shared AI router** at `src/lib/ai/router.ts` for any LLM call —
   do not import the Anthropic / OpenAI SDK directly in feature code.
4. **All write APIs must audit-log** — wrap in `withAudit(resource, action,
   fn)` helper.
5. **Pagination on every list API** — cursor pagination, `{data, nextCursor,
   total}` shape.
6. **Server components by default** — only use `"use client"` when interactive
   state or browser APIs are needed.

## Working Style

- **Direct → Monitor → Decide.** Claude generates the draft; the founder
  reads, approves, redirects.
- **Six-block prompt anatomy.** Every feature request to Claude follows:
  Role · Context · Task · Constraints · Examples (given/when/then) · Format.
- **Spot-check at phase boundaries**, not every diff. Trust CI in between.
- **Three flows that must never break**: signup → activation, the core
  action, payment. End-to-end tested, run on every PR.

## What NOT To Do

- Don't deploy without `npx tsc --noEmit` passing.
- Don't merge without reviewing the diff (at least at the file level).
- Don't add new third-party libraries without an ADR.
- Don't break the public API contract without a migration note.

## Useful Commands

- Dev: `npm run dev`
- Type check: `npx tsc --noEmit`
- Tests (Playwright): `npm run test:e2e`
- Production build: `npm run build`

---

*Template companion to The Solo SaaS Playbook by Abhishek Verma · PlanMySaaS Press · 2026.*
*See `https://www.planmysaas.com/book` for the full method.*
