How mttm774/medical-record-users-api works
Main Components
• API Backend: The heart of the application is the .NET Core API (located in the “medical-record-users-api” folder) which includes controllers (for Health Check and Users) and data models (representing entities like User, Medico, HistoriaGeneral, etc.).
• Database: Although not explicitly defined by a separate folder, the project provides a Dockerfile (mssql.Dockerfile) and environment files (mssql.env), indicating that an instance of Microsoft SQL Server is used as the storage layer. In addition, there is a SQL initialization script (docker/create_db.sql) for setting up the database.
• Containerization Infrastructure: There are several Dockerfiles (for the API, for mssql), as well as docker-compose files (docker-compose.develop.yml and docker-compose.yml) that define how the containers for the API and database are built and orchestrated locally.
• Deployment & Orchestration: Kubernetes manifests (under the “kubernetes” directory, with separate configurations for development and staging) prepare the service for deployment to container orchestration environments, possibly within Azure Kubernetes Service (AKS) for staging.
• Configuration & Environment Management: The project uses multiple environment configuration files (.env.dev, .env.example, and various appsettings files), ensuring different settings for development, staging, and production.
• Middleware: There is custom middleware (UptimeMiddleware.cs) indicating that there is extra logic (e.g., tracking uptime) embedded within the API request pipeline.
• External Testing/Integration: The “postman” folder indicates that there is a dedicated collection for API testing, including different environments (local and staging).
• At the center, you have the API service (your .NET Core API) which should be clearly labeled inside a container.
• Link the API service with the Kubernetes deployment configuration. For Development, show a local orchestration scenario and for Staging, show integration with an Azure Kubernetes cluster with an Ingress controller.
Patterns & Design Principles
• Separation of Concerns: The clear separation between API logic (controllers, models, middleware) and database access.
• Environment-Specific Configuration: Different appsettings and Docker/Kubernetes configuration files for development versus staging.
• Containerization and Microservices: Emphasis on Docker container images for reproducibility and Kubernetes manifests for orchestration in multi-node deployments.
• API Health and Monitoring: A simple health check endpoint indicates built-in monitoring and reliability checks.
• Infrastructure-as-Code: Usage of Docker Compose and Kubernetes YAML files shows that deployment and infrastructure are managed alongside code.
Relevant Technologies, Frameworks, & Libraries
• .NET Core and the .NET Framework (as indicated by the badges in the README) for building the API.
• C# as the programming language.
• Docker for containerization; multiple Dockerfiles are present (for the API and SQL Server instance).
• Kubernetes for orchestration of the containers in both development & staging environments.
• Possibly Entity Framework (given the typical approach with MedicalbdContext and data model files) connecting to SQL Server.
• Nginx is mentioned as a proxy/reverse proxy layer in one of the Docker Compose commands.