How mehrakartikay/distributed-frontend-code-generator works
This repository implements a microservice platform for AI-assisted project creation. The principal workflow is a user request to generate code, stream the model response, parse it into chat events, and asynchronously store generated files in a workspace; project management and deployment are separate workspace capabilities. Account authentication and paid subscriptions support the platform, while the gateway and shared library provide cross-service infrastructure. The README is empty, and some service entry points and integrations were not sampled, so those links are omitted or marked unverified.
Main entry points: AiGenerationServiceImpl.java AI generation · FileStorageConsumer.java File event consumer · AuthController.java Authentication API · BillingController.java Billing API
Components 24
Platform access
- API gateway
api-gateway/src/main/java/com/distributed_lovable/api_gateway
Accounts and billing
- Authentication API
account-service/src/main/java/com/distributed_lovable/account_service/Controller/AuthController.java - Auth service
account-service/src/main/java/com/distributed_lovable/account_service/service/impl/AuthServiceImpl.java - User records
account-service/src/main/java/com/distributed_lovable/account_service/repository/UserRepository.java - Billing API
account-service/src/main/java/com/distributed_lovable/account_service/Controller/BillingController.java - Subscriptions
account-service/src/main/java/com/distributed_lovable/account_service/service/SubscriptionService.java - Payment processor
account-service/src/main/java/com/distributed_lovable/account_service/service/PaymentProcessor.java
AI generation
- Chat API
intelligence-service/src/main/java/com/distributed_lovable/intelligence_service/controller/ChatController.java - AI generation
intelligence-service/src/main/java/com/distributed_lovable/intelligence_service/service/impl/AiGenerationServiceImpl.java - Language model
- Chat records
intelligence-service/src/main/java/com/distributed_lovable/intelligence_service/repository - Response parser
intelligence-service/src/main/java/com/distributed_lovable/intelligence_service/llm/LlmResponseParser.java - Usage tracking
intelligence-service/src/main/java/com/distributed_lovable/intelligence_service/service/UsageService.java - Workspace client
intelligence-service/src/main/java/com/distributed_lovable/intelligence_service/client/WorkspaceClient.java
Project workspace
- Project API
workspace-service/src/main/java/com/distributed_lovable/workspace_service/controller/ProjectController.java - Project service
workspace-service/src/main/java/com/distributed_lovable/workspace_service/service/ProjectService.java - Deployment service
workspace-service/src/main/java/com/distributed_lovable/workspace_service/service/DeploymentService.java - Project records
workspace-service/src/main/java/com/distributed_lovable/workspace_service/repository - File event consumer
workspace-service/src/main/java/com/distributed_lovable/workspace_service/consumer/FileStorageConsumer.java - Project file service
workspace-service/src/main/java/com/distributed_lovable/workspace_service/service/ProjectFileService.java - Processed events
workspace-service/src/main/java/com/distributed_lovable/workspace_service/repository/ProcessedEventRepository.java
Shared contracts
- Kafka event broker
- Shared security and contracts
common-lib/src/main/java/com/distributed_lovable/common_lib
Other components
- Platform user
Connections 21
- Platform user → API gateway: requests
- API gateway → Authentication API: routes
- Authentication API → Auth service: delegates
account-service/src/main/java/com/distributed_lovable/account_service/Controller/AuthController.java - Auth service → User records: reads and saves
account-service/src/main/java/com/distributed_lovable/account_service/service/impl/AuthServiceImpl.java - Authentication API → Billing API: uses billing
- Billing API → Subscriptions: queries
account-service/src/main/java/com/distributed_lovable/account_service/Controller/BillingController.java - Billing API → Payment processor: processes payments
account-service/src/main/java/com/distributed_lovable/account_service/Controller/BillingController.java - Platform user → Chat API: sends prompt
- Chat API → AI generation: dispatches
- AI generation → Language model: streams prompt
intelligence-service/src/main/java/com/distributed_lovable/intelligence_service/service/impl/AiGenerationServiceImpl.java - AI generation → Response parser: parses response
intelligence-service/src/main/java/com/distributed_lovable/intelligence_service/service/impl/AiGenerationServiceImpl.java - AI generation → Chat records: persists chat
intelligence-service/src/main/java/com/distributed_lovable/intelligence_service/service/impl/AiGenerationServiceImpl.java - AI generation → Usage tracking: records tokens
intelligence-service/src/main/java/com/distributed_lovable/intelligence_service/service/impl/AiGenerationServiceImpl.java - AI generation → Workspace client: provides tools
intelligence-service/src/main/java/com/distributed_lovable/intelligence_service/service/impl/AiGenerationServiceImpl.java - AI generation → Kafka event broker: publishes file events
intelligence-service/src/main/java/com/distributed_lovable/intelligence_service/service/impl/AiGenerationServiceImpl.java - Platform user → Project API: manages projects
- Project API → Project service: delegates
workspace-service/src/main/java/com/distributed_lovable/workspace_service/controller/ProjectController.java - Project API → Deployment service: requests deployment
workspace-service/src/main/java/com/distributed_lovable/workspace_service/controller/ProjectController.java - File event consumer → Kafka event broker: consumes and publishes
workspace-service/src/main/java/com/distributed_lovable/workspace_service/consumer/FileStorageConsumer.java - File event consumer → Project file service: saves file
workspace-service/src/main/java/com/distributed_lovable/workspace_service/consumer/FileStorageConsumer.java - File event consumer → Processed events: checks and records
workspace-service/src/main/java/com/distributed_lovable/workspace_service/consumer/FileStorageConsumer.java