Skip to content

KrishTalwar03/fastapi-auth-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

FastAPI Authentication & Admin Management System

A complete authentication and user-management system built with FastAPI, SQLite, and JWT authentication, featuring an industry-grade UI.


🚀 Features

🔐 Authentication

  • Login with JWT
  • Role-based access (admin, user)
  • Secure password hashing (bcrypt)

👨‍💼 Admin Features

  • View all users
  • Add new users
  • Change user role (inline dropdown)
  • Delete users
  • Admin-only protected APIs

👤 User Features

  • Login & access user dashboard
  • Restricted admin routes

🎨 Frontend (Static HTML)

  • Professional UI (Login, Admin, Records, User)
  • Add user via UI
  • Edit role inline
  • Delete user with confirmation

💾 Database

  • SQLite (auth.db)
  • Real-time updates visible in DB Browser

🗂 Project Structure

FastAPI Authentication & Admin Management System

A complete authentication and user-management system built with FastAPI, SQLite, and JWT authentication, featuring an industry-grade UI.


🚀 Features

🔐 Authentication

  • Login with JWT
  • Role-based access (admin, user)
  • Secure password hashing (bcrypt)

👨‍💼 Admin Features

  • View all users
  • Add new users
  • Change user role (inline dropdown)
  • Delete users
  • Admin-only protected APIs

👤 User Features

  • Login & access user dashboard
  • Restricted admin routes

🎨 Frontend (Static HTML)

  • Professional UI (Login, Admin, Records, User)
  • Add user via UI
  • Edit role inline
  • Delete user with confirmation

💾 Database

  • SQLite (auth.db)
  • Real-time updates visible in DB Browser

🗂 Project Structure

auth_api/ │ ├── main.py ├── auth.db ├── requirements.txt ├── README.md │ ├── database/ │ ├── db.py │ └── models.py │ ├── models/ │ └── user_models.py │ ├── services/ │ └── user_service.py │ ├── routes/ │ └── auth_routes.py │ ├── utils/ │ ├── jwt.py │ └── password.py │ ├── static/ │ ├── login.html │ ├── admin.html │ ├── records.html │ ├── user.html │ ├── forget_password.html │ └── reset_password.html │ └── test_api.py (optional)


▶️ How to Run the Project

1️⃣ Activate virtual environment

.venv\Scripts\activate

### 2️⃣ Start Server
uvicorn main:app --reload

### 3️⃣ Open Browser
http://127.0.0.1:8000

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published