Skip to content

HarshTiwari-err/TODO_MERN_APP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mern Todo App

A MERN-based todo app with user authentication and authorization for secure task management and user-specific access control.

Things To Know

If page is not responding try again in 1 minute (It is because of render coldstart)

Change MONGODBURI in ./server env file to your own MongoDB account.
In deployed frontend signup may respond slow for the first time because of Render service.

DEMO ACCOUNT

Email Address : [email protected] Password : powerpoint

Demo

Demo.mp4

Screenshots

Authentication Flow

JWTAUTH

MiddleWare Authorization

Auth Middleware

Signup Page

Sign Up

LogIn Page

Log In

Landing Page

Landing Page

Logout

Logged Out

Run Locally

Clone the project

  git clone https://github.com/HarshTiwari-err/TODO_MERN_APP.git

Go to the project directory

  cd TODO_MERN_APP

Server directory

  cd server

Install dependencies

  npm install

Start the server

  npm run dev

Client directory

  cd client

Install dependencies

  npm install

Start the server

  npm start

API Reference

You can use TODOAPI.postman_collection.json and import into postman to run the API in postman.

UserAPI

HTTP Verbs Endpoints Action
POST /user/signup To sign up a new user account
POST /user/login To login an existing user account

TodoAPI

HTTP Verbs Endpoints Action
POST /todo/createtodo To create new todo
GET /todo/gettodos To get all todos of user
GET /todo/gettodo/:todoid To get todo by id
PUT /todo/editTodo/:todoid To edit todo by id
DELETE /deletetodo/:todoid To delete todo by id
POST /createtask/:todoid To create task for given todoid
GET /gettasks/:todoid To get tasks for todoid
DELETE /deletetask/:todoid To delete tasks for todoid
GET /sortTodo To Sort todo based on Time

FAQ

Have You Provided default MONGODB_URL?

Yes I have Provided my MONGODB_URL in .env file, you can change it to your URL too.

Do I need to change PORT?

There is no need to Change the PORT. Backend will run on Port 4000 and frontend will be on 3000 Port.

Did I implemented AUTH?

Yes I did implement the auth by using JWT Authentication technique and as for protected route I made auth.js middleware.

Deployment

First Signup and Login Request may take some time because of Render platform

Lessons Learned

What did you learn while building this project?

While building this MERN todo app with authentication and authorization, I learned valuable skills in frontend and backend development, user authentication, and access control. I gained experience in creating secure and scalable web applications and deploying the application.