Thank you for contributing! This guide covers the essential workflows and conventions.
- Node.js >= 20
- pnpm 10.19.0
- Git latest version
git clone https://github.com/YOUR_USERNAME/deepcrawl.git
cd deepcrawl
pnpm install
git checkout -b feature/your-feature-namepnpm check # Run all quality checks
pnpm typecheck # Type check only
cd apps/app && pnpm dev:workers # Dashboard + workers (api + auth)
cd apps/workers/v0 && pnpm dev # V0 worker only
cd packages/sdks/js-ts && pnpm test # Run SDK tests💡 Tip: Run pnpm check from any scope (package/app) or from the root to catch type errors and linting issues early. This runs Biome formatter/linter and TypeScript type checking, helping you debug before committing.
# From root - checks entire workspace
pnpm check
# From any package - checks that package
cd apps/workers/v0 && pnpm check
cd packages/sdks/js-ts && pnpm checkgit add .
↓
git commit -m "(scope):(category): message"
↓ [Pre-Commit] - lint-staged (Biome + ESLint on staged files)
↓
git push
↓ [Pre-Push] - Branch sync, lint, typecheck, smart SDK tests
↓
GitHub Actions - Validate, Deploy, Release
Pre-commit (.husky/pre-commit): Runs lint-staged on staged files only
Pre-push (.husky/pre-push): Checks branch sync, runs lint/typecheck, conditionally runs SDK tests
Skip hooks: git push --no-verify or add [skip ci] to commit message
Format: (scope):(category): message
Quick Reference:
| Scope | Example |
|---|---|
app |
app:fix: fix login validation |
v0 or wks:v0 |
v0:feat: add rate limiting |
wks:auth |
wks:auth:ref: refactor session |
pkg:ui |
pkg:ui:feat: add toast component |
pkg:sdk-ts |
pkg:sdk-ts:fix: resolve types |
pkg:types |
pkg:types:feat: add metrics types |
pkg:contracts |
pkg:contracts:feat: add contract |
pkg:db-auth |
pkg:db-auth:chore: update schema |
chore |
chore: update dependencies |
ci |
ci: add workflow |
docs |
docs: update README |
Categories: feat, fix, ref, chore, docs, test, perf, style, build
Examples:
app:fix: resolve form validation errorv0:feat: add new scraping endpointpkg:sdk-ts:ref: improve error handlingchore: bump dependencies to latest
Trigger: Push/PR to main
Steps: Biome, ESLint, Typecheck, SDK tests, SDK build
Trigger: Push to main with changes to packages/auth/** or apps/workers/auth/**
Steps: DB sync, deploy to Cloudflare
Trigger: Push to main with changes to apps/workers/v0/**
Steps: Deploy to Cloudflare
Trigger: Push to main with changesets
Steps: Build, test, create release PR or publish to npm
If you modify any of these packages, you MUST create a changeset:
packages/sdks/js-ts(SDK)packages/types(Types)packages/contracts(Contracts)
# Create a changeset
pnpm changeset
# Follow the prompts:
# 1. Select packages that changed
# 2. Choose bump type (patch/minor/major)
# 3. Write a clear summary
# 4. Commit the changeset file
git add .changeset/
git commit -m "pkg:sdk-ts:feat: add new feature + changeset"The release workflow will automatically publish to npm.
If you modify packages/auth and it requires database schema changes:
cd packages/db/db-auth
# Generate migration from schema changes
pnpm db:generate
# Apply migration to local database
pnpm db:push
# Commit the migration files
git add drizzle/
git commit -m "pkg:auth:feat: add new auth field + migration"Production migrations run automatically in the Auth Worker Deploy workflow.
- Sync with upstream:
git fetch upstream && git rebase upstream/main - Run quality checks:
pnpm check - If SDK/types/contracts changed: Create changeset (
pnpm changeset) - If auth schema changed: Generate and commit migrations
- Push to your fork:
git push origin feature/your-feature-name - Open PR with clear description and link related issues (
Fixes #123) - Ensure all CI checks pass
- Formatting: Biome with 2-space indentation, single quotes, 80 char line width
- TypeScript: Use interfaces, avoid
any, useexport typefor types - React: Prefer Server Components, minimal
'use client', usenext/image - Accessibility: Include
langattribute, meaningful alt text, semantic HTML
See CLAUDE.md for comprehensive style guidelines and architecture details.
cd packages/sdks/js-ts
pnpm test # Run all tests
pnpm test:watch # Watch mode
pnpm test:coverage # With coverageManual testing: Use pnpm dev, OpenAPI docs at /docs, and pnpm db:studio
- CLAUDE.md - Technical guidelines and architecture
- README.md - Project overview
- GitHub Workflows - CI/CD configurations
Open a GitHub Discussion or ask in existing issues.