Skip to content
This repository was archived by the owner on Mar 15, 2026. It is now read-only.

amariwan/fullstack-auth-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

112 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fullstack Auth System (React + Node.js + MySQL)

Production-like authentication sample application showing secure sign-up/login, JWT/Session handling, RBAC and best practices for modern web apps.


✅ What is this?

  • Full-stack demo (React frontend + Node/Express backend + MySQL)
  • Focused on secure user authentication and session management
  • Includes protected routes, role-based access, token refresh, password hashing and security headers

⚙️ Tech stack

  • Frontend: React, React Router, Axios
  • Backend: Node.js, Express, Passport, JWT
  • Database: MySQL
  • Security: bcrypt, helmet, CORS, CSRF protection, secure cookies

🚀 Quick start

1) Clone

git clone https://github.com/amariwan/fullstack-auth-system.git
cd fullstack-auth-system

2) Install dependencies

cd backend && npm install
cd ../frontend && npm install

3) Configure environment variables

Copy the template and set your values:

cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.env

4) Start (dev)

# backend
cd backend && npm run dev
# frontend (in a separate terminal)
cd frontend && npm start

🔒 Security notes

  • Uses bcrypt to hash passwords
  • Uses HTTP-only cookies for session tokens
  • Includes CSRF protection for state-changing requests
  • Includes helmet + recommended security header defaults

📌 Want to extend it?

  • Add MFA (TOTP / SMS)
  • Add OAuth providers (Google, GitHub)
  • Add email confirmation flows
  • Add rate limiting / brute force protection

License

MIT

About

Full-stack authentication system (React + Node.js + MySQL) with JWT, session handling and role-based access control.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors