Backend Overview
The Maybern backend is a Django application that provides the API, business logic, and data management for the platform. It’s organized into domain-specific apps that handle different aspects of fund administration.Architecture
The backend follows a consistent structure across all apps:App Categories
Capital Activity
Apps for managing capital calls, distributions, and allocations.
Financial Operations
Apps for fees, transactions, waterfalls, and calculations.
Supporting Apps
Apps for documents, notices, auditing, and feature flags.
Key Concepts
Multi-Tenancy
All data is customer-scoped usingcustomer_id fields. The CustomerTimeStampedModel base class handles this automatically.
Request Context
TheRequestCtx object is passed through all service calls, containing:
customer_id- Current tenantuser_id- Authenticated userfeature_flags- Active feature flagsrequest_source- Origin of request (frontend, API, etc.)
Service Layer Pattern
Business logic is organized into services:- Public Services - External interface for other apps
- Private Services - Internal business logic
- Selectors - Data access patterns