A starter scaffold for a Smart Task Manager using React, Node.js, Express, and SQLite.
This milestone includes:
- React + Vite frontend in
client/ - Node.js + Express backend in
server/ - A basic backend health route at
GET /api/health - SQLite-backed task CRUD endpoints
- Shared project structure for future cross-app constants
Authentication, filtering, and search are intentionally not implemented yet.
- Node.js 20 or newer
- npm
From the project root:
npm run install:allOr install each app separately:
npm --prefix client install
npm --prefix server installnpm run dev:clientThe Vite app will usually run at:
http://localhost:5173
npm run dev:serverThe Express API runs at:
http://localhost:3000
Open this URL in a browser:
http://localhost:3000/api/health
Or use curl:
curl http://localhost:3000/api/healthExpected response:
{
"status": "ok",
"service": "smart-task-manager-api"
}GET http://localhost:3000/api/tasks
Example curl command:
curl http://localhost:3000/api/tasksExample response:
{
"tasks": []
}POST http://localhost:3000/api/tasks
Example curl command:
curl -X POST http://localhost:3000/api/tasks \
-H "Content-Type: application/json" \
-d "{\"title\":\"Plan the database\",\"description\":\"Define the first task schema\",\"priority\":\"high\",\"dueDate\":\"2026-05-01\"}"Example request body:
{
"title": "Plan the database",
"description": "Define the first task schema",
"priority": "high",
"dueDate": "2026-05-01"
}Example response:
{
"task": {
"id": 1,
"title": "Plan the database",
"description": "Define the first task schema",
"completed": false,
"priority": "high",
"dueDate": "2026-05-01",
"createdAt": "2026-04-26T12:00:00.000Z",
"updatedAt": "2026-04-26T12:00:00.000Z"
}
}Validation rules:
titleis required.prioritydefaults tomedium.- Allowed priorities are
low,medium, andhigh.
PATCH http://localhost:3000/api/tasks/:id
PUT http://localhost:3000/api/tasks/:id
Example curl command:
curl -X PATCH http://localhost:3000/api/tasks/1 \
-H "Content-Type: application/json" \
-d "{\"title\":\"Update the database plan\",\"completed\":true,\"priority\":\"medium\"}"Example response:
{
"task": {
"id": 1,
"title": "Update the database plan",
"description": "Define the first task schema",
"completed": true,
"priority": "medium",
"dueDate": "2026-05-01",
"createdAt": "2026-04-26T12:00:00.000Z",
"updatedAt": "2026-04-26T12:30:00.000Z"
}
}DELETE http://localhost:3000/api/tasks/:id
Example curl command:
curl -X DELETE http://localhost:3000/api/tasks/1Example response:
{
"message": "Task deleted",
"task": {
"id": 1,
"title": "Update the database plan",
"description": "Define the first task schema",
"completed": true,
"priority": "medium",
"dueDate": "2026-05-01",
"createdAt": "2026-04-26T12:00:00.000Z",
"updatedAt": "2026-04-26T12:30:00.000Z"
}
}Missing task ids return 404 Not Found.
smart-task-manager/
client/
src/
components/
pages/
api/
hooks/
styles/
App.jsx
main.jsx
server/
src/
routes/
controllers/
db/
data/
middleware/
app.js
server.js
shared/
constants/
package.json
README.md
Connect the React frontend to the task API and display real tasks from SQLite.