Skip to content

soniyaritgithub/rbac-auth-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RBAC Authentication System

A Full Stack Role Based Authentication System built using Spring Boot, React, JWT Authentication and MySQL. The system provides secure authentication, authorization, protected routes and role-based access control.


Features

✅ User Registration
✅ JWT Authentication
✅ Login / Logout Functionality
✅ Role Based Access Control (RBAC)
✅ Protected Routes
✅ Admin Route Protection
✅ Responsive UI (Mobile / Tablet / Desktop)
✅ Swagger API Documentation
✅ Dashboard with User Information
✅ Admin Dashboard Access Control


Tech Stack

Frontend

  • React
  • TypeScript
  • Tailwind CSS
  • Axios
  • React Router DOM

Backend

  • Spring Boot
  • Spring Security
  • JWT Authentication
  • MySQL
  • Swagger OpenAPI
  • Maven

Deployment Links

Frontend Deployment

https://rbac-auth-system.vercel.app/

Backend Deployment

https://rbac-auth-system-u5m9.onrender.com/

Swagger

https://rbac-auth-system-u5m9.onrender.com/swagger-ui/index.html


Project Structure

frontend/
├── src/
│   ├── pages/
│   ├── components/
│   ├── services/

backend/
├── src/
├── pom.xml

Setup Instructions

Backend Setup

Open backend folder:

cd backend

Run backend:

.\mvnw.cmd spring-boot:run

Backend URL:

http://localhost:8080

Frontend Setup

Open frontend folder:

cd frontend

Install dependencies:

npm install

Run frontend:

npm run dev

Frontend URL:

http://localhost:5173

API Endpoints

Method Endpoint Description
POST /auth/register Register User
POST /auth/login Login User
GET /auth/me Current User
GET /admin/* Admin Protected APIs
GET /user/* User Protected APIs

JWT Authentication Flow

Register User
      ↓
Login
      ↓
JWT Token Generated
      ↓
Store Token in LocalStorage
      ↓
Protected API Access

Screenshots

Login Page

Login Page

Register Page

Register Page

Dashboard (USER)

Dashboard USER

Dashboard (ADMIN)

Dashboard ADMIN

Admin Page

Admin Page

Swagger Documentation

Swagger

Mobile Responsive View

Mobile View


Author

Name: Sunidhi Shinde

GitHub:

https://github.com/soniyaritgithub

LinkedIn:

https://www.linkedin.com/in/sunidhishinde/

About

Developed a secure full-stack authentication platform as part of a technical assignment for BotMakers Pvt. Ltd. Implemented JWT authentication, role-based authorization (ADMIN/USER), protected APIs, Swagger documentation, database integration, and cloud deployment using Render and Vercel.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors