A production-style banking management platform with a single FastAPI server that serves both:
- REST API (
/api/*) - Vanilla JavaScript frontend (
client/)
This project demonstrates core banking operations, role-based authorization, approval workflows, reversals, audit logs, reporting, and simulation scenarios.
- Backend: FastAPI, SQLAlchemy 2.x, Uvicorn
- Database: PostgreSQL (
psycopg2-binary) - Authentication: JWT (
python-jose) + password hashing (passlib[bcrypt]) - Frontend: HTML, CSS, Vanilla JavaScript
- User login/logout with JWT token verification
- Role-based access:
admin,manager,teller,auditor - Account listing, search, creation, freeze/unfreeze
- Deposits, withdrawals, and transfers
- Teller transfer approval flow when daily limit is exceeded
- Transaction reversal flow with history trail
- Full audit log and reporting endpoints
- Transaction simulation (success/failure/stuck/recovery/bulk)
client/frontend pages, styles, and feature modulesfastapi_server/active FastAPI backendsql/schema.sqlPostgreSQL schema + seed dataCOMPLETE_PROJECT_DESCRIPTION.mdfull study guide (architecture + workflows + Q&A)
psql -U postgres -c "CREATE DATABASE banking_system;"
psql -U postgres -d banking_system -f h:\dbmsproject_fastapi\dbmsproject\sql\schema.sqlcd h:\dbmsproject_fastapi\dbmsproject\fastapi_server
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
copy .env.example .env
python run.py- App URL:
http://localhost:3000 - API health:
http://localhost:3000/api/health
APP_NAME=Banking Management System API
ENV=development
HOST=0.0.0.0
PORT=3000
JWT_SECRET=change_me_to_a_long_random_secret
JWT_EXPIRES_MINUTES=1440
DATABASE_URL=postgresql+psycopg2://postgres:postgres@localhost:5432/banking_systemAfter running sql/schema.sql, use:
admin / password123manager1 / password123teller1 / password123auditor1 / password123
/api/auth- login, logout, session verify/api/dashboard- summary, recent activity, system health/api/accounts- account and holder operations/api/transactions- transaction operations and history/api/approvals- manager/admin approval workflow/api/reversals- transaction reversal operations/api/logs- audit log browsing and filters/api/reports- analytics and KPI endpoints/api/simulation- test scenario generation/recovery
- Frontend is served by FastAPI static mount from
client/ - API base path is
/apiand already wired inclient/js/api.js - SQL schema is currently the source of truth for DB structure and seed users
- GitHub overview: this file (
README.md) - Complete project study guide:
COMPLETE_PROJECT_DESCRIPTION.md
Legacy docs were consolidated; older markdown files now point to the two docs above.