Core Contributors
Engineers adding features or fixing bugs in CalcBridge
Welcome to the CalcBridge Developer Guide. This documentation provides everything you need to contribute to CalcBridge, extend its functionality, or integrate it with other systems.
| Requirement | Version | Purpose |
|---|---|---|
| Python | 3.11+ | Backend runtime |
| Docker | 24+ | Container runtime |
| Docker Compose | 2.20+ | Local development stack |
| Node.js | 18+ | Frontend development |
| PostgreSQL | 16 | Database (via Docker) |
| Valkey | 8+ | Cache (via Docker) |
# Clone the repository
git clone https://github.com/InsightCapital/calcbridge.git
cd calcbridge
# Create and activate virtual environment
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies with development extras
pip install -e ".[dev,test]"
# Copy environment configuration
cp .env.example .env
# Start infrastructure services
docker-compose up -d postgres valkey
# Run database migrations
for migration in db/migrations/V*.sql; do
PGPASSWORD=calcbridge_dev psql -h localhost -p 5433 -U calcbridge -d calcbridge -f "$migration"
done
# Start the API server
PYTHONPATH=. uvicorn src.api.main:app --reload --port 8000
# Verify setup
curl http://localhost:8000/health
Recommended extensions:
.venv/bin/pythoncalcbridge/
├── src/ # Application source code
│ ├── api/ # FastAPI application
│ │ ├── main.py # App factory with middleware
│ │ ├── routes/ # API endpoints
│ │ ├── middleware/ # Request processing middleware
│ │ └── dependencies.py # Dependency injection
│ ├── calculations/ # Calculation engine
│ │ ├── parser/ # Excel formula parser (AST-based)
│ │ ├── functions/ # Vectorized function implementations
│ │ └── services/ # Calculation orchestration
│ ├── core/ # Core utilities
│ │ ├── config.py # Environment configuration
│ │ ├── security.py # JWT and password handling
│ │ └── tenant/ # Multi-tenant context
│ ├── db/ # Database layer
│ │ ├── models/ # SQLAlchemy ORM models
│ │ ├── repositories/ # Data access layer
│ │ └── session.py # Connection management
│ ├── services/ # Business logic services
│ └── workers/ # Celery background tasks
├── tests/ # Test suite
│ ├── unit/ # Unit tests (no external deps)
│ ├── integration/ # Integration tests (with testcontainers)
│ ├── security/ # Security vulnerability tests
│ └── load/ # Load testing (Locust)
├── frontend/ # Next.js frontend
├── db/migrations/ # Flyway SQL migrations
├── config/ # Infrastructure configs
├── docs-site/ # Documentation (you are here)
└── scripts/ # Operations scripts
Browse GitHub Issues for tasks labeled:
good first issue - Suitable for new contributorshelp wanted - Community contributions welcomebug - Bug fixesenhancement - New features# Sync with main
git checkout main
git pull origin main
# Create feature branch
git checkout -b feature/CB-123-add-xlookup-function
# Make your changes
# ...
# Run tests
PYTHONPATH=. pytest tests/ -v
# Check code style
ruff check src/ tests/
ruff format src/ tests/
mainOnce approved, your PR will be merged by a maintainer.
| Layer | Technology | Purpose |
|---|---|---|
| API | FastAPI | REST API framework |
| Database | PostgreSQL 16 | Primary data store with JSONB |
| Cache | Valkey | Redis-compatible caching |
| Task Queue | Celery | Async background jobs |
| Frontend | Next.js 14 | React-based web UI |
| Testing | pytest | Test framework with testcontainers |
| Linting | Ruff | Python linter and formatter |
| Monitoring | Prometheus + Grafana | Metrics and dashboards |
| Tracing | OpenTelemetry | Distributed tracing |