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

 
 
 

Contributors