Smart Focus Tracker is a full-stack task and focus-session tracking application built with Node.js, Express, and MongoDB.
The project demonstrates a clean backend architecture using RESTful API design, separation of concerns, persistent database storage, and scalable project structure.
The application provides a backend API for managing tasks and focus-related productivity data. It was built as a practical full-stack development project to demonstrate backend design, API development, database integration, and maintainable application structure.
- Node.js
- Express.js
- MongoDB Atlas
- Mongoose
- JavaScript
- dotenv
- Create tasks
- Retrieve all tasks
- Update existing tasks
- Delete tasks
- Store data persistently using MongoDB
- Structured backend architecture with routes, controllers, services, and models
backend/
├── src/
│ ├── controllers/ # Handles HTTP request logic
│ ├── services/ # Business logic and database operations
│ ├── models/ # Mongoose schemas
│ ├── routes/ # API route definitions
│ └── app.js # Application entry point
├── package.json
├── package-lock.json
└── .env # Local environment variables, not committed
git clone https://github.com/omerbar13/smart-focus-tracker.git
cd smart-focus-tracker/backendnpm installCreate a .env file inside the backend/ folder:
MONGO_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/taskdbnode src/app.jsThe server runs locally at:
http://localhost:5000
GET /tasksExample response:
[
{
"_id": "661f123abc...",
"title": "Study backend architecture",
"createdAt": "2026-04-30T10:00:00.000Z",
"updatedAt": "2026-04-30T10:00:00.000Z"
}
]POST /tasksRequest body:
{
"title": "Study backend architecture"
}Example error response:
{
"error": "Title is required"
}PUT /tasks/:idRequest body:
{
"title": "Updated task title"
}DELETE /tasks/:idThe backend follows a layered structure:
Routes -> Controllers -> Services -> Models
This structure separates API routing, request handling, business logic, and database interaction. The goal is to keep the codebase easier to maintain, test, and extend.
The current version implements the backend API and MongoDB persistence layer. Future development could include authentication, user accounts, task categories, a React frontend dashboard, and deployment.
- User authentication with JWT
- User accounts and protected routes
- Task categories or tags
- Focus-session analytics
- Frontend dashboard
- Deployment to a cloud platform
Omer Bar