Skip to content

Project Onboarding Template

Template for creating project-specific onboarding docs. Copy, fill in, delete unused sections.


TL;DR

How to use:

  1. Copy this template to your project
  2. Fill in each section (delete guidance text)
  3. Remove sections that don't apply
  4. Keep it updated - stale docs are worse than no docs

Prerequisite: New joiners should read Engineering Principles first.


Access Checklist

Before you start:

- [ ] GitHub org access
- [ ] Cloud provider console access
- [ ] Added to Slack channels: #[channel-1], #[channel-2]
- [ ] Added to Linear/Jira project
- [ ] VPN configured (if applicable)
- [ ] [Other access requirements]

Repositories

RepoWhat It IsSetup Guide
repo-nameOne-line descriptionREADME
repo-nameOne-line descriptionREADME

Which repo do I work in?

  • Building feature X → repo-name
  • Fixing bug in Y → repo-name
  • Infrastructure changes → repo-name

Local setup instructions live in each repo's README. This doc covers the bigger picture.


Project Overview

What We Do

Problem we solveWhat pain point does this address?
UsersWho uses this? Internal? External? Both?
Business contextWhy does this matter to the company?

Key Metrics

MetricCurrentTargetDashboard
API latency p95450ms<200msGrafana
Error rate0.5%<0.1%Grafana
Daily active users12k20kMetabase

Architecture

┌─────────┐     ┌─────────┐     ┌─────────┐
│ Client  │────▶│   API   │────▶│   DB    │
└─────────┘     └─────────┘     └─────────┘


              ┌─────────┐
              │ Queue   │
              └─────────┘

Key components:

  • API Gateway: Routes requests, handles auth
  • Worker Service: Processes background jobs
  • Database: PostgreSQL for transactional data

External dependencies:

  • Stripe: Payment processing
  • SendGrid: Transactional email

Codebase Guide

Directory Structure

/
├── src/
│   ├── api/          # HTTP handlers and routes
│   ├── services/     # Business logic
│   ├── repositories/ # Data access
│   └── utils/        # Shared utilities
├── tests/            # Test files mirror src/ structure
├── scripts/          # Build and deployment scripts
└── docs/             # Additional documentation

Key Files

Read these first:

FileWhy
src/api/routes.tsEntry point, all routes
src/services/payment.tsCore business logic example
src/repositories/base.tsData access patterns

Coding Patterns

Service pattern:

typescript
// Services contain business logic, receive dependencies via constructor
class PaymentService {
  constructor(
    private paymentRepo: PaymentRepository,
    private stripe: StripeClient
  ) {}

  async processPayment(orderId: string): Promise<Payment> {
    // Business logic here
  }
}

Error handling:

typescript
// Use custom errors with codes, not generic errors
throw new AppError('PAYMENT_FAILED', 'Card declined', { orderId });

Development Workflow

Branch Naming

[type]/[ticket-id]-[short-description]

feat/PROJ-123-add-payment-method
fix/PROJ-456-null-pointer-checkout
refactor/PROJ-789-extract-validator

Running Tests

bash
# All tests
npm test

# Unit tests only
npm run test:unit

# Integration tests
npm run test:integration

# Single test file
npm test -- --grep "PaymentService"

# With coverage
npm run test:coverage

Building

bash
# Development build
npm run dev

# Production build
npm run build

# Type checking
npm run typecheck

# Linting
npm run lint

Deploying

EnvironmentBranchHowWho Can
Localanynpm run devEveryone
StagingmainAuto on mergeEveryone
ProductionmainManual approvalTech lead +

Deployment checklist:

- [ ] Tests passing
- [ ] PR approved
- [ ] Feature flagged if incomplete
- [ ] Monitoring dashboard open
- [ ] Rollback plan ready

Observability

Dashboards

DashboardWhat It Shows
Service HealthLatency, error rate, throughput
Business MetricsOrders, revenue, users
InfrastructureCPU, memory, connections

Key Alerts

AlertWhat It MeansFirst Response
High Error Rate>5% of requests failingCheck recent deploys, then logs
Latency Spikep95 >2sCheck DB connections, external APIs
Queue Backup>1000 pending jobsCheck worker health, scale up

Logs

