A step-by-step walkthrough for new contributors to get the BlueCollar monorepo running locally and make their first contribution.
- Prerequisites
- Local Development Setup
- Your First Contribution Walkthrough
- Common Troubleshooting
- Good First Issues
Install these tools before you start:
| Tool | Version | Install |
|---|---|---|
| Node.js | >= 20 | nodejs.org |
| pnpm | >= 9 | npm i -g pnpm |
| PostgreSQL | >= 14 | postgresql.org or Docker |
| Git | any | git-scm.com |
| Rust | stable | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh |
| Docker (optional) | any | docker.com |
Verify your setup:
node --version # v20.x.x or higher
pnpm --version # 9.x.x or higher
psql --version # psql (PostgreSQL) 14.x or higher
git --version # git version 2.x.x
rustc --version # rustc 1.x.x (stable)Fork the repository on GitHub, then clone your fork:
git clone https://github.com/<your-username>/Blue-Collar.git
cd Blue-CollarAdd the upstream remote so you can pull future changes:
git remote add upstream https://github.com/abore9769/Blue-Collar.gitFrom the repo root, install all workspace dependencies at once:
pnpm installThis installs dependencies for all three packages (api, app, contracts) in one step.
The backend REST API — Node.js, Express, TypeScript, Prisma, PostgreSQL.
cp packages/api/.env.example packages/api/.envOpen packages/api/.env and fill in the required values:
| Variable | Required | Example |
|---|---|---|
DATABASE_URL |
Yes | postgresql://user:pass@localhost:5432/bluecollar |
TEST_DATABASE_URL |
Yes (for tests) | postgresql://user:pass@localhost:5432/bluecollar_test |
JWT_SECRET |
Yes | openssl rand -hex 32 output |
PORT |
No | 3000 |
NODE_ENV |
No | development |
APP_URL |
No | http://localhost:3001 |
ALLOWED_ORIGINS |
No | http://localhost:3001 |
GOOGLE_CLIENT_ID |
No | From Google Cloud Console |
GOOGLE_CLIENT_SECRET |
No | From Google Cloud Console |
MAIL_HOST |
No | smtp.example.com |
MAIL_PORT |
No | 587 |
MAIL_USER |
No | no-reply@example.com |
MAIL_PASS |
No | Your SMTP password |
VAPID_PUBLIC_KEY |
No | Generate with npx web-push generate-vapid-keys |
VAPID_PRIVATE_KEY |
No | Generate with npx web-push generate-vapid-keys |
For local development, only DATABASE_URL, JWT_SECRET, and PORT are strictly required. Google OAuth and email features will be unavailable without their respective variables.
createdb bluecollar
createdb bluecollar_test # for running testsOr with Docker (no local PostgreSQL needed):
pnpm docker:up # starts PostgreSQL + API + Adminer at localhost:8080cd packages/api
pnpm migrateThis runs prisma migrate dev and applies all schema migrations.
pnpm seedPopulates the database with default job categories.
pnpm devThe API is now available at http://localhost:3000/api.
Verify it's running:
curl http://localhost:3000/health
# {"status":"ok","service":"bluecollar-api"}pnpm admin:create --email admin@example.com --password secret123 --firstName Jane --lastName Doe| Script | Description |
|---|---|
pnpm dev |
Start dev server with hot reload |
pnpm build |
Compile TypeScript to dist/ |
pnpm test |
Run tests with Vitest (watch mode) |
pnpm test -- --run |
Run tests once (no watch) |
pnpm test:coverage |
Run tests with coverage report |
pnpm migrate |
Run Prisma migrations |
pnpm seed |
Seed default categories |
pnpm admin:create |
Create an admin user via CLI |
pnpm db:reset |
Reset the database (dev only) |
pnpm lint |
Run ESLint |
pnpm format |
Format with Prettier |
The Next.js 14 frontend — React, Tailwind CSS, next-intl, Stellar SDK.
cp packages/app/.env.example packages/app/.envOpen packages/app/.env and fill in:
| Variable | Required | Example |
|---|---|---|
NEXT_PUBLIC_API_URL |
Yes | http://localhost:3000/api |
NEXT_PUBLIC_STELLAR_NETWORK |
No | TESTNET |
NEXT_PUBLIC_MARKET_CONTRACT_ID |
No | Deployed contract ID |
NEXT_PUBLIC_REGISTRY_CONTRACT_ID |
No | Deployed contract ID |
NEXT_PUBLIC_VAPID_PUBLIC_KEY |
No | Must match API's VAPID_PUBLIC_KEY |
For local development, only NEXT_PUBLIC_API_URL is required.
cd packages/app
pnpm devThe app is available at http://localhost:3001.
| Script | Description |
|---|---|
pnpm dev |
Start Next.js dev server |
pnpm build |
Production build |
pnpm test |
Run component tests with Vitest |
pnpm lint |
Run ESLint |
pnpm type-check |
TypeScript type check (no emit) |
Stellar Soroban smart contracts written in Rust.
rustup target add wasm32-unknown-unknown
cargo install --locked stellar-cli --features optVerify:
rustc --version
stellar --versioncd packages/contracts
make build
# or: cargo build --release --target wasm32-unknown-unknownOutput WASMs:
target/wasm32-unknown-unknown/release/bluecollar_registry.wasmtarget/wasm32-unknown-unknown/release/bluecollar_market.wasm
make test
# or: cargo testRun a single contract's tests:
cargo test -p bluecollar-registry
cargo test -p bluecollar-market| Command | Description |
|---|---|
make build |
Build all contracts to WASM |
make test |
Run all contract tests |
make clippy |
Lint with Clippy (zero warnings) |
make fmt |
Format with cargo fmt |
Here's the full flow from picking an issue to opening a PR.
Browse good first issues on GitHub. Leave a comment saying you'd like to work on it so maintainers can assign it to you.
Before starting, make sure your main is up to date:
git checkout main
git fetch upstream
git merge upstream/mainFollow the branch naming convention <type>/<short-description>:
git checkout -b fix/worker-toggle-auth
# or
git checkout -b feat/add-worker-search
# or
git checkout -b docs/update-api-readmeWrite your code. Keep commits small and focused. Follow the Conventional Commits format:
git commit -m "fix(api): return 403 instead of 401 on missing role"
git commit -m "feat(app): add search bar to workers page"
git commit -m "docs(api): document rate limiting headers"Before pushing, make sure everything passes:
# API
cd packages/api
pnpm test -- --run
pnpm build
# App
cd packages/app
pnpm lint
pnpm type-check
# Contracts (if you changed Rust code)
cd packages/contracts
make clippy
make testgit push origin fix/worker-toggle-authThen open a pull request on GitHub against the main branch. A PR template will pre-fill — it includes a checklist covering the type of change you made. Use the appropriate issue template when opening issues:
| Issue Type | Template |
|---|---|
| Bug Report | .github/ISSUE_TEMPLATE/bug_report.yml |
| Feature Request | .github/ISSUE_TEMPLATE/feature_request.yml |
| Documentation | .github/ISSUE_TEMPLATE/documentation.yml |
PR template (.github/pull_request_template.md):
## Summary
Brief description of what this PR does and why.
## Related Issue
Closes #
## Type of Change
- [ ] feat — New feature
- [ ] fix — Bug fix
- [ ] docs — Documentation
...
## Checklist
- [ ] Linter passes (`pnpm lint`)
- [ ] Tests pass (`pnpm test -- --run`)
- [ ] PR title follows Conventional Commits
...
- Ensure PostgreSQL is running:
pg_isreadyorsudo service postgresql start - Double-check
DATABASE_URLinpackages/api/.env— username, password, host, port, and database name must all match - Make sure the database exists:
createdb bluecollar
createdb bluecollar- Confirm
packages/api/.envexists:ls packages/api/.env - Ensure you copied from the example:
cp packages/api/.env.example packages/api/.env - Check that
JWT_SECRET,DATABASE_URL, andPORTare set and non-empty
npm i -g pnpm# Find and kill the process
lsof -ti:3000 | xargs kill
# Or use a different port
PORT=3001 pnpm devInstall Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"rustup target add wasm32-unknown-unknowncargo install --locked stellar-cli --features optcd packages/app
pnpm type-check # see all type errorsFix the reported errors before pushing — CI will fail on type errors.
Make sure you ran pnpm install from the repo root, not from inside a package directory:
cd Blue-Collar # repo root
pnpm installLook for issues tagged good first issue on GitHub. These are scoped to be approachable for new contributors and have enough context to get started without deep knowledge of the codebase.
If you're unsure where to start, these areas are always good for contributions:
- Documentation — improving READMEs, adding code comments, fixing typos
- Tests — adding test coverage for untested services or controllers
- Validation — strengthening input validation rules
- UI components — building or improving frontend components in
packages/app/src/components/
Feel free to open a GitHub Discussion if you have questions before diving in.