Development¶
Resources for contributing to and extending Switchboard.
Overview¶
Switchboard is an open-source project that welcomes contributions. This section covers:
- Contributing - How to contribute
- Testing - Running and writing tests
Development Setup¶
Prerequisites¶
- Node.js 18+
- Docker and Docker Compose
- Git
Clone and Install¶
Start Development Environment¶
# Start dependencies
docker-compose up -d mongodb redis clickhouse
# Start services in development mode
npm run dev
Project Structure¶
switchboard/
├── packages/
│ ├── services/
│ │ ├── customer-api/ # Customer API service
│ │ └── core-engine/ # Core Engine service
│ ├── programs/
│ │ ├── state-oracle/ # Solana state oracle
│ │ └── coordinator/ # Solana coordinator
│ └── sdk/ # TypeScript SDK
├── docs/ # Internal documentation
├── documentation/ # User-facing docs (MkDocs)
├── scripts/ # Build and utility scripts
└── tests/ # Integration tests
Development Workflow¶
1. Create a Branch¶
2. Make Changes¶
Follow the code style guide and write tests.
3. Run Tests¶
4. Submit Pull Request¶
Push your branch and create a PR against main.
Code Style¶
- TypeScript for all services
- ESLint + Prettier for formatting
- Conventional commits
Building¶
# Build all packages
npm run build
# Build specific service
npm run build:customer-api
npm run build:core-engine
Next Steps¶
- Contributing Guide - Detailed contribution process
- Testing Guide - How to write and run tests