-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
docs: add CLAUDE.md for Claude Code onboarding #2071
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,145 @@ | ||||||||||||||||||||||
| # CLAUDE.md | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Project Overview | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Zero is an open-source, self-hostable email client (Gmail alternative) with AI features. Multi-provider support (Gmail, Outlook). Repository: Mail-0/Zero, website: 0.email. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Monorepo Structure | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| pnpm v10 workspaces with Turbo for orchestration. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - `apps/mail/` — Frontend: React Router v7 + Vite (NOT Next.js), deployed to Cloudflare Workers | ||||||||||||||||||||||
| - `apps/server/` — Backend: Hono framework, deployed to Cloudflare Workers | ||||||||||||||||||||||
| - `packages/cli/` — `nizzy` CLI for env setup and type sync | ||||||||||||||||||||||
| - `packages/eslint-config/` — Shared ESLint config | ||||||||||||||||||||||
| - `packages/testing/` — Vitest + Playwright tests | ||||||||||||||||||||||
| - `packages/tsconfig/` — Shared TypeScript config | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Commands | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Development | ||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||
| pnpm go # One-command: starts DB containers + all dev servers | ||||||||||||||||||||||
| pnpm dev # Start all dev servers (Turbo-managed) | ||||||||||||||||||||||
| pnpm docker:db:up # Start PostgreSQL + Valkey (Redis) containers | ||||||||||||||||||||||
| pnpm docker:db:down # Stop containers | ||||||||||||||||||||||
| pnpm docker:db:clean # Stop and remove volumes | ||||||||||||||||||||||
|
Comment on lines
+27
to
+28
|
||||||||||||||||||||||
| pnpm docker:db:down # Stop containers | |
| pnpm docker:db:clean # Stop and remove volumes | |
| pnpm docker:db:down # Stop and remove DB containers + network | |
| pnpm docker:db:clean # Stop and remove DB containers, network, and volumes |
Copilot
AI
Apr 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This says Drizzle Studio auto-starts with pnpm dev, but pnpm dev maps to turbo run dev (mail: react-router dev, server: wrangler dev) and doesn’t start drizzle-kit studio. Suggest removing this line or replacing it with instructions to run pnpm db:studio when needed.
| Frontend runs on localhost:3000, backend on localhost:8787. Drizzle Studio auto-starts with `pnpm dev`. | |
| Frontend runs on localhost:3000, backend on localhost:8787. Run `pnpm db:studio` when you need the Drizzle Studio UI. |
Copilot
AI
Apr 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lint command notes oxlint @latest is “also the pre-commit hook”, but .husky/pre-commit pins oxlint@1.9.0. Recommend aligning these (either pin the suggested command to 1.9.0, or update the hook) so contributors get consistent results.
| pnpm dlx oxlint@latest --deny-warnings # Lint (also the pre-commit hook) | |
| pnpm dlx oxlint@1.9.0 --deny-warnings # Lint (also the pre-commit hook) |
Copilot
AI
Apr 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pnpm test, pnpm test:watch, and pnpm test:coverage commands are documented as a Vitest suite via @zero/testing, but packages/testing/package.json does not define test, test:watch, or test:coverage scripts (it currently only has Playwright test:e2e*). Either update this section to the actual commands (e.g. pnpm --filter=@zero/testing test:e2e) or add the missing scripts so the documented commands work.
| pnpm test # Vitest suite (via @zero/testing package) | |
| pnpm test:watch # Watch mode | |
| pnpm test:coverage # Coverage report | |
| pnpm test:ai # AI evaluation tests (apps/server) | |
| pnpm eval # Run evalite evaluation suite | |
| pnpm --filter=@zero/testing test:e2e # Playwright test suite | |
| pnpm --filter=@zero/testing test:e2e:ui # Playwright UI mode | |
| pnpm --filter=@zero/testing test:e2e:debug # Playwright debug mode | |
| pnpm test:ai # AI evaluation tests (apps/server) | |
| pnpm eval # Run evalite evaluation suite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The statement that the mail frontend is “NOT Next.js” conflicts with existing repo docs (e.g., README.md:33 and AGENT.md:8 both describe the frontend as Next.js). To avoid onboarding confusion, either update those documents as part of this change or add a short note here acknowledging that older docs are outdated.