2nd Place, Hack4UCAR
UCAR-OS, Multi-Tenant University Intelligence Platform

- Role
- Remote Co-Architect, UI, Feature Development, Platform Deployment & Live Demo
- Timeline
- April 2026
- Duration
- 36-hour hackathon
- Team
- Team: Sa7aBsisa, Omar Chiboub, Ghassen Naouar, Louay Dardoudi (on-site) + Ahmed Saad (remote)
Overview
UCAR-OS turns a university's scattered spreadsheets into one system a rector can actually query, across academics, finance, HR, research, and infrastructure, with answers in plain French. We built it at Hack4UCAR and placed second. I worked remotely, building the entire frontend, the deployment, and the live demo, while the rest of the team was on-site for the 36 hours.
The problem
A university's data lives in disconnected spreadsheets and PDFs. No single system can answer a rector asking "why did dropouts spike at one school this term, and what should we do?", because that pulls from academic, HR, budget, and infrastructure data at once. It also has to serve many faculties under one roof without ever leaking one institution's data into another's.
What I built
- 01
Nine services behind one gateway
A Kong API gateway fronts nine FastAPI services, each owning a single domain: identity, ingestion, preprocessing, core data, analytics, the AI council, reports, notifications, and a learning loop.
- 02
True multi-tenancy in the database
Every row carries a tenant ID, and Postgres row-level security enforces isolation in the database itself, so application code physically cannot leak one institution's data into another's.
- 03
Le Cabinet, a six-agent AI council
A router decides which specialists (academic, finance, HR, research, infrastructure, ESG) belong in a given question. They answer in parallel, and a synthesis step merges them into one recommendation that spells out where they agree and where they conflict. Every consultation is logged, and a demo cache replays the key questions instantly so a flaky network can't break the pitch.
- 04
An event-driven pipeline
Uploaded files flow through a Kafka bus from ingestion to cleaning to storage, and detected anomalies like dropout spikes or budget gaps fire alerts on their own.
- 05
Analytics and branded reports
A ClickHouse store powers the KPI time-series and forecasts, and a separate service renders branded PDF reports, both on demand and on a schedule.
- 06
Built to run, not just to demo
Every service exposes metrics, and a Helm chart deploys the whole stack to Kubernetes with dashboards and alerts. Locally it comes up with a single command.
Architecture
A Next.js frontend talks to a Kong gateway, which fans out to nine FastAPI services over a shared data layer of Postgres, ClickHouse, Kafka, and MinIO. Ingestion, preprocessing, and core data form a Kafka pipeline; analytics feeds the notifications; and Le Cabinet runs the six-agent council. Postgres row-level security keeps each institution's data isolated.
Tech stack
Kong 3.8 (DB-less Gateway)
Declarative API gateway in front of all 9 services, auth enforcement, rate limiting, and routing from one config file
9 FastAPI Microservices
IAM, Ingestion, Preprocessor, Core Management, Analytics, Chatbot, Reports, Notifications, Learning, Python 3.11/3.12 with structlog + pydantic-settings
PostgreSQL 16 + Row-Level Security
Pooled multi-tenancy, every `university.*` row carries `tenant_id`; RLS policies + `SET LOCAL app.current_tenant` enforce isolation in the database, not the app
ClickHouse 24.8 (OLAP)
KPI time-series store powering anomaly detection, dropout/budget/ESG comparisons, and OLS-regression predictions across institutions
Apache Kafka 3.8 (KRaft)
Event bus, `raw.data.ingested`, `tenant.data.normalized`, `analytics.anomaly.detected.v1`, `iam.audit.events`, driving ingestion, analytics, notifications, and the learning loop
Le Cabinet (6 AI Agents + Router + Synthesis)
Academic, Finance, HR, Research, Infrastructure, ESG specialists; Router picks who weighs in; Synthesis fuses agreements, tensions, and second-order effects with full audit trail and SSE streaming
MinIO + LaTeX Report Generation
S3-compatible storage for uploaded PDFs/Excels/CSVs; report_generation_service renders Jinja2 LaTeX templates → pdflatex on a cron schedule
Next.js 15 + Tremor + ECharts
App Router frontend with Tailwind, Tremor dashboard primitives, Apache ECharts visualisations, and an SSE-driven chatbot UI for Le Cabinet
Kubernetes (Helm) + Prometheus + Grafana
Helm chart in `infra/helm/ucar-platform` with ServiceMonitors, Grafana dashboards, and PrometheusRule alerts, every service exposes `/metrics`
Results
2nd Place, 1500 DT
Hack4UCAR, organised by Université de Carthage and ACM ENSTAB, April 2026
9 Microservices
FastAPI services behind Kong, IAM, Ingestion, Preprocessor, Core, Analytics, Chatbot, Reports, Notifications, Learning
Pooled Multi-Tenancy
PostgreSQL Row-Level Security across faculties / institutes / partner universities, strict per-tenant isolation with cross-tenant aggregations for super-admins
6-Agent AI Cabinet
Academic / Finance / HR / Research / Infrastructure / ESG specialists with Router + Synthesis and full audit trail
Event-Driven Pipeline
End-to-end Kafka flow from upload → normalize → core → anomaly detection → notifications → weekly learning insights
K8s + Observability
Helm chart, Prometheus metrics on every service, Grafana dashboards, and PrometheusRule alerts
Moments

What I took away
- 01
Building a hackathon project remotely while three teammates ran the floor on-site for 36 hours forced the cleanest split of responsibility I've ever shipped: I built features end-to-end, owned the UI, the deployment pipeline, and the live demo path; they owned the data, the agents, and the judges. We had to make every interface (API contracts, the demo script, the K8s manifests) good enough that we never needed a hallway conversation, because there was no hallway.
- 02
Pushing tenant isolation down into PostgreSQL Row-Level Security instead of guarding it in application code was the single highest-leverage decision, it makes leaks structurally impossible and turns `SET LOCAL app.current_tenant` into the only thing the IAM middleware has to get right.
- 03
"Le Cabinet" worked as a demo because the Synthesis layer surfaces *disagreements* between agents, not just consensus, judges immediately understood the value when the Finance and ESG agents disagreed on a campus expansion and the synthesis explained the trade-off.
- 04
The deterministic demo cache (hero questions replaying in <50 ms with zero LLM calls and `SIMULATE_AGENT_LATENCY_MS` choreography) was a hackathon-saving call, venue Wi-Fi was unreliable and rate limits would have killed the live cabinet stream during judging.
- 05
Splitting OLTP (PostgreSQL with RLS) from OLAP (ClickHouse) early let analytics_service answer cross-institution KPI queries fast without ever touching the transactional tables, and it kept the schema boundaries clean enough that 9 services could share the data layer without stepping on each other.
- 06
Kong DB-less + a Helm chart with ServiceMonitors and PrometheusRule alerts looked like overkill for a hackathon, but it turned the demo into a real K8s deployment story instead of a pile of docker-compose services, and judges noticed.