Skip to content

Prasiddhi26/secure-auth-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Full Stack Task Management System (MERN)

A scalable Full Stack Task Management App built using React.js, Node.js, Express, and MongoDB with JWT Authentication and Role-Based Access Control.


📌 Features

🔐 Authentication

  • User Registration & Login
  • Password hashing using bcrypt
  • JWT-based authentication

👥 Role-Based Access

  • Admin and User roles
  • Admin can access all tasks
  • Users can access only their own tasks

📋 Task Management (CRUD)

  • Create Task
  • Read Tasks
  • Update Task
  • Delete Task
  • Task fields: title, description, status (pending/completed)

🛡 Security

  • Protected routes using JWT middleware
  • Input validation using Joi
  • Role-based authorization middleware

🛠 Tech Stack

Frontend

  • React.js
  • Axios
  • JavaScript
  • Inline CSS

Backend

  • Node.js
  • Express.js
  • MongoDB + Mongoose
  • JWT Authentication
  • bcrypt.js
  • Joi Validation

⚙️ Installation & Setup

1️⃣ Clone Repository

git clone https://github.com/Prasiddhi26/secure-auth-api.git
cd secure-auth-api

2️⃣ Backend Setup

cd backend
npm install

Create .env file

PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key

Run backend

npm start

3️⃣ Frontend Setup

cd frontend
npm install
npm start

🔗 API Endpoints

Auth Routes

  • POST /api/auth/register
  • POST /api/auth/login

Task Routes (Protected)

  • GET /api/v1/tasks
  • POST /api/v1/tasks
  • PUT /api/v1/tasks/:id
  • DELETE /api/v1/tasks/:id

👨‍💻 Author

Prasiddhi Shetty

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors