How hrmaulana/mih-ai-platform works
MVP MIH combines a public planning portal with an internal document-ingestion and RAG question-answering platform, plus a news-monitoring workflow. The documented user path is to add documents, let the worker ingest them, then ask questions through the playground or token-authenticated API; admins also manage access and documents. Source excerpts establish the RAG, ingestion, sentiment-analysis, and RSS-crawl calls shown here. Other frontend features are retained from the README and tree, but their unsampled wiring is not expanded.
Main entry points: App.tsx Web application · app.ts HTTP application · ingest.py Ingestion worker · rag.ts RAG retrieval
Components 25
Portal and UI
- Web application
frontend/src/App.tsx - Public portal
frontend/src/pages/portal - RAG playground
frontend/src/pages/Playground.tsx - Document admin
frontend/src/pages/Documents.tsx - Admin console
frontend/src/pages/Admin.tsx - News dashboards
frontend/src/pages/portal/EarlyWarning.tsx
Application API
- HTTP application
backend/src/app.ts - Ask and chat
backend/src/routes/ask.ts - Document routes
backend/src/routes/documents.ts - Admin routes
backend/src/routes/admin.ts - RAG retrieval
backend/src/services/rag.ts - Answer generation
backend/src/services/llm.ts
Document pipeline
- Ingestion worker
worker/ingest.py - File parsers
worker/parsers - Text chunking
worker/chunking.py - Vector embeddings
worker/embedding.py - Document store
worker/db.py
News monitoring
- RSS crawler
backend/services/crawler/src/routes.ts - Sentiment analysis
backend/services/analisis/src/routes.ts - Article analytics
backend/services/artikel/src/routes.ts
External systems
- RSS feeds
- LLM provider
- Document sources
Other components
- Portal visitor
- API user
Connections 28
- Portal visitor → Web application: uses portal
- API user → Ask and chat: posts question
- Web application → Public portal: renders pages
- Web application → RAG playground: opens
- Web application → Document admin: opens
- Web application → Admin console: opens
- Web application → News dashboards: opens
- RAG playground → HTTP application: sends requests
- Document admin → HTTP application: manages documents
- Admin console → HTTP application: manages access
- HTTP application → Ask and chat: dispatches
- HTTP application → Document routes: dispatches
- HTTP application → Admin routes: dispatches
- Ask and chat → RAG retrieval: requests answers
- RAG retrieval → Vector embeddings: embeds query
- RAG retrieval → Document store: searches chunks
- RAG retrieval → Answer generation: generates answer
- Answer generation → LLM provider: calls model
- Document sources → Ingestion worker: supplies files
- Ingestion worker → File parsers: extracts text
- Ingestion worker → Text chunking: chunks segments
- Ingestion worker → Vector embeddings: embeds chunks
- Ingestion worker → Document store: stores chunks
- RSS crawler → RSS feeds: fetches feeds
- RSS crawler → Sentiment analysis: scores articles
- RSS crawler → Document store: stores alerts
- Article analytics → Document store: reads articles
- Sentiment analysis → LLM provider: analyzes ambiguous text