PROJECT TODO LIST APPLICATION SUBMITTED BY IN
1. Anirban Sinha BWU/DCS/22/051
2. Twaha Islam BWU/DCS/22/059
3. Joy Mondal BWU/DCS/22/060
4. Satish Ray BWU/DCS/22/143
5. Akash mondal BWU/DCS/22/017
1. PROJECT TITLE
TODO APPLICATION
2. PROJECT DESCRIPTION
The Todo Application is a RESTful API for managing a simple task list. It provides users with the ability to:
● Create tasks with a title.
● View all tasks in the list.
● Update tasks to mark them as completed.
● Delete tasks, with automatic removal after 24 hours due to a time-to-live (TTL) mechanism.
This backend application is built with Node.js, using Express.js as a web framework and MongoDB as the
database.
3. TECHNOLOGY USED
● Backend Framework: Node.js with Express.js
● Database: MongoDB with TTL indexing
● Database ORM: Mongoose
● Development Tools:
○ Nodemon for auto-reloading during development.
○ JSON format for API communication.
4. ROADMAP
PHASE 1: PROJECT SETUP
● Initialize Node.js and install dependencies.
● Establish MongoDB connection.
PHASE 2: CRUD OPERATIONS
● Create a schema for todos.
● Implement API endpoints for Create, Read, Update, and Delete operations.
PHASE 3: TASK EXPIRATION
● Integrate MongoDB’s TTL index to automatically delete tasks after 24 hours.
PHASE 4: ERROR HANDLING
● Add validation for inputs and proper error handling for API responses.
PHASE 5: TESTING & DEPLOYMENT
● Write test cases for API endpoints.
● Prepare the application for deployment.
5. FEATURES OF THE PROJECT
1. Task Management: Create, retrieve, update, and delete tasks via API endpoints.
2. Time-Limited Tasks: Automatic deletion of tasks after 24 hours using MongoDB TTL indexing.
3. Simple Integration: RESTful API design allows seamless integration with frontend frameworks.
6. FEATURE SOLUTIONS
● Task Expiry Mechanism:
MongoDB's TTL index on the createdAt field ensures tasks are removed automatically after 24 hours.
● Error Handling:
Provides descriptive error messages for scenarios such as:
○ Missing or invalid task titles.
○ Attempting operations on non-existent tasks.
● Scalable Architecture:
A modular design ensures ease of future feature expansion and integration with external systems.
7. TEST CASES
Test Scenario Input Expected Output
Fetch all tasks GET /todos List of all tasks with title and completed
fields.
Create a new task POST /todo { "title": "Buy groceries" } { "message": "Todo created" }
Update task status PUT /todo/:id { "completed": true } { "message": "Todo updated" }
Delete a task DELETE /todo/:id { "message": "Todo deleted" }
Invalid task POST /todo {} { "message": "Title is required" }
creation
8. PROJECT REVIEW
This project successfully demonstrates:
● The implementation of a CRUD-based backend using Node.js and Express.js.
● The integration of MongoDB's TTL indexing to manage automatic task expiration.
● A clean and efficient RESTful API design.
Strengths:
● Simplicity and modularity of code.
● Use of industry best practices for database interaction and API handling.
Potential Improvements:
● Adding user authentication for personalized task management.
● Extending the application with more advanced features like task categories, reminders, or priorities.
9. CONCLUSION
The Todo Application serves as a foundational project for learning and building RESTful APIs. With features
like time-limited tasks and simple CRUD operations, it is an excellent starting point for developers. Future
enhancements, such as authentication and frontend integration, could make this application even more
versatile.
10. REFERENCES
● Todo Postman Documentation