bash
# Access logs (example with CloudWatch)
aws logs tail /project/api --follow

# Useful queries
service:api level:error    # All API errors
traceId:abc123             # Specific request
userId:user-456            # User's activity

Traces


Common Tasks

Add a New API Endpoint

bash
# 1. Create handler in src/api/handlers/
touch src/api/handlers/newFeature.ts

# 2. Add route in src/api/routes.ts
# router.post('/new-feature', newFeatureHandler);

# 3. Add service if needed
touch src/services/newFeature.ts

# 4. Write tests
touch tests/api/newFeature.test.ts

# 5. Run tests and submit PR
npm test && git add . && git commit -m "feat: add new feature endpoint"

Run a Database Migration

bash
# 1. Create migration
npm run migration:create -- --name add_user_preferences

# 2. Edit the migration file in migrations/

# 3. Run locally
npm run migration:run

# 4. Verify
npm run migration:status

# 5. Deploy (migrations run automatically on deploy)

Debug a Production Issue

  1. Check alerts dashboard for symptoms
  2. Find relevant logs using traceId from alert
  3. Check recent deploys (was anything deployed?)
  4. Look at traces for slow spans
  5. Check external dependencies status pages
  6. Mitigate (feature flag off, rollback, scale up)
  7. Investigate root cause after bleeding stops

Troubleshooting

"Cannot connect to database"

Symptoms: App fails to start, "ECONNREFUSED" errors

Cause: Database not running or wrong connection string

Fix:

bash
# Check if DB is running
docker ps | grep postgres

# Start if not running
docker-compose up -d postgres

# Verify connection string in .env
DATABASE_URL=postgres://user:pass@localhost:5432/dbname

"Tests timeout on CI"

Symptoms: Tests pass locally, timeout on CI

Cause: Missing test database setup or race conditions

Fix:

bash
# Ensure CI runs migrations
npm run migration:run --env=test

# Check for async cleanup issues
# Add afterEach(() => cleanup()) in test files

"Build fails with type errors"

Symptoms: npm run build fails, local dev works

Cause: Dev mode is lenient, build is strict

Fix:

bash
# Run typecheck locally first
npm run typecheck

# Fix all errors before pushing

Team

People

RolePersonAsk Them About
Tech Lead@nameArchitecture, priorities
Backend@nameAPI design, database
Frontend@nameUI, React patterns
DevOps@nameInfrastructure, deploys

Communication

ChannelPurpose
#project-devDay-to-day development
#project-alertsAutomated alerts
#project-supportCustomer issues

Meetings:

  • Standup: Daily 9:30am (async in Slack on Fridays)
  • Sprint Planning: Monday 10am
  • Retro: Every other Friday 3pm

On-Call

  • Rotation: PagerDuty
  • Escalation: Page on-call → Tech lead → Engineering manager
  • Runbooks: Notion/Confluence

Internal

ResourceWhere
WikiConfluence
Design DocsGoogle Drive
ADRsGitHub
RunbooksNotion

External

ResourceLink
Framework DocsNestJS
DatabasePostgreSQL
Cloud ProviderAWS

First Week Checklist

Day 1

  • [ ] Read this doc
  • [ ] Get access (see checklist above)
  • [ ] Clone repos and run local setup
  • [ ] Join Slack channels
  • [ ] Meet with buddy/mentor

Day 2-3

  • [ ] Read key files listed above
  • [ ] Run the test suite
  • [ ] Pick up a "good first issue"
  • [ ] Shadow a PR review

Day 4-5

  • [ ] Submit first PR
  • [ ] Join a debugging session or incident review
  • [ ] Update this doc with anything unclear or missing

Common Mistakes

MistakeFix
Skipping local testsAlways run npm test before pushing
Forgetting feature flagsWrap incomplete work in flags
Missing migrationsCheck npm run migration:status before deploying
Not checking dashboards after deployKeep Grafana open for 15 minutes post-deploy
Asking questions without contextInclude error messages, what you tried, expected vs actual

Feedback

This doc should help you get productive fast. If something is:

  • Missing: Add it
  • Wrong: Fix it
  • Confusing: Clarify it

Don't ask permission. Just improve it and submit a PR.


Related: