Expanding the Platform
Relevant source files
The following files were used as context for generating this wiki page:
AtlasCleanAI Enterprise provides a modular foundation for scaling an AI-powered cleaning services ecosystem. The platform supports multiple client applications, scalable cloud infrastructure, and an intelligence layer for operational optimization.
Expanding the platform involves adding new client applications, extending backend services via use cases, and scaling the infrastructure using Infrastructure-as-Code (IaC) templates. The monorepo structure ensures that shared logic, design systems, and API clients remain consistent across all new modules.
Sources: README.md:1-25, backend/src/app.ts:1-50
Multi-Platform Extension
The platform supports expansion through a monorepo structure that facilitates the addition of new applications. Developers can create new Flutter applications in the apps/ directory while consuming shared logic from the packages/ directory.
Shared Design and API Packages
Consistency across new platforms is maintained via:
atlas_design_system: A Flutter package containing brand colors, typography tokens, and pre-styled UI components.atlas_api_client: A Dart package for standardized HTTP communication, JSON parsing, and authenticated requests.
Sources: README.md:126-146, packages/atlas_design_system/pubspec.yaml:1-15
Client Ecosystem
The architecture is designed to support four primary interfaces:
- Customer App: For service booking and lifecycle management.
- Cleaner App: For onboarding, scheduling, and job execution.
- Management App: For workforce and billing oversight.
- Web Portal: For administrative tasks and reporting.
Sources: README.md:173-180
Backend Scalability
The backend expansion relies on a clean architecture where new features are implemented as Use Cases and exposed through Controllers.
The diagram shows the request flow from various client applications through the load balancer to the application logic and persistence layers.
Sources: backend/src/app.ts:165-190, infrastructure/aws/cdk/lib/atlasclean-stack.ts:220-240
Domain Model Extension
New service types or business entities are added by updating the Prisma schema and generating the client.
| Entity | Description | Purpose |
|---|---|---|
User | Stores identity and roles | Supports CUSTOMER, ADMIN, CLEANER, and MANAGER roles. |
Cleaner | Stores professional data | Manages skills, availability, and background checks. |
Service | Defines offerings | Configures base price, duration, and categories. |
Booking | Manages transactions | Links users, cleaners, and services with status tracking. |
Sources: backend/src/infrastructure/database/prisma/schema.prisma:35-130
AI-Powered Intelligence Layer
Platform expansion includes enhancing the AtlasAIService to provide deeper operational insights. This service acts as a bridge between the core application and AI models.
AI Service Capabilities
The intelligence layer currently performs the following:
- Schedule Optimization: Ranks cleaners based on skills, rating, and location.
- Demand Prediction: Analyzes postal codes and service types to predict capacity needs.
- Dynamic Pricing: Calculates price adjustments based on demand multipliers and rush hour factors.
- Cleaner Recommendations: Identifies the best-fit professional for specific job requirements.
Sources: backend/src/infrastructure/services/AtlasAIService.ts:35-125
This sequence illustrates the integration of AI-driven decision-making within the booking workflow.
Sources: backend/src/infrastructure/services/AtlasAIService.ts:40-65
Infrastructure and Deployment
Expansion into new regions or environments is managed through AWS CDK or Terraform. Both implementations provide isolated network tiers and managed services.
Infrastructure Components
| Component | Implementation | Scaling Strategy |
|---|---|---|
| Compute | AWS ECS Fargate | Auto-scales based on CPU utilization (target 60%). |
| Database | Amazon RDS PostgreSQL | Multi-AZ deployment in production with storage auto-scaling. |
| Caching | Amazon ElastiCache Redis | Primary/Replica clusters with automatic failover. |
| Networking | VPC with 3 Tiers | Public, Application, and Data subnets across 2 AZs. |
Sources: infrastructure/aws/cdk/lib/atlasclean-stack.ts:35-150, infrastructure/terraform/main.tf:40-100
Multi-Environment CI/CD
The platform utilizes GitHub Actions for staged deployments:
- CI Pipeline: Validates code quality and security.
- Staging: Deploys to a non-production AWS account for validation.
- Production: Gated deployment using environment protections and AWS OIDC.
Sources: README.md:94-105, infrastructure/aws/cdk/package.json:7-10
Conclusion
Expanding the AtlasCleanAI platform requires a coordinated effort across the shared Flutter packages, the Node.js backend use cases, and the infrastructure-as-code definitions. The architecture supports horizontal scaling of the API tier and vertical scaling of the data tier, while the AI Intelligence Layer provides the flexibility to add complex optimization logic without disrupting the core domain.