Skip to content

Latest commit

 

History

History
83 lines (59 loc) · 2.89 KB

File metadata and controls

83 lines (59 loc) · 2.89 KB

Contributing to Codra

Thank you for your interest in contributing to Codra! We are building a high-performance, intelligent PR review engine for the Cloudflare ecosystem, and we value contributions that align with our goals of precision and reliability.


⚖️ Contributor License Agreement (CLA)

Before we can merge your pull request, you must sign our Contributor License Agreement. This is a quick process that takes about 10 seconds and ensures that your contributions can be included under our dual-licensing model (AGPL-3.0 for the core).

  • How to sign: Visit codra.run/cla or follow the link provided by the automated GitHub check on your PR.

🛠️ Local Development Setup

Codra is a monorepo-style project built with Hono (Worker), React (Vite), and Cloudflare Workers.

1. Prerequisites

  • Node.js (Latest LTS)
  • Wrangler CLI (npm install -g wrangler)
  • A Postgres-compatible database and a Cloudflare Hyperdrive config.

2. Installation

git clone https://github.com/devarshishimpi/codra.git
cd codra
npm install

3. Environment Variables

Copy .dev.vars.example to .dev.vars and fill in your secrets:

cp .dev.vars.example .dev.vars

You will need to set up:

  • A GitHub App (for webhooks/checks).
  • A GitHub OAuth App (for dashboard authentication).
  • A Gemini API Key.
  • A Hyperdrive local connection string for wrangler dev.
  • A direct DATABASE_URL for migrations.

4. Running Locally

Codra uses concurrently to run the Vite frontend and the Wrangler worker simultaneously:

npm run dev
  • Frontend: http://localhost:5173 (proxied via Worker)
  • Worker: http://localhost:8787

🧪 Testing

We use Vitest for unit and integration testing. npm test runs the non-database tests by default and automatically enables DB integration tests when TEST_DATABASE_URL points at a disposable Postgres database.

# Run all tests
npm test

# Run tests in watch mode
npm run test:watch

# Run typecheck
npm run typecheck

🚀 Pull Request Process

  1. Fork & Branch: Create a feature branch from dev.
  2. Atomic Commits: Keep your commits focused and descriptive.
  3. Sync: Ensure your branch is up to date with dev.
  4. Target Branch: Open pull requests against dev.
  5. PR Description: Use the provided template (if available) or clearly explain the what and why of your changes.
  6. CLA Check: Once you open the PR, an automated check will verify your CLA status. If you haven't signed yet, follow the link in the check output.

📜 Licensing

Codra is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). By contributing, you agree that your work will be licensed under the same terms, plus the additional grants specified in the CLA.