How adrianrbp/monitoring-schedule works
Main Components
• Frontend Container: A Vue.js application (located in the "frontend" directory) that contains components, API calls (e.g., CompanyServiceApi.ts and AvailabilityApi.ts), and views for shift and availability management. It is containerized using a Devcontainer (in .devcontainer/vue-container).
• Backend Container: A Ruby on Rails API (located in the "backend" directory) with controllers, models, views (mostly for JSON responses using jbuilder), service objects, and tests. This container is defined in .devcontainer/rails-container and managed by Docker.
• Database: Though not explicitly mentioned as a separate container, the Rails configuration (database.yml) and migrations indicate the presence of a relational database supporting persistence.
• DevOps/Containerization: Docker Compose (defined in .devcontainer/docker-compose.yml) to orchestrate the two containers and manage the development environment.
• Testing Infrastructure: Includes the GitHub Actions workflows (.github/workflows) and e2e tests (using tools like Playwright and Jest) in the frontend and backend specs.
Relationships and Interactions
• The backend follows a typical MVC pattern: Controllers (e.g., company_services_controller, weeks_controller), Models (e.g., Engineer, CompanyService, Shift), and Service Objects (such as FetchShiftsService and WeekService). Show a breakdown or grouping of these underlying layers inside the Backend container.
• The backend, in turn, interacts with the database (as indicated by migration files, schema.rb, and seeds) – connect the Backend container to a Database component with a clear direction of data persistence and retrieval.
Important Architectural Patterns and Design Principles
• MVC (Model-View-Controller) in the Rails backend explaining the separation between concerns.
• Service/Worker Pattern: The presence of service objects in the backend for business logic encapsulation.
• Containerization: Using Devcontainers and Docker Compose to simplify dependency management and development environment setup.
• API-Driven Communication: REST endpoints that clearly define interaction points.
• Component-Based Architecture in the frontend: Vue.js components combined with mixins for managing business logic (e.g., useShiftManagement).
• Testing as a first-class citizen: Including specs for models, controllers, services, and e2e tests.
Relevant Technologies and Frameworks
• Backend: Ruby on Rails (API mode), Docker, RSpec, and Factory Bot.
• Frontend: Vue.js (with components, mixins, and supporting TypeScript integration), Tailwind CSS, and testing tools (Jest, Playwright).
• DevOps: Docker Compose, GitHub Actions, and Devcontainer configuration guiding the development and testing environments.