-
Read before acting - Always read relevant files before making changes. Never speculate about code you haven't opened. If a specific file is referenced, read it first.
-
Check in before major changes - Before any significant modifications, explain the plan and wait for approval.
-
Explain changes concisely - After each step, give a high-level summary of what was changed.
-
Keep it simple - Every change should be minimal and impact as little code as possible. Avoid complex or sweeping changes. Simplicity is paramount.
-
No hallucinations - Only make claims about code after investigating. If uncertain, investigate first. Give grounded, factual answers.
- Stack: Next.js 16 (App Router), Supabase, Tailwind CSS 4, TypeScript
- Purpose: Sinhala novel reading platform with phone OTP auth, book purchases, offline PWA support
- Author: Single author platform for "කශ්වි අමරසූරිය" (Kashvi Amarasooriya)
- Auth: Uses custom session cookies (
session_user_id,session_phone) - usegetSession()/getCurrentUser()from@/lib/auth, NOT Supabase'sgetUser()
src/app/(public)- Public pages (books, auth, reader)src/app/(authenticated)- Protected pages (library, purchase, settings)src/app/(admin)- Admin panelsrc/app/api- API routessrc/components- Reusable componentssrc/lib- Utilities (supabase, auth, offline, i18n)src/styles- Feature-specific CSS filessupabase/- Database schema and seed data
See ARCHITECTURE.md for detailed system documentation.
Commits all changes and pushes to remote without any AI attribution. Creates a clean commit message following conventional commit format.
Run .claude/skills/nano-banana/generate.sh "YOUR_PROMPT" "output-filename.jpg" to generate images (requires GEMINI_API_KEY in environment).