A full-stack Todo List application built with a React and Tailwind CSS frontend, and an ExpressJS, MongoDB, and JWT-based backend. Users can register, log in, and manage tasks with features like sorting, pagination, and task completion tracking.
This project is a full-stack Todo List application that enables users to manage tasks efficiently. The frontend is built with React and styled using Tailwind CSS, providing a modern and responsive UI. The backend is a REST API developed with ExpressJS, using Mongoose for MongoDB integration and JWT for user authentication. Users can register, log in, create, edit, and delete tasks, mark tasks as completed, and sort tasks by priority, creation date, or completion status.
backend
directory:cd backend
npm install
config.env
file inside a config
folder with the following content:PORT=8080
MONGODB_URI=mongodb://localhost:27017/todolist
JWT_SECRET=your_jwt_secret
npm start
The backend will run on http://localhost:8080
.frontend
directory:cd frontend
npm install
npm start
The frontend will run on http://localhost:3000
.Method | Endpoint | Description | Requires Auth |
---|---|---|---|
POST | /register |
Register a new user | No |
POST | /login |
Log in and get a JWT token | No |
GET | /tasks |
Get all tasks for the user | Yes |
POST | /task |
Create a new task | Yes |
PUT | /task/:id |
Update a task by ID | Yes |
PUT | /taskComplete/:id |
Toggle task completion status | Yes |
DELETE | /task/:id |
Delete a task by ID | Yes |
Create a Task:
POST http://localhost:8080/task
Headers: Authorization: Bearer <your_jwt_token>
Body: {
"title": "Finish project",
"subject": "Work",
"priority": 3
}
Contributions are welcome. If you'd like to contribute:
git checkout -b feature/your-feature
git commit -m "Add your feature"
git push origin feature/your-feature