How aliahsan9/businessos works
BusinessOS is a multi-tenant business management API spanning workspace administration, CRM, sales and procurement, inventory, finance, reporting, and AI assistance. The documented main request path is client → API endpoints → MediatR/CQRS → application and domain logic → persistence. Its major branches include permission-based authorization, SignalR notifications, AI agent planning and RAG, and tenant-aware data access. The README documents these broad relationships; sampled source confirms tenant-aware persistence and cache-backed query behavior. Several feature implementations were not sampled, so their internal calls are not inferred.
Main entry points: DependencyInjection.cs MediatR CQRS · Program.cs Web API · Endpoints Endpoint modules · BusinessOSDbContext.cs EF Core context
Components 23
API and access
- Web API
BusinessOS.API/Program.cs - Endpoint modules
BusinessOS.API/Endpoints - Authentication
BusinessOS.API/Endpoints/AuthEndpoints.cs - Permission policies
BusinessOS.API/Authorization/PermissionAuthorizationHandler.cs
Business workflows
- MediatR CQRS
BusinessOS.Application/DependencyInjection.cs - CRM and customers
BusinessOS.Application/Features/Customers - Orders and invoices
BusinessOS.Application/Features/Orders - Procurement
BusinessOS.Application/Features/PurchaseOrders - Inventory control
BusinessOS.Application/Features/Inventory - Finance and billing
BusinessOS.Application/Features/Finance
Insights and AI
- Analytics and reports
BusinessOS.Application/Features/Dashboard/Services/ReportingService.cs - AI agent and copilot
BusinessOS.Infrastructure/AI/Agents/AgentEmployeeService.cs - RAG retrieval
BusinessOS.Infrastructure/AI/Copilot/AiVectorRagService.cs
Platform services
- Realtime notifications
BusinessOS.API/Services/SignalRRealtimeNotificationService.cs - Tenant context
BusinessOS.Application/Common/Interfaces/ITenantProvider.cs - Query cache
BusinessOS.Application/Common/Caching/ICacheService.cs
Tenant data
- EF Core context
BusinessOS.Infrastructure/Data/BusinessOSDbContext.cs - Vector outbox sync
BusinessOS.Infrastructure/VectorSearch/VectorSyncBackgroundService.cs
Other components
- Web/mobile clients
- OpenAI API
- Qdrant vector store
- SignalR clients
- PostgreSQL
Connections 22
- Web/mobile clients → Web API: sends requests
README.md - Web API → Endpoint modules: routes requests
README.md - Endpoint modules → MediatR CQRS: dispatches commands
README.md - MediatR CQRS → CRM and customers: handles requests
README.md - MediatR CQRS → Orders and invoices: handles requests
README.md - MediatR CQRS → Procurement: handles requests
README.md - MediatR CQRS → Inventory control: handles requests
README.md - MediatR CQRS → Finance and billing: handles requests
README.md - MediatR CQRS → Analytics and reports: handles queries
README.md - Endpoint modules → Authentication: includes auth routes
README.md - Web API → Permission policies: authorizes requests
README.md - AI agent and copilot → OpenAI API: calls model
README.md - AI agent and copilot → RAG retrieval: uses retrieval
README.md - RAG retrieval → Qdrant vector store: searches vectors
README.md - Web API → Realtime notifications: serves SignalR
README.md - Realtime notifications → SignalR clients: pushes updates
README.md - Web API → Tenant context: resolves tenant
README.md - Tenant context → EF Core context: scopes data
BusinessOS.Infrastructure/Data/BusinessOSDbContext.cs - EF Core context → PostgreSQL: persists entities
README.md - Vector outbox sync → Qdrant vector store: syncs vectors
README.md - MediatR CQRS → Query cache: caches query results
- Inventory control → EF Core context: reads tenant data