A full‑stack, multi‑language, microservices‑based healthcare platform for Alzheimer’s care — integrating AI‑powered MRI analysis, cognitive progression tracking, and treatment planning.
Built with Node.js, Python FastAPI, React, Docker, and deployed to Google Kubernetes Engine (GKE) using GitOps with ArgoCD.
- Overview
- Architecture
- Repository Structure
- Technology Stack
- Key Tools & Integrations
- DevOps, CI/CD & GitOps Pipeline
- Getting Started (For New Developers)
- Local Development
- Testing
- Security & Quality
- Deployment
- Helpful Links
- License
Cognicare is a smart healthcare platform designed to support:
- 🩻 MRI Image Analysis – Detects Alzheimer’s patterns using AI models.
- 🧩 Cognitive Progression Tracking – Predicts decline through cognitive test data.
- 📋 Personalized Treatment Planning – Doctor availability scheduling and AI‑based plan suggestions.
- 👩⚕️ Multi‑Role Access – Dashboards for Admins, Doctors, Vendors, CSR staff, and Patients.
This repository contains:
- All source code for microservices and frontend.
- Configurations for automated builds, tests, and security scans.
- Integration with a separate GitOps manifest repo for Kubernetes deployments.
+-----------------+ +-----------------------------+
\| Frontend (SPA) | <-----> | Gateway Service (Node.js) |
+-----------------+ +-------------+---------------+
|
+--------------+---------------+--------------+
\| | | |
+----------v-----+ +------v---------+ +----v------------+ +----v------------+
\| MRI Service | | Progress Track | | Treatment Plan | | Other Services |
\| (FastAPI, AI) | | (FastAPI, AI) | | (FastAPI, Logic)| | (Future) |
+----------------+ +----------------+ +----------------+ +-----------------+
\ | | /
\ | | /
+------------+---------------+------------+
|
+-------v-------+
\| Google GAR | <-- Docker Images
+---------------+
|
+-------v-------+
\| Manifest Repo |
\| (Helm Charts) |
+---------------+
|
+-------v-------+
\| ArgoCD |
\| (GitOps) |
+---------------+
|
+-------v-------+
\| GKE Cluster |
+---------------+
academiay4-cognicare-app/
├── backend/
│ ├── gateway-service/ # Node.js API Gateway
│ ├── mri-service/ # FastAPI MRI AI analysis
│ ├── progress-tracking-service/ # FastAPI cognitive tracking
│ └── treatment-planning-service/# FastAPI treatment planning
├── frontend/ # React (Vite) frontend app
├── .github/workflows/ # CI/CD pipelines
├── sonar-project.properties # SonarQube config
└── README.md # You are here
- React (Vite) – Fast modern SPA framework
- Tailwind CSS – Utility-first CSS styling
- Firebase Auth – Secure authentication & social logins
- Role-based Routing – Different dashboards for each user type
- Node.js (Express) – API gateway and request routing
- JWT Authentication – Token-based authentication
- Yup Validation – Strong request schema validation
- Middleware – Centralized auth, header, and body validation
- FastAPI (Python) – High-performance API framework
- TensorFlow / Keras – AI model inference for MRI & cognitive tests
- Modular Design – Separate routers, services, schemas
- Docker – Containerization of all services
- Helm Charts – Kubernetes packaging for easy deployment
- GKE (Google Kubernetes Engine) – Managed Kubernetes cluster
- ArgoCD – GitOps continuous delivery
- Google Artifact Registry (GAR) – Docker image storage
| Tool / Service | Purpose |
|---|---|
| SonarQube | Code quality & maintainability analysis |
| Snyk | Detects vulnerabilities in dependencies |
| Trivy | Container image vulnerability scanning |
| GitHub Actions | CI/CD automation |
| pytest / Jest | Python / Node.js testing frameworks |
| Firebase | Authentication & real-time capabilities |
| Yup | Schema validation for API requests |
| JWT | Secure authentication between services |
This repository implements a modern DevOps workflow combining Continuous Integration (CI), Continuous Delivery (CD), and GitOps principles.
-
Developer Commit
- Code pushed to a feature branch or
main. - Pull Requests trigger branch-specific CI pipelines.
- Code pushed to a feature branch or
-
Automated Builds
- Each service has its own build pipeline:
- Gateway Service → Node.js build via
npm ci. - Python Services → Build via
pip install. - Frontend → React build via
npm run build.
- Gateway Service → Node.js build via
- Each service has its own build pipeline:
-
Automated Testing
- Gateway Service → Jest unit tests.
- Python Services →
pytestunit tests. - Code coverage results are collected for quality reports.
-
Static Code Analysis (Quality Gates)
- SonarQube checks:
- Code smells, bugs, security hotspots.
- Enforces minimum code coverage thresholds.
- PRs fail if quality gate is not passed.
- SonarQube checks:
-
Security Scanning
- Snyk → Scans dependencies for known vulnerabilities.
- Trivy → Scans built Docker images for OS & library vulnerabilities.
-
Docker Build & Push
- Multi-stage Docker builds minimize image size.
- Images tagged with
service-name:git-shaor semantic version. - Pushed to Google Artifact Registry (GAR).
-
Manifest Repo Update (GitOps Trigger)
- A bot workflow automatically updates:
image.tagin the Helm chart values.- Commits change to the cognicare-manifest repo.
- This triggers ArgoCD sync in the GKE cluster.
- A bot workflow automatically updates:
-
ArgoCD Deployment
- ArgoCD detects manifest changes.
- Syncs Kubernetes resources to match the Git state.
- Rollouts are monitored for success or rollback.
| Tool | Role |
|---|---|
| GitHub Actions | CI/CD automation for builds, tests, scans, and deployments |
| Docker | Containerization of microservices |
| Helm | Kubernetes deployment packaging |
| Google Artifact Registry (GAR) | Private image repository |
| SonarQube | Static code analysis and quality gates |
| Snyk | Dependency vulnerability scanning |
| Trivy | Container image security scanning |
| ArgoCD | GitOps continuous delivery for Kubernetes |
| Google Kubernetes Engine (GKE) | Managed Kubernetes runtime |
| Workflow | Purpose |
|---|---|
| gateway-ci.yaml | Builds & tests Gateway Service |
| mri-ci.yaml | Builds & tests MRI Service |
| progress-tracking-ci.yaml | Builds & tests Progress Tracking Service |
| treatment-planning-ci.yaml | Builds & tests Treatment Planning Service |
| frontend-ci.yaml | Builds & tests Frontend |
| build-and-push.yaml | Multi-service Docker build & push to GAR |
| helm-tag.yaml | Updates manifest repo with new image tags |
| sonarqube-analysis.yaml | Runs SonarQube quality analysis |
| snyk-scan.yaml | Dependency vulnerability scanning |
| trivy-scan.yaml | Container image vulnerability scanning |
flowchart LR
A[Developer Commit] --> B[GitHub Actions CI]
B --> C[Build & Unit Tests]
C --> D[SonarQube Analysis]
C --> E[Snyk & Trivy Scans]
D --> F[Docker Build]
E --> F
F --> G[Push Image to GAR]
G --> H[Update Manifest Repo]
H --> I[ArgoCD Sync Trigger]
I --> J[GKE Deployment]
J --> K[Production Ready]
This repo is inluded in the below link check that repo for gitops specific details
https://github.com/AcademiaY4/CogniCare-Manifest- Single Source of Truth → The manifest repo (
cognicare-manifest) defines what’s deployed. - Automated Sync → ArgoCD continuously reconciles the cluster state with Git.
- Safe Rollouts → Rollbacks are as simple as reverting a Git commit.
The system supports multi-environment deployments via separate Helm values files in the manifest repo:
| Environment | Branch | Deployment |
|---|---|---|
| Dev | develop |
GKE Dev Namespace |
| Staging | staging |
GKE Staging Namespace |
| Production | main |
GKE Production Namespace |
- Node.js 18+
- Python 3.10+
- Docker
- Helm
- Google Cloud SDK (optional)
- kubectl
git clone https://github.com/academiay4/cognicare-app.git
cd cognicare-appEach service requires its own .env file.
Example for Gateway Service:
PORT=8080
JWT_SECRET=your-secret
CORS_ORIGIN=http://localhost:5173cd frontend
npm install
npm run devRuns at → http://localhost:5173
cd backend/gateway-service
npm install
npm run devRuns at → http://localhost:8080
cd backend/mri-service
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8001Runs at → http://localhost:8001
- Gateway Service
cd backend/gateway-service
npm run test- Python Services
cd backend/mri-service
pytest| Tool | Purpose |
|---|---|
| SonarQube | Code quality gates |
| Snyk | Dependency vulnerabilities |
| Trivy | Container image scanning |
| JWT | Secure API access |
| Yup | Strong API input validation |
Deployment is fully automated via:
- GitHub Actions → Build, test, scan, push to GAR
- Manifest Repo → Updated with new image tag
- ArgoCD → Syncs to GKE
Manual deployment (for testing):
helm upgrade --install cognicare ./helm-chart \
-f environments/dev/values.yaml \
--namespace cognicare --create-namespaceLicensed under the MIT License. See the LICENSE file.