GitTogether is a small web app where students find teammates for projects and hackathons. You make a profile with your skills, department and availability, browse other students, and send connection requests. You can also upload a resume.
This repository is also my DevOps capstone. It takes the app from my laptop to a Kubernetes cluster on AWS, with tests, security scanning, Terraform, GitOps and monitoring on the way. The cluster screenshots below come from a real run on Amazon EKS.
| Profile page | Connections |
|---|---|
![]() |
![]() |
The slides are in demo/ as slides.pdf and slides.pptx. The demo video is
demo/GitTogether-demo.mp4. GitHub can't play it in the browser, so use the
download button on that page. The same file is on the
releases page.
| Module | What | Section in this README | Proof |
|---|---|---|---|
| M1 | App: React, FastAPI, Postgres | Architecture, API | app, profile |
| M2 | Tests and lint | Tests and linting | pytest |
| M3 | Git history | Repository layout | commits |
| M4 | Docker and Compose | Run locally | compose |
| M5 | CI/CD pipeline | CI/CD pipeline | green run, GHCR images |
| M6 | Trivy scan | Security | backend, frontend |
| M7 | Terraform on AWS | Infrastructure (Terraform) | plan, apply, VPC, EKS, destroy |
| M8 | Kubernetes, Helm, ArgoCD, HPA | Kubernetes / Helm | pods, ArgoCD, HPA, troubleshooting |
| M9 | Prometheus and Grafana | Observability | Prometheus, Grafana |
| M10 | Slides, video and docs | this README, demo/ |
slides.pdf, demo video |
The demo video goes through the slides. The live part, what I ran on the EKS cluster, is written up in this section instead, with the commands I used and screenshots of the results. The screenshots here are from the real cluster.
| Path | What it is |
|---|---|
backend/app/main.py |
FastAPI app: routers, /health, /ready, /metrics |
backend/app/routers/ |
Auth, profiles and connections endpoints |
backend/app/models.py, schemas.py |
SQLAlchemy tables and Pydantic request/response shapes |
backend/app/security.py, access.py |
argon2 passwords, JWT cookie, the owner and privacy checks |
backend/alembic/versions/ |
The two database migrations (profiles, then accounts and connections) |
backend/tests/ |
65 pytest tests on a separate test database, 90% coverage gate |
frontend/src/ |
React app (App.jsx, components/, api.js) with Vitest tests |
backend/Dockerfile, frontend/Dockerfile |
Both run as non-root; the frontend is a two-stage Node build into Nginx |
.github/workflows/gittogether-ci.yml |
The pipeline: 7 jobs, actions pinned to commit SHAs |
terraform/ |
VPC, EKS, node group, KMS key, Pod Identity for the EBS driver |
helm/gittogether/ |
One chart for both clusters (values-kind.yaml, values-eks.yaml) |
argocd/application.yaml |
The ArgoCD Application: auto sync, prune and self-heal |
monitoring/ |
Prometheus and Grafana values, and the API dashboard |
k8s/ |
Namespace with Pod Security labels, Traefik and metrics-server values |
Choices worth knowing about:
- Images are tagged with the commit SHA, never
latest, so every running pod traces back to one commit. - The namespace enforces the Kubernetes
restrictedPod Security level, so every pod runs as non-root with all capabilities dropped. - Secrets (database password, JWT key) are created by
scripts/create-secrets.shat deploy time and are not in git. - Worker nodes sit in private subnets; only the load balancer and the NAT gateway are public.
A push to main starts the pipeline: secrets (gitleaks), backend (ruff, pytest, coverage gate),
frontend (eslint, vitest, build), terraform (fmt, validate), helm (lint and kubeconform validation),
config-scan (Trivy on the IaC), and images. The images job builds both images, scans them with
Trivy (it fails on fixable HIGH or CRITICAL), and pushes them to GHCR tagged with the commit SHA. If
any earlier job fails, nothing is pushed.
The pipeline, a green run,
the image jobs, the images in GHCR.
A live push: I added one comment line to scripts/load-test.sh and pushed it to main
(commit 483a90b). The pipeline started by itself and every job passed in about 2 minutes
(the run):
The backend image from that run is in GHCR with the commit SHA as its tag:
cd terraform
terraform init
terraform plan # 59 resources to add
terraform apply
terraform output # cluster name, region, kubeconfig command
terraform destroy # when doneplan, apply, VPC, subnets, EKS cluster, worker nodes, destroy. Details are in Infrastructure (Terraform).
kubectl get pods -n gittogether
kubectl get svc -n gittogether
kubectl get ingress -n gittogether
helm list -n gittogetherpods, services and the Helm release,
nodes, the app through the load balancer.
The Ingress sends /api to the backend and / to the frontend:
Details are in Kubernetes / Helm.
ArgoCD watches this repo. A change to helm/gittogether/values.yaml on main is rolled out by ArgoCD,
and a change made by hand in the cluster is reverted (self-heal).
Synced application, resource tree.
Self-heal test: I scaled the frontend from 2 to 4 pods by hand with
kubectl scale deploy gittogether-frontend -n gittogether --replicas=4. ArgoCD saw that the cluster no
longer matched git and removed the two extra pods again within a second:
Details are in GitOps with ArgoCD.
Prometheus targets showing the backend pods as UP,
the /metrics output and
the Grafana dashboard. Details are in Observability.
scripts/load-test.sh sends traffic at the load balancer. CPU went past the 70% target and the HPA
scaled the backend from 2 to 5 pods: load test,
HPA scaling, the new pods.
Details are in Autoscaling.
Developer ββ git push βββΊ GitHub
β
βΌ
GitHub Actions pipeline
ββββββββββββββββ¬βββββββββββββββββ¬βββββββββββββββββββ¬βββββββββββββββββ¬ββββββββββββββββββ
β gitleaks β backend β frontend β terraform β trivy config β
β secret scan β ruff + pytest β eslint + vitest β fmt + validate β (IaC, report) β
β β (β₯90% cover) β + vite build β β β
ββββββββββββββββ΄ββββββββ¬βββββββββ΄βββββββββ¬ββββββββββ΄βββββββββββββββββ΄ββββββββββββββββββ
βΌ βΌ
docker build βββΊ Trivy image scan (fails on HIGH/CRITICAL) βββΊ push to GHCR
(tag = commit SHA)
AWS (Terraform) Kubernetes (Helm)
βββββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββββββββ
β VPC 10.20.0.0/16, 2 AZs β β Ingress / βββΊ frontend (nginx, React) β
β public subnets: load balancer, NAT β ββββββΊ β /api βββΊ backend (FastAPI) β
β private subnets: EKS worker nodes β β β β
β EKS 1.35, 2 Γ m7i-flex.large β β PostgreSQL (PVC) β
βββββββββββββββββββββββββββββββββββββββββ β HPA on backend Β· Prometheus + Grafana β
βββββββββββββββββββββββββββββββββββββββββββββ
| Layer | Tools |
|---|---|
| Frontend | React 18, Vite 5, plain CSS; served by non-root Nginx 1.30 |
| Backend | Python 3.12, FastAPI, SQLAlchemy 2, Alembic, Pydantic, Uvicorn; argon2 password hashing (pwdlib), JWT sessions (PyJWT) |
| Database | PostgreSQL 16 |
| Quality | pytest + pytest-cov (90% gate), ruff, ESLint, Vitest |
| Security | gitleaks, Trivy (image + config scans), GitHub code scanning, Dependabot |
| Containers | Docker (multi-stage frontend, non-root users), Docker Compose |
| CI/CD | GitHub Actions, GitHub Container Registry (GHCR) |
| Infrastructure | Terraform, AWS VPC, EKS, KMS |
| Kubernetes | Helm, Ingress (Traefik), HPA, metrics-server, Pod Security Admission (restricted), kind for local clusters |
| Observability | Prometheus, Grafana, /metrics via prometheus-fastapi-instrumentator |
backend/ FastAPI app, Alembic migrations, tests
frontend/ React app, Nginx config, tests
terraform/ AWS VPC and EKS
helm/ Helm chart for the app
argocd/ ArgoCD Application
k8s/ namespace, kind and EKS add-on values
monitoring/ Prometheus and Grafana values, dashboard
scripts/ install, secrets and load-test scripts
troubleshooting/ two broken manifests and how I fixed them
demo/ screenshots and slides
.github/ CI/CD pipeline and Dependabot config
| Method | Path | Description |
|---|---|---|
| GET | /health |
Liveness: the process is up |
| GET | /ready |
Readiness: database reachable (503 if not) |
| GET | /metrics |
Prometheus metrics |
| POST | /api/auth/register |
Create an account (email + password) and log in |
| POST | /api/auth/login Β· /api/auth/logout |
Start / end a session |
| GET | /api/auth/me |
The logged-in user and their profile id |
| GET | /api/profiles |
List profiles. Query: skill, q (name/department), availability, limit (β€100), offset |
| GET | /api/profiles/stats |
Totals per availability, limited count, top public skills |
| GET | /api/profiles/{id} |
One profile |
| POST | /api/profiles |
Create your profile (one per account) π |
| PUT | /api/profiles/{id} |
Update your profile (partial) π owner |
| DELETE | /api/profiles/{id} |
Delete your profile π owner |
| PUT Β· DELETE | /api/profiles/{id}/resume |
Upload (PDF, β€ 5 MB) or remove your resume π owner |
| GET | /api/profiles/{id}/resume |
Download a resume (subject to the privacy rule) |
| GET | /api/connections |
Your connections π |
| GET | /api/connections/requests |
Your pending requests: incoming and outgoing π |
| POST | /api/connections/requests |
Send a connection request { "user_id": β¦ } π |
| POST | /api/connections/requests/{id}/accept Β· /decline |
Answer a request you received π |
| DELETE | /api/connections/requests/{id} |
Cancel a request you sent π |
| DELETE | /api/connections/{user_id} |
Remove a connection π |
π = requires login. Sessions use an httpOnly, SameSite=Lax cookie holding a signed JWT (24 h);
passwords are hashed with argon2 and never stored in plain text.
Connections: a request stays pending until the other person accepts (declining or cancelling deletes it). Accepted connections are mutual.
Privacy rule: a LIMITED profile's skills, LinkedIn and resume are visible only to its owner and
their connections. The API removes those fields before responding, so the data never reaches anyone
else's browser, and hidden skills are left out of skill search.
FastAPI also generates interactive API docs (Swagger UI) at http://localhost:8000/docs:
Requirements: Docker Desktop.
cp .env.example .env # optional: change local database credentials
docker compose up --build- App: http://localhost:3000
- API docs: http://localhost:8000/docs
All three services start and report healthy, and the app loads at localhost:3000:
Postgres is not published on a host port; inspect it with docker compose exec postgres psql -U gittogether.
Stop with docker compose down (add -v to delete the database volume).
cd backend && pip install -r requirements-dev.txt && ruff check . && pytest -v
cd frontend && npm ci && npm run lint && npm testThe backend tests run against a separate SQLite database, not the real one. 65 tests pass with 99% coverage, and the pipeline fails below 90%:
The workflow is .github/workflows/gittogether-ci.yml. It runs on
every push and pull request to main (changes to docs only are skipped), and I can also start it by hand
with Run workflow.
- First, these run at the same time:
- gitleaks scans the whole git history for secrets
- backend: ruff and pytest, failing below 90% coverage
- frontend: ESLint, Vitest and the build
- Terraform:
fmtandvalidate - Helm: lint, then kubeconform checks the rendered manifests
- Trivy scans the Dockerfiles, Kubernetes and Terraform files (report only, shown in the Security tab)
- Then, for each image: Docker build, a Trivy scan that fails on fixable HIGH or CRITICAL
problems, and a push to
ghcr.io/ahmadanzar/gittogether/{backend,frontend}tagged with the full commit SHA. Pull requests run everything except the push.
Third-party actions are pinned to full commit SHAs, with the version in a comment next to each one. Dependabot opens pull requests to update them. I pin by SHA because the tags of the Trivy action were rewritten upstream in 2026.
A green run (open it on GitHub), and the summary of the image jobs:
The images in the GitHub Container Registry, tagged with the commit SHA (never latest):
| Backend | Frontend |
|---|---|
![]() |
![]() |
The commit history on main:
-
Trivy image scan. Trivy checks the packages inside each image (Debian or Alpine, Python, npm) against lists of known vulnerabilities. The pipeline fails if it finds a HIGH or CRITICAL one that already has a fix. My first scan found 3 HIGH problems in Starlette (for example CVE-2025-62727, where crafted
Rangeheaders can be used for a denial of service) and 41 in the oldnginx 1.27/ Alpine 3.21 base image. I upgraded FastAPI, which pulled in a newer Starlette, and moved tonginx-unprivileged:1.30-alpine. After that both images scanned clean.Backend image Frontend image 

