Codebase
Project structure
A tour of the monorepo — apps, packages, and where to put things.
The repo is a Turborepo pnpm workspace. Almost everything you touch is in apps/web and packages/database; the rest is shared infrastructure or optional dev tooling.
Apps
| Path | What it is |
|---|---|
apps/web | The deploy unit. The whole product: public site, admin console, REST API, MCP server, cron pipelines, and these docs. This is the only app you deploy. |
apps/studio | Prisma Studio launcher for browsing the database. Dev tooling, never deployed. |
Inside apps/web
app/(marketing)/ public site — one folder per section (tools, news, compare, …)
app/admin/ operations console — one module per surface under (dashboard)/
app/api/ REST endpoints, /api/mcp, and /api/cron/* pipelines
lib/ service layer — the functions pages and API routes call
components/ shared client components for the web app
content/ MDX: blog/, docs/ (this page), legal/
public/ static assets, tool logos, tag icons
- Where to add a page: a new public section is a folder under
app/(marketing)/; a new admin surface is a module underapp/admin/(dashboard)/. - Where the service layer lives:
apps/web/lib/— data access and business logic (tools.ts,news.ts,posts.ts,site-settings.ts,audit.ts,monetization.ts, …). Pages and API routes stay thin and call these. - Where server actions live: colocated with each admin module as
actions.ts. The pattern:assertAdmin(), validate with zod, write,revalidatePath,logAudit.
Packages
| Package | What it holds |
|---|---|
database | Prisma schema, generated client, and the seed |
design-system | shadcn/ui components and theme tokens, shared by web and admin |
auth | better-auth configuration |
payments | Stripe client and key handling |
seo | metadata, JSON-LD, and build-time identity |
cms | MDX/content collection helpers |
security, rate-limit | request protection and throttling |
observability | Sentry and logging setup |
analytics, feature-flags | analytics and flag infrastructure, wired in as needed |
next-config, typescript-config | shared build and TS config |
(R2 image uploads live in the web app itself, at apps/web/lib/r2.ts.)
Scripts and skills
scripts/— maintenance and seeding utilities: the big optional tool catalogs (seed-tools.ts,seed-tools-v2.ts), extra news sources and stacks, screenshot capture, HTML cleanup, andmake-clean-snapshot.shfor building a history-free copy of the repo..claude/skills/— agent Skills (install-directory,rebrand-directory) so a coding agent can deploy and rebrand the site for you.