How log795-pfe020/stock-ai works
Main System Components
• Stock Prediction Service (located under stock-prediction): This segment includes subcomponents for model management (trained models in the "models" folder), data handling (data preprocessing and scripts under "data"), inference (API server and prediction service), and training (model training scripts).
• News Analyzer Service (located under news-analyzer): Contains API endpoints (routes), core configurations (logging, middleware [rate_limit]), sentiment models, and services for fetching/publishing news and handling sentiment analysis.
• Chatbot Interface (located under chatbot): Provides the chatbot functionality which uses a mock prediction and sentiment service, along with integration for OpenAI via environment variables.
• RabbitMQ Message Queue: Acts as the backbone for inter-service communication – used by at least the stock-prediction and news analyzer services (and possibly the chatbot) to enable distributed processing.
• Backend (Not fully contained in the file tree but referenced in the README): Mentioned as a C# service managing authentication and API coordination. Although its file structure is separate, include it as an external service that interfaces with RabbitMQ and other services.
• Docker & Deployment Components: Dockerfiles, docker-compose.yml, and network configurations indicate containerization as a primary deployment model. Represent these elements to show how services are isolated yet interconnected.
Relationships and Interactions
• If depicting the external C# backend, indicate its interaction with RabbitMQ and direct API calls (e.g., for authentication or additional business logic).
Architectural Patterns and Design Principles
• Extensibility: Show how models, data, and processing flows are modular (e.g., different folders for data processing, model training, etc.).
Relevant Technologies
• Optionally, add additional smaller components like logging, middleware (e.g., rate limiting), and API routing (e.g., Swagger UI endpoint for stock prediction) to underscore design details.