How digitaldemocracy2030/kouchou-ai works
Project Type and Purpose
• This is a full-stack web application designed to provide smart report generation and analysis for public input (broad listening). It is targeted to assist local government officials and political figures in their report and data analysis tasks.
• The system is built around multiple microservices including a RESTful backend API (using FastAPI), and two distinct Next.js frontends (one for report display and one for administrative tasks). There’s also a dummy server included for development and testing.
Analyzing the File Structure
• Top-Level Folders:
• “client” and “client-admin”: Two separate frontends for end-user report viewing and administrative management respectively.
• “server”: Contains the API, backend services, and the report generation pipeline, including additional subdirectories that support analysis (e.g., “broadlistening/pipeline” with stages, prompts, services, etc.).
• “utils/dummy-server”: Provides a mock API to support local or development setups.
• “.azure” and Azure-related files: Indicates that the project supports deployment templates and policies for hosting on Azure.
• “docker-compose” related files (such as .env.example, Dockerfiles, and compose.yaml): Confirms the use of containerization and orchestration.
• This clear separation is indicative of a microservices-like architecture with dedicated components.
Details from the README
• The README explicitly describes the architecture:
• API Service: Runs on port 8000. Its responsibilities include retrieving data, managing reports, and handling the processing pipeline.
• Client Frontend: Runs on port 3000. Focused on interactive visualization and user-friendly report viewing.
• Client-Admin Frontend: Runs on port 4000. Provides functionalities for report creation, editing, and system configuration.
• Additional utility (dummy-server) is provided to simulate API responses for development.
• It also highlights the importance of environment configuration (via .env files) and container orchestration via docker-compose, including static file output options.
Essential Elements with
• Data flow from client and client-admin to API.
• The sequential stages within the backend pipeline.
• Interactions with data storage (e.g., static metadata in server/public/meta/).
Final Advice
• That all critical pieces of the system (services, containers, pipelines, and deployment configurations) are represented.
• Keep clarity in the data flow and interactions for someone unfamiliar with the codebase to understand how the client, admin interface, and API work together.