Skip to main content
Claude Code is perfect for summarizing large TypeScript files, generating test cases, and drafting docs based on existing implementations. Below is a template CLAUDE.md tailored to this repository.

Install + launch

npm install -g @anthropic-ai/claude-code
claude
Run the CLI from the repository root so Claude can read both /src and /docs.

CLAUDE.md

# Handa Uncle backend

- Stack: Bun runtime, Hono router, MongoDB, Redis, Auth0, Exotel, Pinecone, Langfuse.
- Never fabricate API responses. Quote the source file or OpenAPI spec instead.

## Before editing

1. Run `git status` and list existing changes.
2. Ask whether there are uncommitted secrets or `.env*` files—never open them.
3. Identify the owner file (controller, service, repository) before proposing edits.

## Style

- Logs use `logger` from `src/shared/utils/logger.ts`.
- Errors come from `src/shared/utils/errors.ts`.
- Docs live in `/docs` and use Mintlify components (Note, Tip, Steps, etc.).
- Always include verification steps (curl snippets, health check output).

## Testing

- Run `bun run typecheck` after touching TypeScript.
- Run `bun test path/to/file.test.ts` when adding/changing logic.

## Things to watch

- `/app/*` routes are unauthenticated but rely on headers; never remove validation.
- OTP flows must respect `OTP_RESEND_COOLDOWN_SECONDS`.
- Any new API endpoint needs an entry in `docs/api-reference/openapi.json`.
- If you add env vars, update `env.schema.ts` and `/docs/essentials/settings`.

Suggested prompts

  • “Summarize how AppLaunchService identifies a user based on headers.”
  • “Generate unit tests for the retry logic inside otp.service.ts.”
  • “Draft documentation for a new /api/v1/profile/preferences endpoint based on the controller.”

Review habits

  • Ask Claude to explain risky diffs before accepting them.
  • Use the /focus command on large files (e.g. repositories) to keep context small.
  • Prefer smaller iterative sessions—you can always re-run Claude with more files if needed.