How ashmitkmishra/codelinc-dental works
Floss helps employees understand dental coverage, estimate treatment costs, and time care around benefit resets through a web app and WhatsApp. The web workflow is sign-in, chat or review member details, then receive answers from the API; WhatsApp messages enter a separate bot path that can call the same RAG function. The RAG handler retrieves member-specific records, and the advisor selects treatments, builds verified facts, and writes an answer. The README documents the major flows; some backend and UI links are documented rather than visible in sampled implementation excerpts.
Main entry points: handler.py API Lambda · router.tsx App routing · bot.py Message handling · FlossApi.ts API client
Components 20
Web app
- Web application
apps/web/src/app/App.tsx - App routing
apps/web/src/app/router.tsx - Sign-in
apps/web/src/pages/Auth.tsx - Chat experience
apps/web/src/pages/app/Chat.tsx - Member overview
apps/web/src/components/floss/OverviewPanels.tsx - API client
apps/web/src/lib/api/FlossApi.ts
Shared contract
- API schemas
packages/contracts/src/schemas.ts - Plan fixtures
packages/contracts/src/plans.ts
API and RAG
- API Lambda
backend/rag/handler.py - RAG advisor
backend/rag/advisor.py
WhatsApp bot
- Bot Lambda
backend/whatsapp-chatbot/lambda_function.py - Message handling
backend/whatsapp-chatbot/bot.py - RAG bridge
backend/whatsapp-chatbot/floss.py - Bot conversation history
backend/whatsapp-chatbot/history.py - Bot model client
backend/whatsapp-chatbot/bedrock.py
Data and services
- Postgres and pgvector
- Amazon Cognito
- Amazon Bedrock
- Twilio WhatsApp
Other components
- Employee
Connections 22
- Employee → Web application: uses
README.md - Web application → App routing: renders routes
apps/web/src/app/App.tsx - App routing → Sign-in: routes to
apps/web/src/app/router.tsx - App routing → Chat experience: routes to
apps/web/src/app/router.tsx - App routing → Member overview: routes to
apps/web/src/app/router.tsx - Sign-in → Amazon Cognito: authenticates with
README.md - Chat experience → API client: uses
apps/web/src/pages/app/Chat.tsx - API client → API Lambda: calls API
README.md - API client → API schemas: uses shapes
apps/web/src/lib/api/FlossApi.ts - API Lambda → Amazon Cognito: checks verified claims
README.md - API Lambda → Postgres and pgvector: reads and writes
backend/rag/handler.py - API Lambda → RAG advisor: invokes
backend/rag/handler.py - API Lambda → Amazon Bedrock: uses for language work
README.md - API Lambda → API schemas: serves contract
README.md - Employee → Twilio WhatsApp: messages
README.md - Twilio WhatsApp → Bot Lambda: delivers webhook
README.md - Bot Lambda → Message handling: dispatches to
backend/whatsapp-chatbot/lambda_function.py - Message handling → RAG bridge: requests member answers
backend/whatsapp-chatbot/bot.py - Message handling → Bot conversation history: replays and saves turns
backend/whatsapp-chatbot/bot.py - Message handling → Bot model client: uses fallback
backend/whatsapp-chatbot/bot.py - RAG bridge → API Lambda: invokes RAG
README.md - Plan fixtures → API schemas: uses plan types
packages/contracts/src/plans.ts