How orafaeldantas/exactum-api works
Exactum is a multi-tenant retail ERP: users authenticate and enter tenant-scoped product, sales/PDV, and analytics workflows, while super-admins manage tenants and platform operations. The graph highlights those product stages plus authorization and observability. Route-to-controller and selected service calls are supported by excerpts or the SOURCE INDEX; broader UI/API and unsampled domain wiring is shown only where documented, or omitted when the specific link is uncertain.
Main entry points: App.jsx Web app and routes · permissions.py Permission checks · api.js API client · user_routes.py User management
Components 26
Web application
- Web app and routes
frontend/src/App.jsx - Auth context
frontend/src/context/AuthContext.jsx - API client
frontend/src/services/api.js - Business dashboards
frontend/src/pages/dashboard/Dashboard.jsx - Sales and PDV screens
frontend/src/pages/pdv/LocalSales.jsx - Product screens
frontend/src/pages/products/ListProducts.jsx - Tenant administration
frontend/src/pages/platform/ManageCompanies.jsx
Identity and tenancy
- Authentication routes
backend/app/domains/auth/auth_routes.py - Authentication controller
backend/app/domains/auth/auth_controller.py - Sessions and impersonation
backend/app/domains/auth/auth_service.py - Session cache
backend/app/core/cache/cache_service.py - Tenant lifecycle
backend/app/domains/tenant/tenant_routes.py - User management
backend/app/domains/user/user_routes.py - Tenant user records
backend/app/models/user.py
Retail operations
- Product inventory
backend/app/domains/product/product_routes.py - Sales and PDV
backend/app/domains/sale/routes/sale_routes.py - Sales analytics
backend/app/domains/sale/services/revenue_analytics_service.py
Authorization
- Role management
backend/app/domains/rbac/rbac_routes.py - Permission checks
backend/app/domains/rbac/decorators/permissions.py - Effective permissions
backend/app/domains/rbac/rbac_service.py
Platform operations
- Tenant audit logs
backend/app/domains/observability/audit_service.py - Platform operations API
backend/app/domains/platform/platform_routes.py - Platform operations
backend/app/domains/platform/platform_controller.py - Health checks
backend/app/core/monitoring/health_routes.py
Other components
- Retail user
- Platform admin
Connections 23
- Retail user → Web app and routes: uses
- Platform admin → Web app and routes: administers
- Web app and routes → Auth context: reads auth
frontend/src/App.jsx - Auth context → API client: requests bootstrap
frontend/src/context/AuthContext.jsx - Web app and routes → Business dashboards: routes to
frontend/src/App.jsx - Web app and routes → Sales and PDV screens: routes to
frontend/src/App.jsx - Web app and routes → Product screens: routes to
frontend/src/App.jsx - Web app and routes → Tenant administration: routes to
frontend/src/App.jsx - API client → Authentication routes: calls API
- Authentication routes → Authentication controller: dispatches
backend/app/domains/auth/auth_controller.py - Authentication controller → Sessions and impersonation: delegates
backend/app/domains/auth/auth_controller.py - Sessions and impersonation → Session cache: stores sessions
backend/app/domains/auth/auth_service.py - Tenant lifecycle → Permission checks: checks access
backend/app/domains/tenant/tenant_routes.py - User management → Permission checks: checks access
backend/app/domains/user/user_routes.py - User management → Tenant user records: uses records
backend/app/domains/user/user_routes.py - Product inventory → Permission checks: checks access
backend/app/domains/product/product_routes.py - Sales and PDV → Permission checks: checks access
backend/app/domains/sale/routes/sale_routes.py - Role management → Permission checks: checks access
backend/app/domains/rbac/rbac_routes.py - Permission checks → Effective permissions: resolves permissions
backend/app/domains/rbac/decorators/permissions.py - Platform operations API → Platform operations: dispatches
backend/app/domains/platform/platform_routes.py - Platform operations → Tenant audit logs: records events
- Sales analytics → Sales and PDV: analyzes sales
- Health checks → API client: serves status