Skip to content

About

Successfully implemented a backend system to track personal and organizational finances, built with FastAPI and SQLite. It focuses on secure user access, clear financial insights, and a well structured API for real world use.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Zorvyn Finance System Backend

A robust Python-based finance tracking system built with FastAPI and SQLAlchemy (SQLite). This project demonstrates clean architecture, role-based access control (RBAC), and automated financial reporting.

Features

  • User Management: Authentication using JWT tokens.
  • Role-Based Access Control:
    • Admin: Full CRUD access to all transactions and user management.
    • Analyst: View all records and access detailed financial summaries.
    • Viewer: Can view their own transactions and personal financial summaries.
  • Financial Records: Store transactions with amount, type, category, and date.
  • Summaries & Analytics:
    • Total Income / Expenses / Balance.
    • Category-wise breakdown.
    • Monthly trends.
    • Recent activity tracking.
  • Modern API: Interactive documentation with FastAPI/Swagger.

Tech Stack

  • Framework: FastAPI
  • Database: SQLite (SQLAlchemy ORM)
  • Security: JWT (Jose), Bcrypt
  • Validation: Pydantic v2

Project Structure

.
├── app/
│   ├── api/          # API Route handlers
│   ├── core/         # Settings and constants
│   ├── db/           # Database session logic
│   ├── models/       # SQLAlchemy models
│   ├── schemas/      # Pydantic schemas (validation)
│   └── services/     # Business logic
├── tests/            # Pytest suite
├── scripts/          # Seeding and utility scripts
├── main.py           # Application entry point
└── requirements.txt  # Dependencies

Setup & Running

  1. Install Dependencies:

    pip install -r requirements.txt
  2. Seed the Database:

    python scripts/seed_db.py

    This creates test users: admin, analyst, and sayam (default passwords are role123, e.g., admin123).

  3. Run the Application:

    uvicorn main:app --reload
  4. Access Documentation: Visit http://127.0.0.1:8000/docs to explore the REST API.

Assumptions

  • Only users with the admin role can create, update, or delete transaction records (as per 'Admin can manage records' requirement).
  • Viewer can only see their own transactions to ensure privacy.
  • Analyst has read access to the entire system's financial health but cannot modify entries.

About

Successfully implemented a backend system to track personal and organizational finances, built with FastAPI and SQLite. It focuses on secure user access, clear financial insights, and a well structured API for real world use.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages