How cache-me/ai-agent works
Project type and purpose
• This is a full‑stack web application starter built on Next.js (App Router), TypeScript, Shadcn UI + Tailwind, Prisma ORM, tRPC, and NextAuth for authentication.
• It also includes AI “agent” modules (chat, job, portfolio) under src/server/ai and supports email/SMS via src/lib.
File structure
• Top‑level config: .eslintrc.js, tsconfig.json, docker/, prisma/schema.prisma, next.config.js, package.json.
• src/app: Next.js App Router layout, UI for authenticated vs. public, API route entrypoints (/api/auth/[...nextauth], /api/trpc/[trpc]).
• src/client/trpc: tRPC client & React Query integration.
• src/components/ui: shared UI primitives.
• src/lib: low‑level helpers (env, auth, email, sms, validation).
• src/server/api: tRPC server context & routers (user router).
• src/server/ai: AI “agent” services.
• src/server/db.ts & prisma/schema.prisma: database layer (PostgreSQL).
• docker/: containers for web (Next.js) and db (Postgres) via Docker Compose.
README
• Confirms use of Bun, Next.js, Prisma, tRPC, Tailwind, Shadcn UI, NextAuth.
Key pointers
• App Router’s public vs. authenticated layout branching.
• Single source of truth for API contracts via tRPC.
• Environment variables feeding into Docker and server config.
• Don’t over‑partition—focus on the main logical components and their integrations.