Have fun playing around with the various state transitions for borrower invoices.
NOTE: Unless otherwise specified, commands should be run from the same directory in which this README is located.
-
Install asdf.
-
Install
asdf
plugins:- asdf-nodejs:
asdf plugin add nodejs
- asdf-python:
asdf plugin-add python
- asdf-nodejs:
-
Install language runtimes using
asdf
:asdf install
-
Install dependencies:
- Backend:
- Initialize virtual environment:
source bin/activate
- Install dependencies:
pip install -r requirements.txt
- Init the database:
flask --app flaskr init-db
- Initialize virtual environment:
- Frontend:
cd ./frontend && npm install
- Backend:
-
To run the backend:
flask --app flaskr run --debug
-
To run the frontend:
cd ./frontend/ && npm run dev
In your browser, visit the URL displayed when running the frontend to view the application.
pytest
cd ./frontend && npm run test
- This app uses a state machine to prevent invoices from making invalid state transitions.
- This app uses Flask Blueprints to organize code.
- This app does not currently use an ORM for the sake of simplicity and uses SQLite3 as its DB for the same reason.
- Original gist with challenge and instructions: https://gist.github.com/thiagosil/ee725fa09c796a1b5727afaac07c6bc7
- This project was adapted from a Rails template repository: https://github.com/Finvoice/xen_base_challenge
See CONTRIBUTING.md
in this directory.