A self hostable API for personal expense tracking built with FastAPI
There are many great Open Source options for personal finance tracking. However, I felt like they were either too feature full or lacking particular features I was looking for. Pexa strives to achieve a middle ground where it can track your personal finances and share the progress with your significant other so that multiple people can register expenses on the same account.
Primary:
- Simple expense tracking to allow client front-ends to graph information in a simple way
- Allow multiple users to record expenses in the same account (Great for couples)
- Easy to self host
North star:
- Build an API Standard that can be integrated with custom UI client applications (both desktop and mobile) to achieve a modular ecosystem
- Support delay tolerant operation (register your expenses when you're offline in your client app and then sync when you're connected)
I chose FastAPI because python was my first language and since I'm not a back-end engineer, I preferred to ignore the barrier of a new language to make it easier to progress. I've built a couple tools using Django and worked in a professional setting with Flask, so I wanted to learn a new framework and FastAPI seemed promising.
Contributions are welcome! 😄
If you wish to contribute:
- Fork the project and create a PR.
- Create an issue on this repo.
- I have a Discord for my projects, I can add you to it.
This is my first Open Source project that I am looking for contributions for and I am still learning how to manage this 😊
- Copy
.env.exampleto.envand fill in secrets. - Install dependencies:
make venv
make install- Run the app locally:
uvicorn app.main:app --reload- Quickly setup a user for manual testing
make db-init
Build and run with Docker:
cd pexa
docker build -t pexa .
docker run -p 8000:8000 \
-v $(pwd)/.env:/app/.env \
-v $(pwd)/db.sqlite3:/app/db.sqlite3 \
pexa
NOTE: make sure to have .env on the directory you're running the docker command on. This will also create a database file if it doesn't exist.
To run the test suite:
make testThis will execute all tests in the tests/ directory using your current environment and database. For a clean test run, ensure your virtual environment is activated and dependencies are installed.
This project is licensed under the terms of the MIT license.