Product Architecture
This page documents the standardized architecture patterns used across all Burdenoff products.
Microservice Architecture
All products follow a microservice-based architecture with clear separation of concerns.
Frontend Architecture
Frontend (React + TypeScript)
├── Vite Build System
├── TailwindCSS v4 (Semantic tokens)
├── Radix UI Components
├── React Query (Server state)
├── Zustand (Client state)
└── React Router (Routing)
Backend Architecture
Python Backend (FastAPI)
Backend (Python + FastAPI)
├── FastAPI Framework
├── SQLAlchemy (Async ORM)
├── Alembic (Migrations)
├── PostgreSQL Database
├── Redis (Caching/Sessions)
└── Celery (Background tasks)
Node.js Backend
Backend (Node.js + TypeScript)
├── GraphQL API
├── Prisma ORM
├── PostgreSQL Database
└── JWT Authentication
Standard Port Assignments
- Frontend Dev: 51XX range (5147, 5175, 5177)
- Backend APIs: 40XX-80XX range
- Documentation: 30XX range
Database Strategy
Primary Database: PostgreSQL
- Async operations
- Connection pooling
- Transaction management
Caching: Redis
- Session management
- API response caching
- Rate limiting
Migrations
- Python: Alembic
- Node.js: Prisma Migrate
Authentication & Authorization
JWT Tokens
- Access token + Refresh token pattern
- Token rotation for security
- Short-lived access tokens
OAuth 2.0
- Third-party integrations
- Social login support
RBAC
- Role-Based Access Control
- Permission-based authorization
- Multi-tenant support
Multi-Tenant Architecture
See Tenant Architecture for details on:
- Tenant isolation
- Database per tenant vs shared database
- Tenant-specific configurations
- Cross-tenant operations
Infrastructure Patterns
Containerization
- Docker multi-stage builds
- Docker Compose for local development
- Kubernetes for production
Cloud Infrastructure
- Azure Kubernetes Service (AKS)
- Azure Container Registry (ACR)
- Terraform for infrastructure
- Helm charts for deployment
Observability
Logging
- Structured logging
- Correlation IDs
- Azure Log Analytics
Monitoring
- Prometheus metrics
- OpenTelemetry instrumentation
- Custom dashboards
Tracing
- Distributed tracing
- Performance monitoring
- Error tracking
Security Patterns
Input Validation
- Pydantic (Python)
- Zod (TypeScript)
- GraphQL schema validation
Security Scanning
- bandit (Python)
- safety (Dependencies)
- ESLint security rules
Secrets Management
- GitHub Secrets
- Azure Key Vault
- Environment variables