How madhvendra1027/paimaana works
NIRMAAN AI is a synthetic-data infrastructure portfolio monitoring platform. Users explore portfolio KPIs, project dossiers, risk and alerts, geographic concentration, model analytics, and natural-language portfolio queries. The principal runtime flow is browser pages to Next.js API handlers and services, which read project, prediction, and alert records; the ML service is an optional evaluation/training path rather than a prerequisite to the frontend. The tree omits the Prisma schema/database files, so the documented SQLite store is shown without a repository path; unsampled capability links are omitted or marked unverified.
Main entry points: analytics/route.ts Analytics endpoint · predictionService.ts Current predictions · priorityEngine.ts Priority scoring · states/route.ts State aggregation endpoint
Components 26
Portfolio experience
- Portfolio dashboard
frontend/src/app/page.tsx - Project directory
frontend/src/app/projects/page.tsx - Project dossier
frontend/src/app/projects/[id]/page.tsx - Alerts workspace
frontend/src/app/alerts/page.tsx - Analytics workspace
frontend/src/app/analytics/page.tsx - State risk map
frontend/src/app/map/page.tsx - AI Officer
frontend/src/app/assistant/page.tsx
Application API
- KPI endpoint
frontend/src/app/api/kpi/route.ts - Project endpoints
frontend/src/app/api/projects/route.ts - Project detail endpoint
frontend/src/app/api/projects/[id]/route.ts - Alert endpoint
frontend/src/app/api/alerts/route.ts - State aggregation endpoint
frontend/src/app/api/states/route.ts - Analytics endpoint
frontend/src/app/api/analytics/route.ts - Portfolio query endpoint
frontend/src/app/api/chat/route.ts
Risk intelligence
- Portfolio aggregation
frontend/src/lib/services/portfolioService.ts - Current predictions
frontend/src/lib/services/predictionService.ts - Priority scoring
frontend/src/lib/services/priorityEngine.ts - Model artifact reader
frontend/src/lib/services/modelService.ts
ML evaluation
- ML prediction API
ml-service/app/main.py - Feature engineering
ml-service/app/pipeline/feature_engineering.py - Ensemble training
ml-service/app/pipeline/training_pipeline.py - Evaluation artifact
Data foundation
- Synthetic data generator
data-generator/generate_projects.py - Database seeder
data-generator/seed_db.py - SQLite project store
Other components
- Portfolio user
Connections 32
- Portfolio user → Portfolio dashboard: opens
README.md - Portfolio user → Project directory: browses
README.md - Portfolio user → Project dossier: opens
README.md - Portfolio user → Alerts workspace: reviews
README.md - Portfolio user → Analytics workspace: compares
README.md - Portfolio user → State risk map: explores
README.md - Portfolio user → AI Officer: queries
README.md - Project endpoints → SQLite project store: queries
frontend/src/app/api/projects/route.ts - Portfolio query endpoint → SQLite project store: queries
frontend/src/app/api/chat/route.ts - State aggregation endpoint → SQLite project store: aggregates
frontend/src/app/api/states/route.ts - State aggregation endpoint → Current predictions: resolves risk
frontend/src/app/api/states/route.ts - Analytics endpoint → SQLite project store: aggregates
frontend/src/app/api/analytics/route.ts - Analytics endpoint → Model artifact reader: reads metrics
frontend/src/app/api/analytics/route.ts - Analytics endpoint → ML prediction API: requests features
frontend/src/app/api/analytics/route.ts - Portfolio aggregation → Current predictions: resolves risk
frontend/src/lib/services/portfolioService.ts - Portfolio aggregation → Priority scoring: selects priorities
frontend/src/lib/services/portfolioService.ts - Priority scoring → Current predictions: loads predictions
frontend/src/lib/services/priorityEngine.ts - Priority scoring → SQLite project store: reads projects and alerts
frontend/src/lib/services/priorityEngine.ts - Current predictions → SQLite project store: reads latest records
frontend/src/lib/services/predictionService.ts - Synthetic data generator → Database seeder: supplies synthetic data
README.md - Database seeder → SQLite project store: seeds
README.md - Ensemble training → Feature engineering: uses features
ml-service/app/pipeline/training_pipeline.py - Ensemble training → Evaluation artifact: writes evaluation
README.md - ML prediction API → Feature engineering: engineers inputs
- Model artifact reader → Evaluation artifact: reads artifact
README.md - Portfolio dashboard → KPI endpoint: loads KPIs
- Project directory → Project endpoints: fetches projects
- Project dossier → Project detail endpoint: loads dossier
- Alerts workspace → Alert endpoint: loads alerts
- State risk map → State aggregation endpoint: loads state data
- AI Officer → Portfolio query endpoint: submits query
- Analytics workspace → Analytics endpoint: loads analytics