A full-stack Student Database Management System developed using FastAPI, PostgreSQL, and Vanilla JavaScript, focused on secure authentication, student record management, and a clean dashboard UI.
This project is built from scratch, covering backend API development, database integration, authentication, and frontend dashboard implementation.
The main goal of this project is to:
- Learn and implement FastAPI with PostgreSQL
- Build JWT-based authentication
- Perform CRUD operations on student data
- Design a secure, protected dashboard
- Follow real-world project structure and practices
This project is suitable for:
- Academic projects
- Backend / Full-Stack interviews
- Learning REST APIs with authentication
- FastAPI
- SQLAlchemy ORM
- PostgreSQL
- JWT Authentication
- Pydantic Schemas
- Uvicorn
- HTML
- CSS (custom glassmorphism UI)
- JavaScript (Fetch API)
- JWT stored in LocalStorage
student-db-project/
β
βββ backend/
β βββ main.py # FastAPI app (auth + student APIs)
β βββ database.py # PostgreSQL connection
β βββ models.py # SQLAlchemy models
β βββ schemas.py # Pydantic schemas
β βββ crud.py # Database operations
β βββ auth.py # Password hashing
β βββ security.py # JWT token logic
β
βββ frontend_dev/
βββ css/
β βββ style.css
β
βββ js/
β βββ students.js
β
βββ index.html # Home page
βββ login.html # Login page
βββ signup.html # Signup page
βββ dashboard.html # Dashboard
βββ students.html # Students list (View / Delete)
βββ add_edit_student.html # Add & Edit student
- User registers using Signup
- User logs in using Login
- Backend verifies credentials and generates a JWT access token
- Token is stored in browser localStorage
- Token is sent in request headers for protected APIs
- Unauthorized users are redirected to login page
Authorization: Bearer <JWT_TOKEN>- User signup
- User login
- Password hashing
- JWT token generation and validation
- View all students
- Add new student
- Edit existing student
- Delete student
- Active / Inactive status handling
- Protected dashboard (JWT required)
- Sidebar navigation
- Students list in tabular format
- Add/Edit student using single form page
- Logout functionality
| Method | Endpoint | Description |
|---|---|---|
| POST | /signup |
Register new user |
| POST | /login |
Login and get JWT |
| Method | Endpoint | Description |
|---|---|---|
| GET | /students |
Get all students |
| GET | /students/{id} |
Get student by ID |
| POST | /students |
Add student |
| PUT | /students/{id} |
Update student |
| DELETE | /students/{id} |
Delete student |
| GET | /students/filter |
Filter students |
git clone https://github.com/NeeleshSingh/student-db-project.git
cd student-db-projectpython -m venv venv
venv\Scripts\activate # Windowspip install fastapi uvicorn sqlalchemy psycopg2-binary passlib[bcrypt] python-joseuvicorn main:app --reloadBackend URL:
http://127.0.0.1:8000
Fronted URL :
https://fullstack-project-frontend-rj28.onrender.com
- Create a PostgreSQL database
- Update credentials in
database.py - Tables are auto-created on server startup
- Open
frontend_devfolder - Run using Live Server OR open
index.html - Ensure backend server is running
- Open
index.html - Signup with email & password
- Login
- Access dashboard
- View students
- Add / Edit / Delete students
- Logout
- REST API design using FastAPI
- JWT authentication implementation
- PostgreSQL integration with SQLAlchemy
- Frontend & backend separation
- Secure route handling
- Clean, modular project structure
- Pagination & sorting
- Advanced filtering UI
- Dashboard analytics (charts)
- Role-based access (Admin/User)
- Light/Dark mode toggle
Neelesh Singh B.Tech β Computer Technology (AI Focus) Python | FastAPI | PostgreSQL | Data Analytics | Machine Learning
This project was developed as a hands-on learning project, focusing on practical backend development, authentication, and CRUD workflows.
If you find this project useful, consider giving it a β on GitHub.