It's todo's app built with MERN Stack . It's my final project at CTD
-
Client: React JS , Vite JS, CSS
-
Server: Node, Express , MongoDB .
-
Authentication : JSON Web Tokens (JWT)
GET /check-auth
: Checks if the user is authenticated.POST /signup
: Handles user signup.POST /login
: Handles user login.GET /logout
: Handles user logout.GET /user
: Retrieves user information.PUT /user/update
: Updates user profile.DELETE /user/delete
: Deletes user account.POST /addtodo
: Adds a new todo.GET /todos
: Retrieves all todos.GET /completedTodos
: Retrieves completed todos.GET /pendingTodos
: Retrieves pending todos.PUT /todo/updateStatus
: Updates todo status (completed or pending).PUT /todo/update
: Updates todo.DELETE /todo/delete
: Deletes todo.
- User Authentication: Users can signup, login, and logout from the application.
- Profile Management: Users can update their profile information, including name and email.
- Password Management: Users can change their password and request a password reset if forgotten.
- Todo Management: Users can add, remove, and update their todos.
- Todo Status: Users can mark todos as completed or pending.
- Todo Sections: The app categorizes todos into All Todos, Completed Todos, and Pending Todos sections.
- Extensibility: The app is designed with extensibility in mind, making it easy to add new features in the future.
- Page Not Found: A custom 404 page is displayed when users try to access non-existent pages.
Clone the project :
git clone <repository-url>
Go to the project directory :
cd MERN_TODO_APP
- Start the backend server:
cd backend
Install the dependencies :
npm install
To run this project, you will need to create an .env file and add the following environment variables to your .env file:
PORT=<server-port>
MONGO_URL=<mongodb-connection-string>
CLIENT_URL=<client-side-url>
SECRET=<jwt-secret-key>
Launch the server :
npm start
- Start the frontend server:
cd client
Install the dependencies :
npm install
Launch the server :
npm run dev
To run this project, you will need to create an .env file and add the following environment variables to your .env file:
VITE_REACT_APP_API_KEY= backend_url
- Access the app in your web browser:
Open a web browser and access the application at http://localhost:5173
Note: Make sure to update the port number (5173
) according to your client server configuration.
Feel free to customize and enhance the project according to your needs and send pull requests.
NB: IF YOU MEET AN ERROR WHEN YOU TRY TO LOGIN OR SIGN UP , TRY TO DELETE bycrpt
FOLDER IN THE node_modules
FOLDER AND RE-INSTALL IT :
npm install bycrpt
You can meet this problem with OS X 10.13