AI-powered care coordination platform for Personal Support Workers (PSWs), family members, and care coordinators. Built for the Canadian home care context with a focus on data residency, 24/7 availability, and intelligent handoff between shifts.
Frontend (Vercel) Backend (Vultr VPS) External Services
┌──────────────────┐ ┌──────────────────────┐ ┌─────────────────┐
│ React + Vite │──────▶│ Node/Express │──────▶│ Backboard.io │
│ Auth0 SPA │ /api │ PM2 process manager │ │ (AI agents) │
│ Tailwind CSS │ proxy │ node-cron (nightly) │ ├─────────────────┤
└──────────────────┘ └──────────┬───────────┘ │ Auth0 │
│ │ (identity) │
├───────────────────▶├─────────────────┤
│ │ Vultr Object │
│ │ Storage (S3) │
├───────────────────▶├─────────────────┤
│ │ Vultr Managed │
│ │ PostgreSQL │
└───────────────────▶├─────────────────┤
│ Resend (email) │
└─────────────────┘
- Pre-visit Briefings — AI-generated shift briefings via Backboard Handoff agent, giving incoming PSWs context on the client's history, medications, and recent visits.
- Visit Logging — PSWs log visits with notes and session type; entries are written to the database and to the client's Backboard memory for continuity.
- Medication Sentinel — Nightly 2 AM cron job reviews all clients' medications and conditions via AI, flags risks, and emails the coordinator.
- Family Portal — Daily summaries generated by the Family agent, emailed to family members and viewable in the portal.
- Document Management — Upload care plans (PDF, DOCX, images) to Vultr Object Storage with optional background Backboard RAG indexing via Bull queue.
- Role-based Access — Auth0 with custom claims (
psw,family,coordinator) enforced on both frontend routes and backend middleware. - Coordinator Dashboard — Client CRUD, PSW shift assignments, sentinel flag review, and admin role management via Auth0 Management API.
caresync/
├── backend/ # Node.js + Express API
│ ├── server.js # Entry point, CORS, route mounting, PM2
│ ├── schema.js # Auto-creates all PostgreSQL tables on boot
│ ├── db.js # PostgreSQL pool + all data access functions
│ ├── cron.js # Nightly Sentinel (2 AM) + Family Summaries (1 AM)
│ ├── queue.js # Bull queue (optional, requires Redis)
│ ├── middleware/auth.js # Auth0 JWT validation + role enforcement
│ ├── routes/
│ │ ├── briefings.js # GET /api/briefings/:clientId
│ │ ├── visits.js # POST /api/visits
│ │ ├── family.js # POST /api/family/draft, GET /api/family/summaries
│ │ ├── documents.js # POST /api/documents/upload, GET /api/documents
│ │ ├── clients.js # GET/POST/PUT/DELETE /api/clients
│ │ └── admin.js # Auth0 user/role management
│ ├── services/
│ │ ├── backboard.js # Backboard.io API (threads, agents, memory, docs)
│ │ ├── vultrStorage.js # S3-compatible upload/download/signed URLs
│ │ └── email.js # Resend: family updates + coordinator alerts
│ ├── workers/
│ │ └── documentWorker.js # Bull worker for async Backboard RAG indexing
│ └── scripts/
│ ├── seed-margaret-chen.js # Demo data: Margaret Chen profile + visits
│ └── run-schema.js # Standalone schema migration runner
│
├── frontend/ # React + Vite SPA
│ ├── src/
│ │ ├── App.jsx # Router, role-based rendering
│ │ ├── auth0-provider.jsx # Auth0 React provider
│ │ ├── useApi.js # Authenticated fetch hooks (fetchWithAuth, uploadWithAuth)
│ │ ├── pages/
│ │ │ ├── LandingPage.jsx
│ │ │ ├── PSWDashboard.jsx
│ │ │ ├── FamilyPortal.jsx
│ │ │ └── CoordinatorDashboard.jsx
│ │ └── components/
│ │ ├── NavBar.jsx
│ │ ├── BriefingCard.jsx
│ │ ├── VisitLogger.jsx
│ │ ├── DocumentUpload.jsx
│ │ ├── FamilyMessageDraft.jsx
│ │ └── MedicationFlags.jsx
│ └── vercel.json # SPA rewrites + API proxy to backend
- Node.js 18+
- PostgreSQL (or use the Vultr Managed DB connection string)
cd caresync/backend
cp .env.example .env # Fill in Auth0, Backboard, Vultr, Resend credentials
npm install
npm run dev # Starts with nodemon on port 4000The server auto-creates all database tables on first boot via initSchema().
To seed demo data:
node scripts/seed-margaret-chen.jscd caresync/frontend
cp .env.example .env.local # Fill in VITE_AUTH0_*, VITE_API_URL
npm install
npm run dev # Vite dev server on port 5173The backend runs on a Vultr VPS with PM2. Redis is optional (Bull queue for background document processing is skipped when REDIS_URL is not set).
# On the VPS
cd /app/backend
npm install
pm2 start server.js --name caresync-api
pm2 startup && pm2 saveKey production .env settings:
NODE_ENV=production(enables nightly cron jobs)CORS_ORIGIN=https://your-vercel-url.vercel.appDATABASE_URL=postgresql://...(Vultr Managed PostgreSQL)- Omit
REDIS_URLif Redis is not available
The frontend deploys to Vercel. API requests are proxied through Vercel rewrites (vercel.json) to avoid mixed-content issues (HTTPS frontend to HTTP backend).
Vercel environment variables (set via vercel env add):
VITE_AUTH0_DOMAINVITE_AUTH0_CLIENT_IDVITE_AUTH0_AUDIENCEVITE_BACKBOARD_API_KEY
VITE_API_URL is intentionally not set in production — useApi.js defaults to /api, which Vercel proxies to the backend.
See caresync/backend/.env.example for the full list with descriptions of where to find each value.
| Variable | Where | Purpose |
|---|---|---|
AUTH0_DOMAIN |
Backend | Auth0 tenant domain |
AUTH0_AUDIENCE |
Backend | Auth0 API identifier |
AUTH0_M2M_CLIENT_ID |
Backend | Machine-to-machine app for admin ops |
AUTH0_M2M_CLIENT_SECRET |
Backend | M2M secret |
BACKBOARD_API_KEY |
Backend | Backboard.io API key |
BACKBOARD_*_AGENT_ID |
Backend | Handoff, Sentinel, Family assistant IDs |
VULTR_STORAGE_* |
Backend | S3-compatible object storage credentials |
DATABASE_URL |
Backend | PostgreSQL connection string |
REDIS_URL |
Backend | Optional — enables Bull queue for async doc processing |
RESEND_API_KEY |
Backend | Email delivery |
VITE_AUTH0_DOMAIN |
Frontend | Auth0 domain for SPA |
VITE_AUTH0_CLIENT_ID |
Frontend | Auth0 SPA client ID |
VITE_AUTH0_AUDIENCE |
Frontend | Must match backend AUTH0_AUDIENCE |
VITE_API_URL |
Frontend | Local dev only (http://localhost:4000); omit in production |
PostgreSQL with 7 tables, all auto-created on server boot:
clients— patient profilesclient_threads— Backboard thread IDs per client per agent typevisits— PSW visit logsassignments— PSW-to-client shift assignmentsclient_sentinel_results— latest overnight medication sentinel resultsfamily_daily_summaries— nightly family-friendly care updatesdocuments— uploaded document metadata
Private — Hackathon project.