Architecture Overview
Infrastructure Components
Bilanc consists of several core services, each responsible for a specific layer of the platform:Dashboard (Next.js)
The Dashboard is the primary user interface for Bilanc. It provides:
- Interactive analytics and visualizations
- Team and individual metrics views
- AI-powered insights display
- Configuration and settings management
API Server (FastAPI)
The API Server handles:
- All REST API requests from the Dashboard
- Authentication and authorization
- Database queries and data retrieval
- Background task dispatch to Celery
Workflow Orchestrator (Dagster)
Dagster consists of two components:Dagster Webserver
Provides a web interface for:
- Monitoring pipeline runs
- Viewing job history and logs
- Manual job triggering
- Schedule management
Dagster Daemon
Responsible for:
- Scheduling and executing data pipelines
- Running data ingestion from integrations
- Triggering dbt transformations
- Managing pipeline dependencies
Task Queue (Celery)
Handles asynchronous background jobs:
- AI insight generation
- Email notifications
- Long-running computations
- Webhook processing
Message Broker (Redis)
Acts as the message broker for Celery tasks:
- Task queue management
- Job result storage
- Inter-service communication
Primary Database (PostgreSQL)
Persists all application data:
- User accounts and settings
- Ingested metrics from integrations
- Transformed analytics data
- Application state
Data Flow
Ingestion Flow
- Dagster Daemon runs scheduled pipelines
- Pipelines fetch data from integrations (GitHub, Linear, Cursor)
- Raw data is stored in PostgreSQL
- dbt transformations process raw data into analytics models
Request Flow
- User accesses the Dashboard
- Dashboard makes API requests to the API Server
- API Server queries PostgreSQL for data
- Results are returned and rendered in the Dashboard
Background Processing Flow
- API Server dispatches tasks to Redis
- Celery Worker picks up tasks from Redis
- Worker processes tasks (AI generation, emails, etc.)
- Results are stored in PostgreSQL or sent to external services
External Services
Integrations
Bilanc connects to external services to ingest data:AI Provider
Bilanc uses an AI provider for generating insights:Email Service
Bilanc uses Resend for:- Scheduled report delivery
- Notification emails
- User invitations
Cloud vs. Self-Hosted
The Bilanc architecture is largely the same for both Cloud and Self-hosted deployments. This ensures self-hosted instances benefit from:- Continuous improvements from cloud development
- Battle-tested components under real load
- Consistent feature parity

