A simple and efficient web application for managing your daily tasks. Built with Node.js, Express, EJS, and MongoDB, this app allows users to register, log in, create, update, filter, and delete tasks. It also supports user account management features like logout and account deletion.
- User registration and authentication
- Create, view, update, and delete tasks
- Filter tasks by state (Pending, Completed, etc.)
- User logout and account deletion
- Responsive and user-friendly interface
- Node.js (v14+)
- MongoDB
- Clone the repository:
git clone https://github.com/Noma7code/task-manager.git cd task-manager
- Install dependencies:
npm install
- Configure environment variables in a
.env
file:MONGODB_URI=your_mongodb_connection_string SESSION_SECRET=your_session_secret PORT=3000
- Start the server:
npm start
- Visit http://localhost:8080 in your browser.
- POST
/api/auth/register-user
- Body:
{ "name": "John", "email": "john@example.com", "password": "yourpassword" }
- Response:
{ "success": true, "message": "User registered successfully" }
- POST
/api/auth/login-user
- Body:
{ "email": "john@example.com", "password": "yourpassword" }
- Response:
{ "success": true, "message": "Login successful" }
- POST
/api/auth/logout-user
- Response:
{ "success": true, "message": "Logged out" }
- DELETE
/api/auth/delete-user-account
- Response:
{ "success": true, "message": "Account deleted successfully" }
- POST
/api/tasks/create-task
- Body:
{ "name": "Buy groceries" }
- Response:
{ "success": true, "task": { "_id": "taskid", "name": "Buy groceries", "state": "Pending" } }
- GET
/api/tasks/get-all-tasks
- Response:
{ "success": true, "tasks": [ { "_id": "taskid", "name": "Buy groceries", "state": "Pending" }, { "_id": "taskid2", "name": "Read book", "state": "Completed" } ] }
- PATCH
/api/tasks/update-task/:taskId
- Body:
{ "state": "Completed" }
- Response:
{ "success": true, "message": "Task updated" }
- DELETE
/api/tasks/delete-task/:taskId
- Response:
{ "success": true, "message": "Task deleted" }
This project is licensed under the MIT License.