Skip to content

Team-SMDRS/MicroBankingSystem-Backend

Repository files navigation

🏦 BTrust Banking System

A modern microbanking backend built with FastAPI, PostgreSQL, and JWT authentication.

🎬 Demo Video

BTrust Banking System Demo

Watch Demo: https://youtu.be/HFerK6FWCj8

Demo Website

Demo Credentials

Agent Login:

  • Username: agent1 | Password: 1234
  • Username: agent2 | Password: 1234
  • Username: agent3 | Password: 1234

Customer Login:

  • Username: mycustomer | Password: 1234

Quick Start

Option 1: Docker (Recommended)

git clone <your-repo-url>
cd MicroBankingSystem-Backend
docker compose up --build

Access: http://localhost:8000/docs

Option 2: Manual Setup

python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload

Access: http://127.0.0.1:8000/docs

Features

  • 🔐 JWT Authentication & Role-Based Access Control
  • 👥 Account Management (Savings, Current, Joint Accounts)
  • 💳 Transaction Processing & Transfers
  • 📊 Fixed Deposits & Savings Plans
  • 📈 Branch Management & Analytics
  • 📄 PDF Report Generation
  • 🏢 Multi-Branch Support

Tech Stack

  • Framework: FastAPI
  • Database: PostgreSQL
  • Authentication: JWT + Bcrypt
  • ORM: SQLAlchemy

Project Structure

app/
  ├── api/              # Route handlers
  ├── repositories/     # Data access layer
  ├── services/         # Business logic
  ├── schemas/          # Request/Response models
  ├── middleware/       # Auth & permissions
  └── database/         # Database connection
schema/                 # Database migrations
tests/                  # Test suite

API Endpoints

  • POST /api/auth/login - Login
  • GET/POST /api/account-management - Account operations
  • POST /api/transaction - Transfer funds
  • POST /api/fixed-deposit - Create fixed deposit
  • POST /api/savings-plan - Create savings plan
  • GET /api/branch - Branch information
  • GET /api/overview - Dashboard & reports

See /docs for full API documentation.

Environment Setup

Create .env file:

DB_HOST=localhost
DB_PORT=5432
DB_NAME=btrust_bank
DB_USER=postgres
DB_PASSWORD=your_password
JWT_SECRET=your_secret_key

Contributing

Contributions are welcome! Please follow PEP 8 style guidelines and add tests for new features.

Note

This is a university project where the use of ORM (Object-Relational Mapping) frameworks is not allowed. Therefore, we use raw SQL queries for all database operations to directly interact with PostgreSQL.


Built with ❤️ by Team SMDRS

About

Group project - Semester 3

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6