How codewitheshayoutube/caresync-ai works
CareSync AI is presented as a hospital-operations intelligence dashboard: staff review facility resources and risks, investigate alerts, and use procurement assistance to evaluate suppliers and prepare orders. The sampled code supports a React dashboard, FastAPI operations endpoints, a LangGraph procurement agent with database tools, and SQL-backed domain models. README capabilities such as live web intelligence and predictive shortage analysis are documented, but their implementation and wiring are not present in the excerpts; those links are therefore not inferred.
Main entry points: base.py PostgreSQL · App.jsx Dashboard app · main.py FastAPI endpoints · procurement_agent.py Procurement agent
Components 22
Dashboard experience
- Dashboard app
client/caresync/src/App.jsx - Hospital map
client/caresync/src/App.jsx - Inventory view
client/caresync/src/App.jsx - Alerts view
client/caresync/src/App.jsx - AI chat panel
client/caresync/src/App.jsx
Operations API
- FastAPI endpoints
backend/main.py - Hospital operations
backend/main.py - Alert operations
backend/main.py - Order operations
backend/main.py - Chat endpoint
backend/main.py
Agent procurement
- Procurement agent
backend/agents/procurement_agent.py - Agent context
backend/agents/state.py - Procurement tools
backend/tools/procurement_tools.py
Operational data
- PostgreSQL
backend/db/models/base.py - Inventory history
backend/db/models/inventory.py - Risk scores
backend/db/models/risk.py - Alerts and logs
backend/db/models/alert.py - Procurement orders
backend/db/models/procurement.py - Supplier catalog
backend/db/models/supplier.py
Other components
- Hospital staff
- Claude
- Redis cache
Connections 22
- Hospital staff → Dashboard app: uses
- Dashboard app → Hospital map: renders
- Dashboard app → Inventory view: renders
- Dashboard app → Alerts view: renders
- Dashboard app → AI chat panel: renders
- FastAPI endpoints → Hospital operations: dispatches
- FastAPI endpoints → Alert operations: dispatches
- FastAPI endpoints → Order operations: dispatches
- FastAPI endpoints → Chat endpoint: dispatches
- Procurement agent → Claude: prompts
- Procurement agent → Procurement tools: invokes
- Procurement agent → Agent context: uses context
- Procurement tools → PostgreSQL: queries and writes
- Procurement tools → Redis cache: reads cache
- Hospital operations → PostgreSQL: queries
- Alert operations → PostgreSQL: queries
- Order operations → PostgreSQL: reads and writes
- PostgreSQL → Inventory history: stores
- PostgreSQL → Risk scores: stores
- PostgreSQL → Alerts and logs: stores
- PostgreSQL → Procurement orders: stores
- PostgreSQL → Supplier catalog: stores