Skip to content

Contributing Guide

Thank you for your interest in contributing to OpenCodeHub! We welcome contributions from everyone.

To contribute code, you need to set up the project locally.

  • Node.js: v18 or v20 (LTS).
  • Bun: v1.0+ (Our package manager/runner).
  • Docker: For running the database locally.
Terminal window
git clone https://github.com/swadhinbiswas/OpencodeHub.git
cd OpencodeHub
# Install dependencies (fast!)
bun install

Start a local Postgres and Redis instance using Docker:

Terminal window
docker-compose up -d postgres redis

Copy the environment config:

Terminal window
cp .env.example .env

Note: The default .env.example is pre-configured to work with the docker-compose services.

Push the schema to the database:

Terminal window
bun db:push

Start the development server:

Terminal window
bun dev

Visit http://localhost:3000.


We use Vitest for unit tests. Use TDD!

Terminal window
# Run all tests
bun test
# Run specific test file
bun test user.test.ts
# Watch mode
bun test --watch

We use ESLint and Prettier to enforce code style.

  • Lint: bun lint
  • Format: bun format

We follow the Conventional Commits specification.

  • feat: add new login page
  • fix: resolve crash on startup
  • docs: update troubleshooting guide

  1. Fork the repository.
  2. Create a feature branch: git checkout -b feat/my-feature.
  3. Commit your changes.
  4. Push to your fork.
  5. Open a Pull Request.
  6. Wait for CI checks to pass.
  7. A team member will review your code!

Thank you for helping build OpenCodeHub! ❤️