Management & Web Portals
Relevant source files
The following files were used as context for generating this wiki page:
The Management App and Web Portal provide operational oversight for the AtlasCleanAI Enterprise platform. These interfaces allow internal operations teams to manage workforce scheduling, service quality, billing, and AI-powered routing. The portals connect to a containerized Node.js backend and utilize shared Flutter packages for consistent design and API communication.
Sources: README.md:3-8, README.md:195-200
Portal Architecture and Technologies
The management and web interfaces are built using the Flutter framework, ensuring cross-platform consistency. They depend on the atlas_design_system for UI tokens and the atlas_api_client for backend communication.
Application Dependencies
Both the Management App and Web Portal share a core set of libraries for state management, routing, and data handling:
| Category | Library | Purpose |
|---|---|---|
| Framework | flutter | Core UI framework |
| State Management | flutter_bloc | Predictable state changes via BLoC pattern |
| Navigation | go_router | Declarative routing for deep linking |
| Networking | dio & retrofit | Type-safe HTTP client and API generation |
| Charts | fl_chart | Data visualization for operations (Management App only) |
| Animations | lottie | High-quality vector animations |
Sources: apps/management_app/pubspec.yaml:12-25, apps/web_portal/pubspec.yaml:12-23
Shared Design System
The atlas_design_system package provides the visual foundation for these portals. It contains brand colors, typography tokens, and pre-styled components like buttons and cards to ensure a uniform user experience across administrative tools.
Sources: packages/atlas_design_system/pubspec.yaml:1-15, README.md:129-135
Operational Intelligence Integration
The portals interact with the "Atlas AI Intelligence Layer" to manage complex cleaning operations. This includes direct interaction with Atlas AI, a ChatGPT-powered assistant accessible via web interfaces.
Atlas AI Web Interface
The platform includes a specialized web portal (src/public/index.html) that allows administrators to communicate with the AI assistant. This interface supports:
- Contextual Assistance: Queries regarding scheduling, workforce, and payments.
- Real-time Streaming: Feedback via Server-Sent Events for fluid responses.
- Security: Authentication via
x-api-keyheaders.
Sources: src/public/index.html:150-200, README.md:92-105
Data Flow for AI Chat
The following sequence diagram illustrates how the web portal interacts with the backend and OpenAI to provide AI assistance:
Data Management and RBAC
Access to the Management and Web Portals is restricted based on user roles defined in the system's schema.
User Roles and Status
The UserRole and UserStatus enums in the database schema control the level of access within the portals:
- ADMIN: Full system access, including infrastructure and billing oversight.
- MANAGER: Access to workforce management, cleaner assignments, and reporting.
- Status Constraints: Only users with an
ACTIVEstatus can perform management actions.
Sources: backend/src/infrastructure/database/prisma/schema.prisma:15-30
Operational Data Model
Management portals visualize and manipulate several core entities:
Backend API for Portals
The backend exposes specific routes to support management functions, protected by authentication and rate limiting.
Key Management Endpoints
| Endpoint | Controller | Function |
|---|---|---|
/api/v1/cleaners | CleanerController | Manage cleaner profiles and availability |
/api/v1/ai/demand | AIController | Predict demand for specific postal codes |
/api/v1/ai/pricing | AIController | View and adjust dynamic pricing factors |
/api/v1/bookings | BookingController | Overview of all service lifecycles |
Sources: backend/src/app.ts:208-223, backend/src/infrastructure/services/AtlasAIService.ts:98-120
Infrastructure for Scalability
Management portals are supported by high-availability infrastructure:
- NGINX Ingress: Handles TLS termination and provides an
api_limitzone for request throttling (20r/s). - ECS Fargate: Hosts the API tier with auto-scaling based on CPU utilization (target 60%).
- RDS PostgreSQL: Stores transactional data for bookings, cleaners, and billing.
Sources: infrastructure/nginx/nginx.conf:45-70, infrastructure/terraform/main.tf:540-570, README.md:50-60
Summary
The Management & Web Portals serve as the central nervous system for AtlasCleanAI Enterprise. By utilizing a shared Flutter-based architecture and deep integration with the Atlas AI Intelligence Layer, these tools enable efficient workforce management, dynamic pricing adjustment, and comprehensive operational visibility.