How harshitj183/mann-ai-agent works
This repository contains two separate products: Mann, an AI-assistant application with a web client and microservices, and JustPostgres, a managed-Postgres control plane with a web console and connection router. JustPostgres users manage projects and their data, backups, branches, extensions, REST access, and upgrades; the control plane exposes these API stages and runs background jobs. The excerpts establish API routing and selected project, storage, and database behavior. Many service implementations and UI pages are unsampled, so their internal links are omitted or marked unverified.
Main entry points: app.ts HTTP application · src API gateway · src/App.tsx App routing · src/App.tsx Console routes
Components 34
Mann web app
- App routing
frontend/src/App.tsx - Auth context
frontend/src/contexts/AuthContext.tsx - Chat interface
frontend/src/pages/Chat.tsx
Mann services
- API gateway
backend/api-gateway/src - Auth routes
backend/api-gateway/src/routes/auth.routes.js - Chat routes
backend/api-gateway/src/routes/chat.routes.js - Agent routes
backend/api-gateway/src/routes/agent.routes.js - Memory routes
backend/api-gateway/src/routes/memory.routes.js - Tools routes
backend/api-gateway/src/routes/tools.routes.js - Authentication service
backend/auth-service/src/routes/auth.routes.js - Chat service
backend/chat-service/src - Agent service
backend/agent-service/src - Memory and skills
backend/memory-service/src - Tools service
backend/tools-service/src
JustPostgres console
- Console routes
justpostgres/apps/web/src/App.tsx - Console API client
justpostgres/apps/web/src/lib/api.ts - Management pages
justpostgres/apps/web/src/pages
Control plane API
- HTTP application
justpostgres/apps/control-plane/src/api/app.ts - Authentication
justpostgres/apps/control-plane/src/auth - Project management
justpostgres/apps/control-plane/src/api/routes/projects.ts - Data access
justpostgres/apps/control-plane/src/api/routes/data.ts - Backup management
justpostgres/apps/control-plane/src/api/routes/backups.ts - Branch management
justpostgres/apps/control-plane/src/api/routes/branches.ts - Extension management
justpostgres/apps/control-plane/src/api/routes/extensions.ts - REST management
justpostgres/apps/control-plane/src/api/routes/rest.ts - Upgrade management
justpostgres/apps/control-plane/src/api/routes/upgrades.ts - Admin and operations
justpostgres/apps/control-plane/src/api/routes
Postgres runtime
- Project lifecycle
justpostgres/apps/control-plane/src/projects/service.ts - Object storage
justpostgres/apps/control-plane/src/backups/object-storage.ts - Connection router
justpostgres/apps/router/src - Background jobs
justpostgres/apps/control-plane/src/jobs - Container driver
justpostgres/apps/control-plane/src/docker/driver.ts
Other components
- Assistant user
- Database operator
Connections 34
- Assistant user → App routing: uses
frontend/src/App.tsx - App routing → Auth context: provides auth
frontend/src/App.tsx - App routing → Chat interface: routes to
- App routing → API gateway: requests services
- API gateway → Auth routes: dispatches
backend/api-gateway/src/routes/auth.routes.js - API gateway → Chat routes: dispatches
backend/api-gateway/src/routes/chat.routes.js - API gateway → Agent routes: dispatches
backend/api-gateway/src/routes/agent.routes.js - API gateway → Memory routes: dispatches
backend/api-gateway/src/routes/memory.routes.js - API gateway → Tools routes: dispatches
backend/api-gateway/src/routes/tools.routes.js - Auth routes → Authentication service: forwards requests
backend/api-gateway/src/routes/auth.routes.js - Chat routes → Chat service: forwards requests
backend/api-gateway/src/routes/chat.routes.js - Agent routes → Agent service: forwards requests
backend/api-gateway/src/routes/agent.routes.js - Memory routes → Memory and skills: forwards requests
backend/api-gateway/src/routes/memory.routes.js - Tools routes → Tools service: forwards requests
backend/api-gateway/src/routes/tools.routes.js - Database operator → Console routes: manages databases
justpostgres/apps/web/src/App.tsx - Console routes → Console API client: calls
justpostgres/apps/web/src/App.tsx - Console routes → Management pages: routes pages
- Console routes → HTTP application: uses control-plane API
- HTTP application → Authentication: protects API
justpostgres/apps/control-plane/src/api/app.ts - HTTP application → Project management: routes requests
justpostgres/apps/control-plane/src/api/app.ts - HTTP application → Data access: routes requests
justpostgres/apps/control-plane/src/api/app.ts - HTTP application → Backup management: routes requests
justpostgres/apps/control-plane/src/api/app.ts - HTTP application → Branch management: routes requests
justpostgres/apps/control-plane/src/api/app.ts - HTTP application → Extension management: routes requests
justpostgres/apps/control-plane/src/api/app.ts - HTTP application → REST management: routes requests
justpostgres/apps/control-plane/src/api/app.ts - HTTP application → Upgrade management: routes requests
justpostgres/apps/control-plane/src/api/app.ts - HTTP application → Admin and operations: routes requests
justpostgres/apps/control-plane/src/api/app.ts - Project management → Project lifecycle: manages projects
- Project lifecycle → Background jobs: enqueues work
justpostgres/apps/control-plane/src/projects/service.ts - Project lifecycle → Container driver: uses containers
justpostgres/apps/control-plane/src/projects/service.ts - Backup management → Object storage: configures storage
- Data access → Connection router: accesses project databases
- HTTP application → Console API client: serves console assets
- Console API client → HTTP application: sends API requests