How oliverschlueter/mauerstrassenloewen works
Main Components
• Frontend: Represented by the "frontend" directory, built in Angular. Indicate UI components (views, interactive modules for trading simulations, quizzes, etc.) and client-side configuration (routing, styles, component logic).
• Backend Service: Under "services/backend", this is the main business logic implementation in Go. It likely exposes REST endpoints, handles API routing, and integrates with the frontend. Also note its API communication with the AI worker and data persistence logic.
• AI Worker Service: Located in "services/ai-worker". This service, also built in Go, interacts with AI models from OpenAI and ollama for the virtual coach functionality and simulation feedback.
• Monitoring Service: Found in "services/monitoring". It provides system health checks, logging, and potentially metrics via its own endpoints.
• External Dependencies: Identify databases (MongoDB, Redis) and external data providers (Yahoo Finance, TradingView API). Although not in the file tree directly, these components are mentioned in the README and are critical to understanding data flow.
• API Communication Layers: Highlight usage of REST, Websockets, and CloudEvents for communication between frontend and backend services.
Relationships and Interactions
• The AI Worker Service for processing and generating interactive AI responses.
• The databases (MongoDB, Redis) for data persistence.
• External APIs (Yahoo Finance, TradingView API) to fetch market data.
• Similarly, the Monitoring Service should interface with each of the backend services to collect logs, metrics, and event data.
• If applicable, note any bi-directional communication between the frontend and AI worker for real-time chat interactions.
Important Architectural Patterns
• Microservices: The separation of backend functionalities across distinct services (backend, AI worker, monitoring) shows a microservices-style architecture.
• Separation of Concerns: Clear division between presentation (Angular frontend), business logic (Go backend), AI processing (AI worker), and monitoring functions.
• Integration Patterns: Emphasize the role of API Gateways or middleware layers (for logging or security) as indicated by the structured placement of routes and middleware in the backend code.