Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

delitamakanda/banky

Repository files navigation

Banky – Budget App

Django CI

Banky is a Django-powered budgeting and current-account API designed to help teams prototype financial workflows such as deposits, withdrawals, and balance limits. The project exposes a REST API backed by Django REST Framework and includes auto-generated documentation via drf-spectacular.

Table of contents

Features

  • Account lifecycle operations with strict limits on deposits, withdrawals, and aggregated balances.
  • Server-side validation for invalid amounts, exceeded limits, and insufficient funds.
  • Token, session, and basic authentication out of the box via Django REST Framework.
  • Interactive API documentation powered by drf-spectacular (Swagger UI and ReDoc).
  • Production-friendly defaults including WhiteNoise for static files, CORS headers, and security-focused settings sourced from environment variables.

Project structure

banky/
├── api/                  # REST API application (models, views, serializers, errors, custom commands)
├── config/               # Django settings, URL routing, and WSGI entrypoint
├── docs/                 # Design references and research notes
├── static/ & templates/  # Front-end assets served by Django
├── tests/                # Django test cases for the account domain
├── manage.py             # Django management utility
└── swagger_.png          # Screenshot of the generated Swagger UI

Requirements

  • Python 3.13 (see runtime.txt)
  • pip 23.0+
  • SQLite (bundled with Python) or another Django-supported database

All configuration values (e.g., SECRET_KEY, DEBUG, and ALLOWED_HOSTS) are loaded through python-decouple. Create a .env file at the project root or export the variables in your shell before running the application.

Quick start

1. Clone and configure the project

# Clone the repository
$ git clone https://github.com/delitamakanda/banky.git
$ cd banky

# (Optional) create and activate a virtual environment
$ python3 -m venv .venv
$ source .venv/bin/activate

# Install dependencies
(.venv) $ python -m pip install --upgrade pip
(.venv) $ pip install -r requirements.txt

2. Apply database migrations

(.venv) $ python manage.py migrate

3. Create an admin user

You can create a superuser manually:

(.venv) $ python manage.py createsuperuser

Alternatively, run the bundled helper which generates credentials when none exist:

(.venv) $ python manage.py makesuperuser

4. Launch the development server

(.venv) $ python manage.py runserver

The site will be available at http://127.0.0.1:8000/.

Running the tests

Use Django's test runner to execute the suite located in the tests/ package:

(.venv) $ python manage.py test

API documentation

Once the server is running you can explore the API contract through the automatically generated UIs:

A preview of the Swagger documentation is included below.

Swagger Banky API

Management commands

In addition to the default Django commands, the project ships with:

  • makesuperuser – creates a superuser with a random password when none exist.

List the available commands with python manage.py help.

Static assets

Static files are collected into staticfiles/ via WhiteNoise. To rebuild assets for deployment run:

(.venv) $ python manage.py collectstatic

This command is typically executed automatically by hosting providers such as Heroku or Render when deploying the application.

About

budget api django and djangorestframework

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages