A full-stack web application built with FastAPI, serving dynamic HTML pages styled with CSS and Bootstrap. This application supports user authentication, role-based access (admin/user), and task management with persistent storage using SQLite and Alembic for migrations.
- 🔐 User authentication (Login, Signup, Session management)
- 👤 Admin and regular user roles
- ✅ CRUD operations on Todo items
- 📄 HTML templates rendered with Jinja2
- 🎨 CSS/Bootstrap for responsive UI
- 🗃️ SQLite database with Alembic migrations
- 🧪 Interactive API docs using Swagger (FastAPI's
/docs)
Full-Stack-Application-main/
│
├── requirements.txt # Python dependencies
├── README.md # This file
├── TodoApp/
│ ├── main.py # FastAPI app entrypoint
│ ├── database.py # DB connection
│ ├── models.py # ORM models
│ ├── alembic.ini # Alembic config
│ ├── todosapp.db # SQLite DB / I use PostgreSQL in this project
│ ├── routers/ # Route definitions
│ │ ├── auth.py # Auth routes
│ │ ├── admin.py # Admin functionality
│ │ ├── users.py # User endpoints
│ │ └── todos.py # Todo logic
│ ├── static/css/ # Stylesheets
│ ├── templates/ # HTML templates
│ ├── alembic/ # Alembic migration scripts
│ │ └── versions/
- Clone the repository:
git clone https://github.com/mosipamo/Full-Stack-Application.git
cd Full-Stack-Application/TodoApp- Create a virtual environment and activate it:
python -m venv env
source env/bin/activate # On Windows use `env\Scripts\activate.bat`- Install dependencies:
pip install -r requirements.txt- Run database migrations (Alembic):
alembic upgrade head- Run the FastAPI server:
cd ..
uvicorn TodoApp.main:app --reload- Visit the app:
- Web UI: http://127.0.0.1:8000
- API Docs (Swagger): http://127.0.0.1:8000/docs
FastAPI provides a built-in, interactive Swagger UI at /docs, where you can:
- Test all API routes (auth, user management, todos)
- Inspect request/response schemas
- View and debug endpoints easily during development
- FastAPI
- Jinja2 Templates
- SQLite/PostgreSQL + SQLAlchemy
- Alembic (DB migrations)
- HTML, CSS, Bootstrap
- Uvicorn (ASGI server)