This is a task management application built using React for the frontend and Node.js (Express) for the backend and database with Mysql ORM Sequelize. The app allows users to register, log in, and manage their tasks with full CRUD (Create, Read, Update, Delete) functionality. It uses JWT tokens and cookies for authentication, and Bcryptjs for password hashing.
-
User Authentication:
- Register a new user.
- Log in and receive a JWT token.
- Log out (clear cookies).
-
Task Management:
- Add, fetch, update, and delete tasks after the user is logged in.
-
Authentication via JWT:
- User credentials are hashed using Bcryptjs.
- JWT tokens are stored in cookies for persistent login.
The backend is built using Express, with the following key dependencies:
bcryptjs: For password hashing.cookie-parser: For handling cookies.cors: To enable cross-origin requests.dotenv: For environment variable management.express: Framework for handling server requests.jsonwebtoken: For generating and verifying JWT tokens.mysql2andsequelize: For database interaction using MySQL.
- Clone the repository. git clone https://github.com/anuj-dhungana-dev/Task-Manage
- Install dependencies: cd backend npm install nodemon src/index.js
.env DB_HOST=localhost DB_USER=root DB_PASS=password DB_NAME=task_manager JWT_SECRET=your_secret_key
-
Install dependencies and Run:
cd frontend npm install npm run dev