How tomoki108/burny works
Main Components
• API Service (Backend):
• Represents the Go-based REST API found under the “api/” directory.
▪ Domain layer (domain, model packages): business models like User, Project, Sprint, etc.
▪ Handler layer (handler, middleware): responsible for routing HTTP requests, JWT authentication, API key handling, and error management.
▪ Usecase layer: contains business logic operations such as authentication, API key processing, project and sprint management.
▪ Infrastructure layer (db connections, repositories, email via SES): implementation for persistence and integrations.
▪ Server & Dependency Injection (server folder and di.go): bootstraps the service.
• Support for API documentation (Swagger files under api/docs and scenario tests in api/scenario).
• Web Application (Frontend):
• Representing the single-page application built on Vue.js located in “web/”.
• Components include:
▪ Main Application structure (App.vue, main.ts) and router configuration.
▪ API modules (api/ folder): handling interactions with the backend REST API endpoints.
▪ UI components (under components/): reusable pieces like dialogs, charts, and modals for project and sprint management.
▪ State management using stores (auth_store, projects_store, sprints_store) to maintain application state.
• Inclusion of testing with several test files highlighting the app’s reliability (web/tests).
• Infrastructure:
• Managed through Terraform files contained in “infra/”.
• Separate environments for dev, prod, and DNS configuration along with reusable modules (backend, frontend, github) for consistent cloud resource provisioning.
• Represents the deployment layer on Google Cloud.
• CI/CD Pipeline:
• Under “.github/” directory – Automated workflows that deploy both backend and frontend services.
• These workflows show integration with the source code repositories leading to containerization (see the Dockerfile for the API) and deployment sequences.
Relationships and Interactions
• The Web Frontend communicates with the API backend via RESTful HTTP calls.
• The API backend itself interacts with the database (and possibly other external services such as email via SES) through its infrastructure components.
• CI/CD workflows trigger deployments for both API and web services using GitHub Actions.
• The Infrastructure layer provides the resources (compute, networking, storage) needed by both the API and Web components in a cloud setting.
Architectural Patterns and Design Principles
• Clean architectural separation in the API layer: distinct separation between Domain, Handler, Usecase, and Infrastructure indicates domain-driven design principles.
• The Frontend follows component-based design (Vue single-file components) and uses state management to separate concerns.
• Infrastructure-as-Code (Terraform) ensures reproducible cloud resource provisioning.
• Microservice boundary is demarcated by having separate repositories for API and Web, which enhances maintainability and scalability.