How michal-szadkowski/coffee-inventory works
Based on our analysis of the file structure and README content, this coffee-inventory project is a full-stack application designed to manage coffee brewing and inventory data. It combines a .NET-based backend API (with a clear separation between API controllers, business services, and a separate data access library) and two separate frontend implementations – one using React (in the “frontend” folder) and another using Svelte (in the “frontend-svelte” folder). There are also Docker and GitHub Actions (CI/CD) configurations that suggest containerized deployment and automated builds.
Main Components
• Frontend Components:
– “React Frontend” (located in the “frontend” directory)
– “Svelte Frontend” (located in “frontend-svelte”)
• Backend Component:
– “Coffee-Inventory API” (in the backend/coffee-inventory-api folder)
– “Data Access Layer” (in backend/coffee-inventory-data-access) which includes Repository classes and MongoDB access functionality.
• Database:
– An external MongoDB instance (as indicated by the “MongoAccess.cs” file in the data-access folder).
• CI/CD/Deployment:
– GitHub Actions workflows (in the .github/workflows folder) for building and publishing both frontend and backend.
– Docker configurations (Dockerfile in each major component and compose.yml) indicating containerized deployment.
Inter-Component Relationships
• Inside the Backend, show a separation into:
– The API Layer (Controllers that expose endpoints),
– The Service Layer (business logic such as InventoryService and UsageService),
– The Data Access Layer (repositories interfacing with MongoDB).
• Optionally, illustrate Docker containers for each component and how docker-compose ties the services together.
Architectural Patterns and Design Principles
• Layered Architecture: Clearly partition the backend into controller (API), service/business logic, and repository (data access) layers.
• Separation of Concerns: Show how each layer or component has a distinct role, e.g., frontends handle user interactions, the API layer processes requests, and data-access handles persistence.
• Microservice-like Separation (if desired): Although this project is mostly monolithic, differentiating frontend and backend as separate deployable units can be emphasized.
• Containerization: Note the presence of Docker files and compose configurations that govern deployment.
Relevant Technologies and Frameworks
• . NET (C#) for the backend API.
• MongoDB for the data store, as evidenced by MongoAccess and repository patterns.
• React (TypeScript) for one frontend implementation.
• Svelte for the alternative frontend.
• GitHub Actions and Docker for CI/CD and deployment automation.
• Additionally, highlight any tooling (like ESLint, Tailwind CSS, etc.) visible in the frontend configurations if deemed relevant.