-
Trivy config scan checks the Terraform, Dockerfiles and Kubernetes files. I accepted a few findings on purpose (public EKS endpoint, open node egress, no paid CloudWatch logs). The reasons are in
.trivyignore. -
gitleaks fails the pipeline if a secret appears anywhere in the git history.
-
Containers run as non-root users (backend uid 10001, frontend uid 101). Nginx also sends security headers, including a strict Content-Security-Policy, and hides its version.
-
No credentials in git.
.env,*.tfvarsand the Terraform state are gitignored. AWS credentials come from the local AWS CLI profile.
See terraform/README.md. In short: a VPC with 2 public and 2 private subnets in
two availability zones, one NAT gateway, and an EKS 1.35 cluster whose Secrets are encrypted with KMS.
The 2 worker nodes (m7i-flex.large) sit in the private subnets. It costs about $0.40 an hour while
running, so I create it for the demo and destroy it the same day.
cd terraform
terraform init && terraform plan
terraform apply
aws eks update-kubeconfig --region ap-south-1 --name gittogether-eksThe AWS free plan only allows a few instance types and 5 vCPUs in total (t3.medium was rejected), so I
used m7i-flex.large. The EBS driver gets its AWS permissions through EKS Pod Identity, because pods on
current EKS nodes can't use the node's own credentials.
What it looked like:
terraform apply finished |
terraform destroy finished |
|---|---|
![]() |
![]() |
The app is packaged as a Helm chart in helm/gittogether:
| Resource | Details |
|---|---|
Backend Deployment |
2 to 5 replicas (the HPA scales on CPU, target 70%). An init container runs alembic upgrade head first, and a Postgres advisory lock makes the replicas take turns. Liveness check /health, readiness check /ready. |
Frontend Deployment |
2 replicas of non-root nginx. The backend address for /api comes from BACKEND_URL. |
PostgreSQL StatefulSet |
1 replica with its own volume (PersistentVolumeClaim). The volume is deleted on helm uninstall, so no disk is left behind. |
Services |
ClusterIP for the backend and frontend, headless for Postgres. |
Ingress |
/api goes to the backend and / to the frontend (Traefik). /metrics and /ready are not exposed (requests for them end up on the frontend's index.html). /health is passed to the backend by nginx. |
HorizontalPodAutoscaler, PodDisruptionBudgets |
The HPA scales the API on CPU. The budgets keep at least one pod of each component running while a node is drained. |
ServiceMonitor |
Lets Prometheus scrape /metrics (turned on with the monitoring stack). |
Security: the gittogether namespace enforces the Kubernetes restricted Pod Security level. A pod
is only accepted if it runs as non-root, has a read-only root filesystem, can't escalate privileges, drops
all Linux capabilities and uses the RuntimeDefault seccomp profile. The passwords and the JWT key are
not in git or in the values files. scripts/create-secrets.sh creates a Kubernetes Secret with random
values, and the chart uses it.
Ingress controller: I used Traefik. The popular ingress-nginx project was retired by the Kubernetes
project in March 2026 and no longer gets security fixes. Traefik works with the same standard Ingress
resource.
kind create cluster --config k8s/local/kind-config.yaml # maps host ports 80/443 to the cluster
helm repo add traefik https://traefik.github.io/charts
helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server/
helm upgrade --install traefik traefik/traefik --version 41.6.0 -n traefik --create-namespace -f k8s/local/traefik-values.yaml
helm upgrade --install metrics-server metrics-server/metrics-server --version 3.14.0 -n kube-system -f k8s/local/metrics-server-values.yaml
kubectl apply -f k8s/namespace.yaml
scripts/create-secrets.sh
helm upgrade --install gittogether helm/gittogether -n gittogether -f helm/gittogether/values-kind.yaml
kubectl get pods,svc,ingress,hpa -n gittogetherOpen http://gittogether.localhost. Watch autoscaling with scripts/load-test.sh and
kubectl get hpa -n gittogether -w.
After terraform apply and aws eks update-kubeconfig ...:
helm upgrade --install traefik traefik/traefik --version 41.6.0 -n traefik --create-namespace -f k8s/eks/traefik-values.yaml
kubectl apply -f k8s/namespace.yaml
scripts/create-secrets.sh
helm upgrade --install gittogether helm/gittogether -n gittogether -f helm/gittogether/values-eks.yaml
kubectl get svc -n traefik traefik # EXTERNAL-IP = the AWS load balancer hostname to openvalues-eks.yaml also creates a default gp3 StorageClass (new EKS clusters have none).
metrics-server is installed on EKS by Terraform as a managed add-on.
Nodes and pods on EKS:
Pods, services and the Helm release (from the first run, deployed with helm directly; later runs
let ArgoCD deploy the same chart):
Checking the backend directly through a port-forward, and its Prometheus metrics:
/health |
/metrics |
|---|---|
![]() |
![]() |
I ran scripts/load-test.sh against the load balancer. The backend CPU went to about 150% of the 70%
target, and the HPA grew the backend from 2 to 5 pods. When the load stopped, CPU dropped back.
The pipeline tags images with the commit SHA. Set image.tag in helm/gittogether/values.yaml to that
SHA and run helm upgrade (or just push it and let ArgoCD sync, see below). Roll back with
helm rollback gittogether <revision> -n gittogether.
argocd/application.yaml tells ArgoCD to deploy the chart from this repo
(main, helm/gittogether, values-eks.yaml) with automated sync, pruning and self-heal. So git decides
what runs: a manual change in the cluster is undone, and a new commit is rolled out by ArgoCD.
On EKS, use the script. It installs ArgoCD and the Application in the right order (see the known issue below):
scripts/install-argocd-eks.shOn the local kind cluster the plain steps are enough:
kubectl create namespace argocd
kubectl apply -n argocd --server-side -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.5.5/manifests/install.yaml
kubectl apply -f k8s/namespace.yaml # namespace with Pod Security labels
scripts/create-secrets.sh # DB password + JWT key, never in git
kubectl apply -f argocd/application.yamlThen open the UI:
kubectl port-forward -n argocd svc/argocd-server 8081:443 # https://localhost:8081, user admin
kubectl get secret -n argocd argocd-initial-admin-secret -o jsonpath='{.data.password}' | base64 -dKnown issue on EKS 1.35 and 1.36. On a new, empty cluster the API server returns
503when asked for the OpenAPI schema in protobuf format (/openapi/v2), although the JSON version works. This happens while two metrics APIs are registered:v1.metrics.eks.amazonaws.com(from EKS) andv1beta1.metrics.k8s.io(from metrics-server). ArgoCD needs that schema, so the Application staysUnknownwith the error "failed to load open api schema ... unable to handle the request". Removing both APIs fixes it, removing only one doesn't.scripts/install-argocd-eks.shremoves them, waits for the first sync, and then registers the metrics-server API again so the HPA keeps working. I saw this on both versions and did not find the root cause. A similar problem is reported in argo-cd#25976. A side effect is that ArgoCD may notice changes only at its next refresh (up to 3 minutes). In my last run the self-heal test below reacted within a second.
ArgoCD showing the app as Synced and Healthy, and the resource tree:
Release flow: CI pushes ghcr.io/ahmadanzar/gittogether/<component>:<commit SHA>. I set image.tag in
helm/gittogether/values.yaml to that SHA and push, and ArgoCD rolls it out. To roll back, I revert the
commit. On the local kind cluster, change valueFiles to values-kind.yaml.
troubleshooting/ contains two deliberately broken manifests (an image that doesn't exist, a Service
whose selector matches nothing). I ran both on the EKS cluster, found the cause with kubectl describe
and by comparing labels, and fixed them. The full steps with screenshots are in
troubleshooting/README.md.
The backend exposes Prometheus metrics at /metrics (request counts, latency and sizes for each
endpoint), using prometheus-fastapi-instrumentator.
kube-prometheus-stack runs Prometheus and Grafana in the cluster.
The chart's ServiceMonitor tells Prometheus to scrape every backend pod, and it is turned on in
values-kind.yaml and values-eks.yaml. The ServiceMonitor needs the stack's CRDs, so install monitoring
before the app (ArgoCD keeps retrying until they exist). One script does it:
scripts/install-monitoring.sh
kubectl port-forward -n monitoring svc/monitoring-kube-prometheus-prometheus 9090 # Status -> Targets
kubectl port-forward -n monitoring svc/monitoring-grafana 3001:80 # http://localhost:3001, user admin
kubectl get secret -n monitoring monitoring-grafana -o jsonpath='{.data.admin-password}' | base64 -dIn Prometheus, Status -> Targets shows both backend pods as UP. The GitTogether API dashboard in
Grafana (monitoring/dashboards/gittogether-api.json) loads
by itself: the script stores it in a ConfigMap labelled grafana_dashboard=1, and Grafana's sidecar picks
it up. It shows how many backend pods are up, requests per second, the share of 5xx errors, p95 latency
(overall and per endpoint), responses by status class and backend CPU. scripts/load-test.sh generates
the traffic.
Prometheus targets (both backend pods are UP) and the Grafana dashboard during the load test:
- No email verification, password reset or login rate limiting yet; anyone can register with any email.
- Resumes are stored in PostgreSQL; at larger scale they would move to object storage (Amazon S3).
- Profiles created before accounts existed have no owner and are read-only.
- PostgreSQL runs inside the cluster with a PersistentVolumeClaim; production would use Amazon RDS.
- One NAT gateway is shared by both availability zones (cheaper, but a single point of failure).


































