Node.js (Express) backend + React (Vite) frontend, MongoDB Atlas, JWT auth.
cd backendnpm install- Copy
backend/.env.exampletobackend/.envand set:MONGODB_URI– your MongoDB Atlas connection stringJWT_SECRET– a strong secret for JWT signingPORT(optional, default 5000)
npm run dev
cd frontendnpm installnpm run dev(runs on port 3000, proxies/apito backend)
- Auth: Register and Login with phone + password; JWT stored in localStorage; protected routes.
- User model:
phone,globalRankingScore. - Task model:
title,scheduledTime,status(pending, completed_on_time, late, skipped), linked to user. - API
POST/GET/PATCH/DELETE /api/tasks– CRUD (auth required).GET /api/yemot/task-check?phone=0501234567– returns nearest upcoming task title as plain text for Yemot Hamashia TTS.
- UI: Tailwind CSS; Login and Register pages; Dashboard with daily tasks and global score.
Call:
GET /api/yemot/task-check?phone=0501234567
Response is text/plain: the next pending task title, or "No upcoming tasks." / "User not found" / "Missing phone number".