Skip to content

Latest commit

 

History

History
119 lines (79 loc) · 2.74 KB

File metadata and controls

119 lines (79 loc) · 2.74 KB

Contributing to DireWork

Thank you for your interest in contributing to DireWork. This guide covers the setup and workflow for contributing.

Prerequisites

Setup

  1. Fork and clone the repository:

    git clone https://github.com/<your-username>/dirework.git
    cd dirework
  2. Install dependencies:

    bun install
  3. Configure environment variables:

    cp .env.example .env

    Fill in the required values — see .env.example for descriptions.

  4. Start the database:

    bun run db:start
  5. Push the schema (development only — creates tables without migrations):

    bun run db:push
  6. Start the dev server:

    bun run dev

    The web app runs at http://localhost:3001 and docs at http://localhost:4000.

Branch Workflow

  • main — production branch, protected
  • dev — development branch

All work should be done on feature branches created from dev:

git checkout dev
git pull origin dev
git checkout -b feat/your-feature-name

Making Changes

  • Follow existing code patterns and conventions documented in CLAUDE.md
  • Use TypeScript strict mode — no any types
  • Use functional components with "use client" where needed
  • Style with Tailwind utility classes
  • Extract pure logic into testable modules (not inline in components/routers)

Testing

Run the full test suite before submitting:

bun run test

Run type checking:

bun run check-types

Run a production build to catch build-time errors:

bun run build

When adding new pure functions, add corresponding tests in a __tests__/ directory alongside the source file.

Pull Request Process

  1. Ensure all checks pass: bun run check-types && bun run test && bun run build
  2. Create a PR from your feature branch to dev
  3. Provide a clear title and description of your changes
  4. Link any relevant issues
  5. Wait for review — maintainers may request changes

Code Quality

  • No unused imports or variables
  • No console.log in committed code (use proper error handling)
  • Database columns use snake_case; TypeScript fields use camelCase
  • IDs use CUID2 via @paralleldrive/cuid2

Reporting Issues

Use GitHub Issues to report bugs or request features. Include steps to reproduce for bugs.

License

By contributing, you agree that your contributions will be licensed under the same license as the project.