Skip to content

Latest commit

 

History

History
65 lines (51 loc) · 2 KB

File metadata and controls

65 lines (51 loc) · 2 KB

User Management CRUD Application

A full-stack User Management system built with FastAPI, SQLAlchemy, and PostgreSQL, featuring a premium, responsive glassmorphism UI.

Features

  • Full CRUD: Create, Read, Update, and Delete users.
  • Modern UI: Sleek, glassmorphism design with smooth animations and responsive layout.
  • PostgreSQL: Robust data persistence with SQLAlchemy ORM.
  • CORS Support: Ready for cross-origin frontend interactions.
  • Input Validation: Backend validation using Pydantic schemas.

Prerequisites

  • Python 3.8+
  • PostgreSQL (with a database created, e.g., test_db)

Project Setup

1. Create a Virtual Environment

python -m venv venv
.\venv\Scripts\Activate.ps1

2. Install Dependencies

pip install fastapi uvicorn sqlalchemy sqlalchemy-stubs pydantic email-validator psycopg2-binary

3. Configure Database

Update the database credentials in app/database.py:

user = "postgres"
password = "your_password"
host = "127.0.0.1"
db_name = "test_db"

Note: The application uses urllib.parse.quote_plus to handle special characters in the password.

4. Run the Application

uvicorn app.main:app --reload

Accessing the Application

Project Structure

├── app/
│   ├── main.py        # FastAPI entry point & routes
│   ├── models.py      # SQLAlchemy models
│   ├── schemas.py     # Pydantic schemas
│   ├── crud.py       # CRUD utility functions
│   └── database.py    # Database connection setup
├── static/
│   ├── index.html     # Frontend HTML
│   ├── style.css      # Premium CSS styling
│   └── script.js      # Frontend JS logic
└── README.md          # Documentation