How saboten123/well_nest works
Well-Nest is a mental-health and community-wellness platform: people find care providers, manage appointments, communicate with clinicians, and use an AI wellness assistant. The React app presents those workflows; the Express service owns accounts, profiles, appointments, messaging, and video-call sessions, while the FastAPI service handles conversational AI and session memory. A separate blockchain backend supports outbreak reporting, events, donations, and rewards. The README documents RAG and web retrieval; their exact internal wiring is not fully shown in the sampled sources.
Main entry points: app.js HTTP app · App.jsx Page router · agent.py AI agent · index.js Community API
Components 30
Web experience
- Page router
frontend/src/App.jsx - Care pages
frontend/src/pages/DoctorsPage.jsx - Appointment pages
frontend/src/pages/PatientAppointmentsPage.jsx - AI chat page
frontend/src/pages/AiChatPage.jsx - Community pages
frontend/src/pages/OutBreakPage.jsx - API client
frontend/src/utils/api.js
Care backend
- HTTP app
backend/src/app.js - Auth routes
backend/src/routes/auth.routes.js - Auth workflows
backend/src/controllers/auth.controller.js - Profile routes
backend/src/routes/profile.routes.js - Care controllers
backend/src/controllers/doctor.controller.js - Appointment routes
backend/src/routes/appointmentRouter.js - Patient chat
backend/src/routes/chat.routes.js - Video-call routes
backend/src/routes/videoCall.routes.js - Call sessions
backend/src/controllers/videoCall.controller.js - WebRTC signaling
backend/src/socket/webrtcHandler.js - Care records
backend/src/models/Appointments.js
AI assistant
- Chat endpoint
ai_backend/app/routes.py - AI agent
ai_backend/app/agent.py - Retrieval
ai_backend/app/rag.py - Conversation memory
ai_backend/app/memory.py - Gemini service
ai_backend/app/tools/gemini_tool.py - Tavily search
ai_backend/app/tools/tavily_tool.py
Community and blockchain
- Community API
blockchain_backend/index.js - Outbreak reporting
blockchain_backend/routes/outbreakRouter.js - Event participation
blockchain_backend/routes/organiseRouter.js - Donations and rewards
blockchain_backend/routes/moneyRouter.js - Contract services
blockchain_backend/contractService/Outbreak_contract.js - Community records
blockchain_backend/model/outbreakRecords.js
Other components
- Platform user
Connections 29
- Platform user → Page router: uses
- Page router → Care pages: routes to
- Page router → Appointment pages: routes to
- Page router → AI chat page: routes to
- Page router → Community pages: routes to
- Care pages → API client: requests data
- Appointment pages → API client: requests data
- API client → HTTP app: HTTP requests
- HTTP app → Auth routes: mounts
- HTTP app → Profile routes: mounts
- HTTP app → Appointment routes: mounts
- HTTP app → Video-call routes: mounts
- Auth routes → Auth workflows: dispatches
- Profile routes → Care controllers: dispatches
- Video-call routes → Call sessions: dispatches
- Call sessions → Care records: reads and writes
- HTTP app → WebRTC signaling: initializes
- AI chat page → Chat endpoint: chat request
- Chat endpoint → Conversation memory: loads and updates
- Chat endpoint → AI agent: runs
- AI agent → Retrieval: retrieves context
- AI agent → Gemini service: generates reply
- AI agent → Tavily search: searches web
- Community pages → Community API: community requests
- Community API → Outbreak reporting: mounts
- Community API → Event participation: mounts
- Community API → Donations and rewards: mounts
- Outbreak reporting → Community records: stores reports
- Outbreak reporting → Contract services: verifies and submits