How yorunor/benches-docker-front works
Main system components
• Frontend (Web Client):
• Located in the “web” directory.
• Built with Vue.js, uses Vite for build tooling, and manages state, views, and layouts.
• Communicates with the backend via the GraphQL API.
• Configured with Firebase for authentication.
• Backend API:
• Found in the “api” directory.
• Written in Python (evidenced by files like manage.py, asgi.py, and the presence of migrations and models).
• Uses GraphQL setup (with directories for schemas, resolvers for queries and mutations, and custom types).
• Exposes endpoints for both the operation interface (e.g., /signin and task management) and for administrative tasks (/admin).
• Includes management commands (located in api/libs/management) for operations like seeding and migrations.
• Database:
• Appears in the “db” directory (docker initialization scripts, e.g., init-user-psql.sh).
• Likely PostgreSQL (suggested by environment settings in .env.local).
• External Services:
• Firebase used for authentication (configurations present in web/.env.development and parameters in the API’s environment file).
• External LLM servers (e.g., TGI, vllm, OpenAI, and others) are required as per the README.
• Langfuse for logging/monitoring (running on its container and connected via defined environment variables).
• Docker Compose and Containerization:
• Docker Compose manages different containers for the API, Frontend, DB, and Langfuse.
• Each container has its own Dockerfile (located under api/containers/development and web/containers/development).
Relationships and interactions
• The API also depends on external LLM services to process requests (such as generation tasks), so illustrate outbound connections to external “LLM Service” components.
• Authentication is handled via Firebase on the Frontend (and possibly on the backend for user management), so note this connection.
• Langfuse is integrated into the API environment (using Langfuse keys), and a container is exposed on port 3000; include this as a separate component feeding logs or metrics.
Architectural Patterns and Principles
• Separation of Concerns: The project is split between frontend and backend; these are clearly modularized in separate directories and run in different containers.
• GraphQL API: The backend adopts a GraphQL controller pattern with resolvers for queries and mutations; representing this layered API architecture is crucial.
• Containerization: Docker Compose orchestrates multi-container deployment. Emphasize the containerized setup.
Relevant Technologies and Frameworks
• Frontend: Vue.js, Vite, and supporting libraries including Firebase integration.
• Backend: Python with a GraphQL framework (possibly Django or FastAPI with Graphene or similar, given the project structure).
• Database: PostgreSQL.
• Infrastructure: Docker and Docker Compose.
• Others: Firebase for authentication, third-party LLM services, and Langfuse for logging.