The database and endpoints to interact with the database are here. This README describes how the backend program would work without the project's frontend.
Currently only three endpoints are implemented. Many of tests are stubs and comments. One integeration test exists.
There are almost no validations or input sanitization. There are TODOs for implementing them.
In order to run the backend, install python3 and pip3, then run the following line to install the necessary packages:
pip3 install -r requirements.txt
Run the following line to start the program:
python3 -m uvicorn src.main:app
The homepage is at http://127.0.0.1:8000 but an endpoint does not currently exist for the homepage. To interact with the program, visit the following pages:
- Go to http://127.0.0.1:8000/reimbursements to see a list of reimbursements. By default, the program adds three random reimbursements.
- Go to http://127.0.0.1:8000/docs to see the three current endpoints and test them out. http://127.0.0.1:8000/redoc can also be used to see the endpoint details.
Only one integration test is currently implemented, the rest are skeletals. Run everything by running pytest
.
There are currently no unit tests, only TODO comments. There is only one integration test, the rest are stubs/TODO comments.
The files are organized in the following manner:
- src: contains the program
- tst: contains unit tests (only comments at this time)
- tst_integ: contains integration tests (mainly stubs at this time)
Most of the tables that created are currently not used. The design for the tables currently assumes that only bank exists per database. If multiple banks need to be in the database, a foregin key of bank_id
can be added to the necessary tables.
- Notify bank memebers of reimbursement approvals
- Notify bank administrators of reimbursement submissions
- If the project grows: separate models/endpoints/etc to their folders and files.