How owais265/manakmitra works
ManakMitra is an evidence-grounded BIS standards and services assistant. Its primary workflow is a user query through policy checks, local catalogue retrieval (optionally enriched by hybrid search), and a grounded answer or refusal with an official next step. Separate product branches cover guided service desks, HUID/hallmark verification, laboratory lookup, and certification guidance. The README documents these capabilities and the retrieval stages; sampled source confirms retrieval, grounding, and app-auth behavior, but not every route’s internal wiring.
Main entry points: chat.ts Chat API · retrieve.ts Retrieval and grounding · manakmitra-chat.tsx Chat interface · rag.ts Policy and pack search
Components 22
User experience
- Chat interface
src/components/manakmitra-chat.tsx - Chat API
src/routes/api/chat.ts
Grounded answers
- Query handling
src/lib/query-context.ts - Retrieval and grounding
src/lib/retrieve.ts - Policy and pack search
src/lib/rag.ts - Hybrid search
src/lib/hybrid.ts - Authorised catalogue
src/data/rag-pack.json - Optional search store
src/lib/supabase.server.ts - Optional xAI phrasing
BIS service desks
- Guided desks
src/components/guide-pages.tsx - Product verification
src/routes/verify.tsx - Hallmark and HUID
src/routes/hallmark.tsx - HUID verification API
src/routes/api/verify.ts - Lab lookup
src/routes/labs.tsx - Standards finder
src/routes/standards.tsx - Certification guidance
src/routes/certify.tsx
Identity and data
- Sign-in client
src/lib/auth/client.ts - App authentication
src/lib/auth/server.ts - Connector access
src/lib/app-data/client.server.ts
Other components
- Public user
- Official BIS portals
- Connectors service
Connections 24
- Public user → Chat interface: asks
- Chat interface → Chat API: submits query
- Chat API → Query handling: prepares query
- Chat API → Retrieval and grounding: requests answer
- Retrieval and grounding → Policy and pack search: retrieves evidence
- Policy and pack search → Authorised catalogue: searches pack
- Retrieval and grounding → Hybrid search: invokes optional search
- Hybrid search → Optional search store: queries extras
- Chat API → Optional xAI phrasing: requests phrasing
- Retrieval and grounding → Chat API: returns grounded result
- Chat API → Chat interface: returns answer or refusal
- Chat interface → Official BIS portals: offers official handoff
- Public user → Guided desks: selects guidance
- Public user → Product verification: opens verification
- Public user → Hallmark and HUID: checks hallmark
- Hallmark and HUID → HUID verification API: requests verification
- Public user → Lab lookup: looks up labs
- Lab lookup → Official BIS portals: links to LIMS scope
- Public user → Standards finder: finds standards
- Public user → Certification guidance: seeks certification steps
- Public user → Sign-in client: signs in
- Sign-in client → App authentication: authenticates
- App authentication → Connector access: authorizes app data
- Connector access → Connectors service: calls tools