QuickDBAPP is a User Management System built with FastAPI, SQLAlchemy, and SQLite. This application provides basic CRUD (Create, Read, Update, Delete) operations for managing users. The frontend is built using HTML.
- Add User: Add a new user to the system.
- View Users: View a list of all users in the database.
- Update User: Edit the user details (name, email).
- Delete User: Remove a user from the database.
- Frontend: Basic HTML frontend with forms and user management features.
- Backend: FastAPI
- Database: SQLite (SQLAlchemy ORM)
- Frontend: HTML
- Static Files: CSS
Follow these steps to set up QuickDBAPP locally.
Clone the repository to your local machine:
git clone https://github.com/your-username/QuickDBAPP.git
cd QuickDBAPPIt’s recommended to use a virtual environment for Python dependencies:
python -m venv envActivate the virtual environment:
- On Windows:
.\env\Scripts\activate
- On macOS/Linux:
source env/bin/activate
Install the necessary dependencies:
pip install -r requirements.txtAfter setting up the virtual environment and installing the dependencies, you can start the FastAPI server:
uvicorn mainapp.main:app --reloadThe app will run on http://127.0.0.1:8000. You can access the frontend at this URL and perform CRUD operations on users.
FastAPI automatically generates documentation for the API. You can access it at:
The database is automatically created upon starting the application. The User table is created in an SQLite database (database.db) to store user details. You can find this file in the project directory.
QuickDBAPP/
├── env/ # Virtual environment
├── mainapp/ # Main application code
│ ├── __init__.py # Init file for the app
│ ├── database.py # Database connection and session management
│ ├── main.py # FastAPI app and routes
│ ├── models.py # SQLAlchemy models for the database
│ ├── schemas.py # Pydantic schemas for data validation
│ ├── static/ # Static files (e.g., CSS)
│ ├── templates/ # HTML templates
│ └── database.db # SQLite database file
└── requirements.txt # Project dependencies