AI PLATFORM / MICROSERVICES

NeuraHub AI — Multi-Tenant AI Workspace Platform

A production-grade, multi-tenant AI SaaS platform: 8 product modules across 10 FastAPI microservices behind an API gateway, plus a Next.js 15 web app and an Expo mobile client. Understand any codebase, analyze any dataset, research any subject — every answer grounded and cited, every tenant isolated by Postgres row-level security.

Public demo

10 — FastAPI microservices orchestrated

The problem

AI workspace tools ship as single-purpose monoliths with a shared database and a 'trust us' security story. Building one system that spans code understanding, AutoML, research, teaching, agents, and long-term memory — while keeping tenants cryptographically isolated and every answer traceable to a source — is an architecture problem, not a prompt problem.

The approach

A uv-managed Python monorepo: 10 FastAPI services (codebase-intel, knowledge-rag, data-science, education, agent-marketplace, ai-memory, collaboration, auth-identity, org-billing, llm-gateway) each built clean/hexagonal — api → application → domain, adapters behind ports — fronted by a reverse-proxy gateway that bridges Firebase web sessions into RS256 org-scoped JWTs. Retrieval is GraphRAG: vector search (Qdrant) ⊕ BM25 keyword ⊕ Neo4j call-graph expansion, fused with Reciprocal Rank Fusion because the three scores aren't comparable, then reranked lexically. Multi-tenancy is enforced in the database itself via FORCE ROW LEVEL SECURITY on app.current_org, with services connecting as a least-privilege role.

The results

Eight modules shipped end-to-end on real OpenAI, typed under mypy --strict, covered by unit + @integration tests against throwaway Postgres/Qdrant/Neo4j, and gated by GitHub Actions (lint → typecheck → test). Codebase Q&A cites file:line; evidence is tagged vector / graph / fused so you can see which signal found it. Four shared libraries (nh_core, nh_db, nh_obs, nh_auth) carry settings, RLS tenancy, OpenTelemetry, and Argon2id + RS256 auth. Docker Compose for prod and lean dev, Grafana/Prometheus/OTel wired in.

Stack: Next.js 15, React 19, FastAPI, Qdrant, Neo4j, Postgres RLS, OpenAI, Expo, Docker, OpenTelemetry