Skip to main content
This page describes the architecture and infrastructure components that make up a self-hosted Bilanc deployment.

Architecture Overview


Infrastructure Components

Bilanc consists of several core services, each responsible for a specific layer of the platform:

Dashboard (Next.js)

PropertyValue
Port3000
TechnologyNext.js
PurposeUser interface
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)

PropertyValue
Port8000
TechnologyFastAPI (Python)
PurposeBackend API
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

PropertyValue
Port4000
TechnologyDagster
PurposePipeline monitoring UI
Provides a web interface for:
  • Monitoring pipeline runs
  • Viewing job history and logs
  • Manual job triggering
  • Schedule management

Dagster Daemon

PropertyValue
PortInternal
TechnologyDagster
PurposePipeline execution
Responsible for:
  • Scheduling and executing data pipelines
  • Running data ingestion from integrations
  • Triggering dbt transformations
  • Managing pipeline dependencies

Task Queue (Celery)

PropertyValue
PortInternal
TechnologyCelery (Python)
PurposeBackground jobs
Handles asynchronous background jobs:
  • AI insight generation
  • Email notifications
  • Long-running computations
  • Webhook processing

Message Broker (Redis)

PropertyValue
Port6379
TechnologyRedis
PurposeMessage queue
Acts as the message broker for Celery tasks:
  • Task queue management
  • Job result storage
  • Inter-service communication

Primary Database (PostgreSQL)

PropertyValue
Port5432
TechnologyPostgreSQL
PurposeData storage
Persists all application data:
  • User accounts and settings
  • Ingested metrics from integrations
  • Transformed analytics data
  • Application state

Data Flow

Ingestion Flow

  1. Dagster Daemon runs scheduled pipelines
  2. Pipelines fetch data from integrations (GitHub, Linear, Cursor)
  3. Raw data is stored in PostgreSQL
  4. dbt transformations process raw data into analytics models

Request Flow

  1. User accesses the Dashboard
  2. Dashboard makes API requests to the API Server
  3. API Server queries PostgreSQL for data
  4. Results are returned and rendered in the Dashboard

Background Processing Flow

  1. API Server dispatches tasks to Redis
  2. Celery Worker picks up tasks from Redis
  3. Worker processes tasks (AI generation, emails, etc.)
  4. Results are stored in PostgreSQL or sent to external services

External Services

Integrations

Bilanc connects to external services to ingest data:
ServicePurpose
GitHubPull requests, commits, reviews, releases
GitLabMerge requests, commits, pipelines
JIRAIssues, sprints, project tracking
LinearIssues, projects, cycles

AI Provider

Bilanc uses an AI provider for generating insights:
ProviderModels
OpenAIGPT-4o, GPT-4, GPT-3.5
AnthropicClaude 3.5, Claude 3
Google AIGemini Pro

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

Network Requirements

ServiceDirectionPurpose
DashboardInboundUser access
DagsterInbound (optional)Admin pipeline monitoring
IntegrationsOutboundGitHub, Linear, Cursor API access
AI ProviderOutboundOpenAI, Anthropic, or Google AI API
EmailOutboundResend API
If you are interested in the self-hosting version, please get in touch with us at support@bilanc.co or book a demo.