High-level map of the repo for AI and human readers.
future-ai-app/
βββ app/ # Next.js App Router
β βββ page.tsx # Home
β βββ chart/ # Chart generation page
β βββ news/ # News (markdown-driven)
β βββ predict/ # Predictions
β βββ ... # Auth, API routes, etc.
βββ components/
β βββ home/ # HeroSection, etc.
β βββ chart/ # BirthDataForm, ChartWheel, PlanetTable, CitySearch, etc.
β βββ ui/ # Card, Button, shared UI
βββ hooks/ # useChartCalculation, useGeocoding
βββ lib/
β βββ astro/ # Core astrology logic (pure, typed)
β β βββ calculate.ts # Chart calculation entry
β β βββ houses.ts # Whole sign houses
β β βββ planets.ts # Planetary positions
β β βββ points.ts # Ascendant, MC, etc.
β β βββ draw.ts # Chart wheel drawing
β β βββ format.ts # Display formatting
β β βββ validate.ts # Date/year validation
β β βββ types.ts # Shared types
β β βββ ...
β βββ geocoding.ts # Place β lat/lon
β βββ copy.ts # Copy / content
β βββ utils.ts # cn(), etc.
βββ prisma/ # Schema, migrations
βββ .github/workflows/ # CI (lint, typecheck, test, build)
βββ vitest.config.ts # Vitest
βββ eslint.config.mjs # ESLint (Next.js)
βββ CLAUDE.md # Cursor project rules
βββ claude.md # Project context for Claude
βββ codex.md # This file
- Chart flow:
app/chart/page.tsxβBirthDataForm+useChartCalculationβlib/astro/calculate.tsβChartWheel/PlanetTable. - Geocoding:
CitySearchusesuseGeocodingβlib/geocoding.ts. - Auth: NextAuth in
app/(e.g. API routes, session).
- Runner: Vitest (
vitest.config.ts); path alias@/viavite-tsconfig-paths. - Where:
**/*.{test,spec}.{ts,tsx}(e.g.lib/astro/validate.test.ts). - CI:
.github/workflows/ci.ymlruns lint, typecheck,vitest run, and build.
- Lint: ESLint (Next.js config);
npm run lint/npm run lint:fix. - Typecheck:
npm run typecheck(tsc --noEmit). - Database:
make migrate(prisma migrate deploy),make migrate-dev,make generate; see docs/SETUP.md / docs/DEPLOYMENT.md. Astro coins + Stripe: docs/STRIPE.md. - Pre-commit: Husky + lint-staged; ESLint --fix on staged TS/JS files.
- CLAUDE.md β Cursor/conventions and commands.
- claude.md β Project context for Claude (overview, stack, commands).
- codex.md β This codebase map.