Older adults often receive check-ins from family members, volunteers, and caregivers, but follow-up information is usually scattered between phone calls and personal notes.
This project provides one simple system to log each check-in, track mood after each visit, and see whether medication was taken.
- Frontend: React + Vite
- Backend: Node.js + Express
- Database: MongoDB Atlas + Mongoose
- 3 related collections:
Senior,Companion,CheckInVisit - Full CRUD for main entity
CheckInVisit - 2 relational endpoints:
GET /api/seniors/:id/check-insGET /api/companions/:id/check-ins
- 1 custom endpoint:
GET /api/stats/mood-summary
- Consistent API error contract:
{ "error": string, "message": string, "details": any }
- React UI requirements covered:
- 3 components (
VisitsDashboard,VisitForm,VisitList) - loading + error states
- controlled form
- edit/delete with confirmation
- search by senior name + filter by visit type
- auto-refresh with
setIntervaland cleanup inuseEffect
- 3 components (
frontend/: React appbackend/: Express APIdocs/: ERD, report, seminar notes
- Open terminal in project root:
cd "C:\Users\aminm\Documents\New project\da219b-senior-checkin-planner"
- Create env files:
- copy
backend/.env.exampletobackend/.env - copy
frontend/.env.exampletofrontend/.env
- copy
- Set real Atlas URI in
backend/.env:MONGODB_URI=your_real_atlas_connection_string
- Install dependencies:
npm installnpm install --prefix backendnpm install --prefix frontend
- Seed realistic data:
npm run seed --prefix backend
- Run app:
npm run dev
- Verify:
- Health:
http://localhost:5000/api/health(should show"database":"connected") - Frontend:
http://localhost:5173(or next port if 5173 is busy)
- Health:
GET /api/check-in-visitsGET /api/check-in-visits/:idPOST /api/check-in-visitsPUT /api/check-in-visits/:idDELETE /api/check-in-visits/:id
GET /api/seniorsGET /api/companionsGET /api/seniors/:id/check-insGET /api/companions/:id/check-ins
GET /api/stats/mood-summary- Optional query params:
seniorId=<objectId>visitType=call|home_visit|video_call
- If
MONGODB_URIis missing/placeholder, data endpoints return503with clear message. - Health route always responds and shows DB state in
database. - ERD:
docs/erd.md - Final report:
docs/report-final.md - Drill script:
docs/seminar-drill.md