Thanks for helping build OpenChat! This document captures the expectations for setting up your environment, writing code, and getting changes merged.
- Install Bun 1.3+ and Node.js 20+.
- Install the Convex CLI (
bun x convex --help) and ensure Docker is available if you plan to use the Compose workflow. - Familiarize yourself with the repository layout in
README.mdand the deeper architecture docs underdocs/.
- Clone the repository and install dependencies:
bun install
- Copy environment templates and fill in secrets:
env.web.example→apps/web/.env.localenv.server.example→apps/server/.env.local
- Run the monorepo dev server (only when you are ready to test locally):
Use
bun dev
bun dev:weborbun dev:serverto focus on a single workspace.
- Create topic branches from
main(git pull --rebasekeeps your branch current before pushing). - Use Conventional Commit messages, e.g.
feat(web): add workspace pickerorfix(server): prevent duplicate chat titles. - Keep commits logically scoped; use interactive rebases to clean up history before opening a PR.
- TypeScript with ES modules across the repo.
- Tabs for indentation, kebab-case filenames, and React components under
apps/web/src/components. - Prefer type-only imports (
import type { Foo } from "...") when possible. - Write clear code; add short comments only when the intent is non-obvious.
Run these commands before pushing:
bun check– Oxlint linting.bun check-types– type checking across workspaces.bun testor scoped variants (bun test:web,bun test:server).bun build(orbun verify:build) to ensure the production build succeeds when you touch build-critical code.- Update or add tests when behaviour changes, colocated as
*.test.ts(x).
- Keep PRs focused and link related issues when applicable.
- Include:
- A concise summary of the change and impacted app(s).
- Testing notes (commands run, screenshots/GIFs for UI work).
- Follow-ups or rollout considerations.
- Address automated review feedback before requesting human review. If an AI agent posts findings, resolve them before merging.
- Update
README.md,docs/, or in-app copy when user-facing behaviour changes. - Add upgrade notes to
docs/deployment/when deployment steps shift.
- Open a GitHub Discussion or Issue for architecture questions.
- For security-sensitive reports, use the private contact information listed in the repository security policy (or email the maintainers directly).
We appreciate every contribution—thanks for helping OpenChat grow!