Thanks for your interest in improving Claude Code Proxy. Issues and pull requests are welcome.
Use GitHub Issues for reproducible bugs, focused feature requests, and documentation
problems. Before opening one, search the existing issues and confirm the problem
still occurs on the latest main branch.
For a bug, include the affected version or commit, deployment method, reproduction steps, expected behavior, actual behavior, and sanitized logs. Never post OAuth tokens, API keys, cookies, archived prompts, database dumps, or other private data.
Keep one problem per issue. Operational support questions are welcome when they can produce a documentation or code improvement, but maintainers do not guarantee a response time. Duplicate, unactionable, or out-of-scope issues may be closed.
Security vulnerabilities do not belong in Issues. Follow SECURITY.md and use
GitHub's private vulnerability-reporting flow.
backend/— FastAPI app (the proxy + admin API), Alembic migrations, and the runtime scripts underapp/scripts/.frontend/— Next.js (App Router) admin dashboard.docker-compose*.yml— the main app services, plus the bundled Postgres and Traefik overlays.clients/— helper scripts for end users (e.g. the Claude Code status line).
Prerequisites: Docker + Docker Compose, uv (backend), and Node 22 + pnpm (frontend).
The fastest way to run the whole stack is Docker: cp .env.example .env, fill in the secrets (see the README quickstart), then docker compose -f docker-compose.yaml -f docker-compose.postgres.yml -f docker-compose.traefik.yml up -d --build.
For production changes, use scripts/blue-green.sh as documented in the README.
It requires one existing Traefik gateway and switches only after healthchecks;
scripts/blue-green.sh status is safe to run without changing containers.
cd backend
uv sync
uv run pytest # tests (spins up an ephemeral Postgres via testcontainers)
make lint # ruff check + ruff format --check
make format # auto-fix formatting and lintHouse conventions (enforced by lint/CI — please match them):
- Synchronous SQLAlchemy 2.0 (no async ORM). ORM models are named
*Dbwith UUID primary keys. - Use clear, idiomatic Python type hints consistent with the surrounding module.
- Routes are sync
def(async only for the streaming proxy), usePUTnotPATCH, carry# Path:/# Description:header comments and aresponse_model, and put# noqa: B008on everyDepends(). - Keep route logic inline rather than extracting single-use helpers.
cd frontend
pnpm install
pnpm lint
pnpm buildThe schema ships as a single baseline migration (backend/alembic/versions/001_initial_migration.py). For schema changes, edit the ORM models in backend/app/utils/postgres/schemas.py and add a new Alembic revision (uv run alembic revision -m "..."), keeping the upgrade/downgrade in sync with the models.
Pull requests are accepted. A prior issue is not required for a small bug fix, test, or documentation improvement. Open an issue before investing in a large feature, schema redesign, protocol change, or architectural rewrite so scope can be agreed first. Report security fixes privately before opening a public PR.
- Branch off
mainand keep the change focused. - Add or update tests for behavior changes and include screenshots for visible UI changes.
- Update documentation and migrations when the public behavior or schema changes.
- Ensure
make lintanduv run pytestpass for the backend, andpnpm lint && pnpm buildpass for the frontend. - Explain the problem, approach, verification, compatibility impact, and any follow-up work in the PR description.
- Open the PR; CI runs the same checks. A merge into
maindoes not imply line-by-line human review; the separately maintainedhumanbranch is the human-reviewed line when available.
Draft PRs are welcome for early feedback. Maintainers may request changes, split
an oversized PR, or close work that is unsafe, out of scope, or cannot be
maintained. There is no contributor license agreement at present; contributions
are submitted under the repository's AGPL-3.0 license. All participation is
governed by CODE_OF_CONDUCT.md.