Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A self hostable API for personal expense tracking built with FastAPI

License

Notifications You must be signed in to change notification settings

TiagoMauricio/pexa

Repository files navigation

Pexa - Personal Expense API

A self hostable API for personal expense tracking built with FastAPI

Context

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.

⚠️ This API is still in early stages of development.

Goal

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)

Technology

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.

Contributing

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 😊

Setup

  1. Copy .env.example to .env and fill in secrets.
  2. Install dependencies:
make venv
make install
  1. Run the app locally:
uvicorn app.main:app --reload
  1. Quickly setup a user for manual testing
make db-init

Docker

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.

Running Tests

To run the test suite:

make test

This 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.

License

This project is licensed under the terms of the MIT license.

About

A self hostable API for personal expense tracking built with FastAPI

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •