Skip to main content

Development Guide

Local Environment

Required Tools

  • Node.js 22+ (runtime baseline)
  • pnpm (package management)
  • Bun (optional, for TypeScript execution)

Port Mappings

Setup

Dev Scripts

Development Workflow

  1. Pull latest from main
  2. Create feature branch: git checkout -b feature/my-feature
  3. Make changes with clear commits
  4. Run lint/build/test: pnpm lint && pnpm build && pnpm test
  5. Open PR with description

Testing

Test Coverage

Coverage thresholds (enforced via Vitest):
  • Lines: 70%
  • Branches: 70%
  • Functions: 70%
  • Statements: 70%

Code Style

  • Language: TypeScript (ESM, strict mode)
  • Linting: oxlint
  • Formatting: oxfmt
  • Comments: Add brief comments for tricky logic
  • File size: Aim for under 500 LOC
Run before commits:

Pre-commit Hooks

Install pre-commit hooks:
This runs the same checks as CI before each commit.

Debugging

Gateway Issues

Telegram Connection Issues

Test Failures

Project Structure