Skip to content

MothScientist/BudgetGraph

UnitTests ScriptsTest Pylint Static Badge Status

GIF

homepage

Project objectives:

  • Creating temporary groups (for example, to track travel expenses)

  • Full details of your income and expenses (website and bot)

  • Maximum reliability and fault tolerance

  • Analytics in text and graphic format

  • Flexible group management

  • High priority testing

Technology Version
Python 3.12.2
Flask 3.0.2
pyTelegramBotAPI 4.16.1
Postgres 16.2

Testing:

  • Python UnitTest
  • Pytest
  • Selenium (will be added in upcoming updates)

Launch and deployment:

  • Docker (Docker compose)
  • Nginx (will be added in upcoming updates)

You can also find configuration files for:
GitHub ActionsDependabot

For developers:

requirements.txt contains the dependencies required for the applications to work.
requirements_external.txt contains dependencies required for development.

To successfully pass the GitHub Action tests, you need to create secrets inside the repository with the names specified in the .yml file. This is necessary for the script to create a .env file, which is necessary to connect to the database, telegram bot and encrypt Flask sessions.

Note about hashlib.pbkdf2_hmac():

Changed in version 3.12: Function now only available when Python is built with OpenSSL. The slow pure Python implementation has been removed.

Installation:

For Linux (with Docker):

  1. Clone the repository:
    git clone https://github.com/MothScientist/budget_control.git

  2. Go to the project directory:
    cd app

  3. Create .env file:
    SECRET_KEY="secret_key_for_encrypt_Flask_session"
    BOT_TOKEN="bot_token"
    DATABASE="db_name.sqlite3"

  4. Return to the previous directory:
    cd ..

  5. Running a bash script:
    ./deploy.sh

For Linux (without Docker):

  1. Clone the repository:
    git clone https://github.com/MothScientist/budget_control.git

For Windows (with Docker Desktop):

  1. Clone the repository:
    git clone https://github.com/MothScientist/budget_control.git

  2. Go to the project directory:
    cd app

  3. Create .env file:
    SECRET_KEY="your_secret_key_for_Flask_session"
    BOT_TOKEN="your_token"
    DATABASE="db_name.sqlite3"

  4. Return to the previous directory:
    cd ..

  5. Run Docker Desktop

  6. Running a PowerShell script:
    ./deploy_windows.ps1

For Windows (without Docker Desktop):

  1. Clone the repository:
    git clone https://github.com/MothScientist/budget_control.git

  2. Make sure you have the version of Python used in the project installed.

  3. Create .env file:
    SECRET_KEY="your_secret_key_for_Flask_session"
    BOT_TOKEN="your_token"
    DATABASE="db_name.sqlite3"

  4. Return to the previous directory:
    cd ..

  5. Running a PowerShell script:
    ./run_on_windows_without_container.ps1

For all users:

  1. Clone the repository:
    git clone https://github.com/MothScientist/budget_control.git

  2. Make sure you have the version of Python used in the project installed.

  3. Install backend dependencies:
    pip install -r requirements.txt

  4. Go to the project directory:
    cd app

  5. Create .env file:
    SECRET_KEY="your_secret_key_for_Flask_session"
    BOT_TOKEN="your_token"
    DATABASE="db_name.sqlite3"

  6. Database and directories creation:
    python build_project.py

  7. Running project files:
    python webapp.py
    python bot.py

How to run testing:

License

This source code is distributed under AGPL - 3.0.