Statok - is an application for money management. It provides REST API and Web Application, which allows user to manage his budget:
- Add infomation about his incomes and expenses in a form of operations;
- Manage incomes and expenses categories;
- Sort operations by categories;
- View list of all operations and categories;
- View operations statistics and total avaiable budget;
- Flask as web framework
- MySQL as database
- SQLAlchemy + Alembic as ORM and migrations management
- Pydantic as data validator
- pytest as framework for testing
- Travis-CI as CI/CD
- Coveralls.io + Coverage as code coverage tracker
Before building, make sure you have python>=3.9 and MySQL installed and configured. Also, It is recommended to build inside separate virtual environment:
- Clone repository (
git clone https://github.com/feelofgoodvibes/statok
) - Install dependencies (
pip install -r requirements.txt
orpip install .
) - Set global environment variables
MYSQL_USER
andMYSQL_PASS
(username and password for MySQL) - Create database
statok_db
(CREATE DATABASE statok_db
via mysql-shell) - Change working directory to
statok_app
(cd statok_app
). Apply migrations to database schema:-
flask db upgrade +1
- to create only database tables -
flask db upgrade
- to create database tables and populate them with test data
-
- Go back to project root directory (
cd ..
) - Run application:
gunicorn "statok_app.app:create_app()"
🎉 App is up and running!
It is available at the address and port specified in the gunicorn.conf.py
configuration file (by default http://localhost:5000
)