How mynk322/flowpulse works
Main Components
• Backend: Represent the ContextCoach Spring Boot application. Highlight its Java packages for controllers, models, services, repositories, configuration, and exception handling. Emphasize service components such as:
• Feature Complexity Analysis (see classes like ComplexityAnalyzer, FeatureClarifier, LLMService, etc.)
• Logging (using Logback with different log files & API request logging)
• Data initialization and MongoDB configuration (MongoConfig, init-db.sh, etc.)
• Frontend: Represent the React/TypeScript application “feature-clarify-analyze”. This includes:
• UI components (various React components like chat-interface, complexity-card, feature-upload, etc.)
• Main pages (Index, FeatureClarification, ComplexityReport, Logs, etc.)
• Services (API communication layer that uses axios, as defined in src/services/api.ts)
• Configuration files (e.g., vite.config.ts, tailwind.config.ts)
• Database: MongoDB plays a vital role in backend persistence. Also note integration with a vector database (based on files such as VECTOR_DB.md, PythonVectorDB.java, and DummyVectorDB.java) which is used for embedding code or querying related content.
• CLI Utilities: A command-line interface exists (under cli and in CLI scripts like feature-complexity-cli.sh) to interact with the backend functionality.
• Logging System: Both frontend and backend log events extensively. Indicate where logs are stored (e.g., logs directory on backend, persistent log storage and viewing components on frontend).
Relationships and Interactions
• Workflow that handles feature input, ambiguity detection, query preprocessing, vector database querying, code chunk collection, and finally the complexity analysis performed by the LLM.
• That the backend interacts with an external or local vector database (through interfaces like VectorDB, DummyVectorDB, PythonVectorDB) and utilizes LLM services (LLMService, DummyLLMService), integrated via service classes.
Architectural Patterns and Design Principles
• Separation of Concerns: Clearly separated backend and frontend with well-defined responsibilities. The backend uses MVC (with controllers, models, repositories, services) and the frontend follows component-based architecture.
• Modular Design: The presence of multiple packages/modules (CLI, config, controller, exception, logging, repository, service) in the backend indicates modularity. Similarly, the React structure is organized by components, pages, hooks, and services.
• External Dependencies: MongoDB integration (optional but recommended), use of Maven for backend builds, and Node.js/npm for frontend dependency management.
Specify the Technologies and Frameworks
• Backend: Java, Spring Boot, Maven, Logback, and MongoDB (for persistence). Also include specific classes responsible for vector database interactions and LLM calls.
• Frontend: React, TypeScript, Vite (for development server and build setup), Node.js, and npm.
• Utilities: Shell scripts (run-app.sh, start-backend.sh, start-frontend.sh) that orchestrate the startup process.