How vizia-project/vizia-backend-service works
Main Components
• Microservices:
• Article Service: Handles scraping and serving eye health articles. Include an interaction node indicating that this service fetches and scrapes data.
• History Service: Manages storage and retrieval of user prediction/histories. Note its use of image uploads (via utilities) and validation.
• User Auth Service: Manages login/registration, user authentication, and authorization. Emphasize its route controllers and validations.
• Default Service: Provides OpenAPI documentation and may serve as the centralized documentation endpoint.
• Database Migrator: A separate module that runs KnexJS based database migrations for setting up the MySQL Cloud SQL database schema.
• Data Storage Components:
• Cloud SQL (MySQL): All microservices likely interact with a centralized MySQL database as indicated in the README.
• Cloud Storage: For storing any files (e.g., images uploaded in history or user auth services) as referenced in the environment variables.
• CI/CD Pipeline: Represent the .github workflows showing that GitHub Actions automates the deployment of individual services (article, history, user auth, and default).
• External Services / GCP Components: Include Google Cloud App Engine (for service hosting) and any managed services that support Cloud Storage and Cloud SQL.
Architectural Patterns and Design Principles
• Microservices Architecture: Emphasize that the project has separated concerns by having dedicated services for articles, history, and user authentication.
• Separation of Concerns: Each service is self-contained, managing its own routes, controllers, configurations, and utilities.
• Continuous Deployment: The presence of GitHub Actions workflows for each service demonstrates automated CI/CD practices.
• Configuration Management: Each service has its own environment configuration file (.env.example) ensuring that sensitive settings (like DB credentials and JWT secrets) are properly abstracted.
Relevant Technologies and Frameworks
• Language & Framework: JavaScript with HapiJS in each microservice.
• Database: MySQL via Cloud SQL, with migrations maintained in a dedicated package.
• Cloud: Google Cloud Platform components (App Engine, Cloud Storage, Cloud SQL).
• API Documentation: Swagger/OpenAPI via the default-service and vizia-openapi.yaml.
• Build and Deployment: GitHub Actions (under .github/workflows).