Self-hosted expense tracking for your home server.
Add expenses from your phone, review them in a clean read-only dashboard.
- What It Is
- Screenshots
- Features
- Current Status
- Quick Start
- Run Without Docker
- Run With Docker
- Autostart With Docker
- Raspberry Pi Deployment
- Apple Shortcut
- API Documentation
- Database
- Useful Commands
- Tech Stack
- License
CoinSink has two jobs:
- Show a clean spending dashboard in the browser.
- Accept new expenses through a simple HTTP API.
The website is intentionally read-only. It is for viewing totals, categories, charts, and time ranges. New expenses are submitted through the API. The included Apple Shortcut is one convenient way to do that from an iPhone, but any program can use the same API.
| Mobile Dashboard | Apple Shortcut |
|---|---|
![]() |
![]() |
- Responsive dashboard for desktop and mobile
- Category totals and stacked spending chart
- Time ranges: Today, 7 Days, Month, 3M, 6M, 1Y, and Custom
- Smart chart grouping for longer ranges
- SQLite persistence
- FastAPI-generated API docs at
/docs - Docker Compose setup for Raspberry Pi and home servers
- Optional Apple Shortcut for quick expense entry
- The website is read-only.
- Expenses are added through the API.
- Editing and deleting expenses is not implemented yet.
- There is no authentication yet.
- CoinSink is intended for private networks unless you add authentication, HTTPS, or a secured reverse proxy.
Default categories created on startup:
foodmobilityleisurehouseholdother
Unknown categories are stored as other.
With Docker:
docker compose up -d --buildOpen:
http://localhost:8000
API docs:
http://localhost:8000/docs
Create a virtual environment:
python3 -m venv .venv
source .venv/bin/activateInstall dependencies:
pip install -r requirements.txtStart CoinSink:
mkdir -p data
DATABASE_URL=sqlite:///./data/coinsink.db uvicorn app.app:app --host 0.0.0.0 --port 8000Open:
http://localhost:8000
From another device in the same network, use the computer's local IP address:
http://YOUR_DEVICE_IP:8000
Build and start:
docker compose up -d --buildOpen:
http://localhost:8000
Stop:
docker compose downThe Compose file already contains:
restart: unless-stoppedEnable Docker on boot:
sudo systemctl enable docker
sudo systemctl start dockerStart CoinSink once:
docker compose up -d --buildAfter a reboot, Docker should bring CoinSink back automatically.
Check the container:
docker compose psInstall Docker:
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USERLog out and back in, or reboot the Pi.
Copy the project to the Pi:
rsync -av --exclude '.venv' --exclude '.git' --exclude '__pycache__' \
/path/to/CoinSink/ \
pi@RASPBERRY_PI_IP:~/coinsink/Start CoinSink:
ssh pi@RASPBERRY_PI_IP
cd ~/coinsink
docker compose up -d --buildOpen:
http://RASPBERRY_PI_IP:8000
Find the Pi's IP address:
hostname -IThis repository includes:
CoinSink.shortcut
Import it into Apple Shortcuts on your iPhone, open the shortcut, and edit the URL action at the very top.
Set it to your CoinSink expenses endpoint, for example:
http://raspberrypi:8000/expenses
or:
http://RASPBERRY_PI_IP:8000/expenses
After saving the shortcut, you can run it normally from Apple Shortcuts.
The shortcut is optional. It is just one convenient workflow for Apple users. Any other app, script, or automation can submit expenses through the same API.
CoinSink uses FastAPI, so the API is documented automatically.
Open:
http://localhost:8000/docs
On a Raspberry Pi:
http://RASPBERRY_PI_IP:8000/docs
Use this page to inspect available endpoints and test requests directly in the browser.
With Docker, SQLite is stored inside the container at:
/data/coinsink.db
On the host, this is persisted in:
data/coinsink.db
Without Docker, the recommended command above also stores the database in:
data/coinsink.db
If you are migrating from an older local cashflow.db, copy it to:
data/coinsink.db
Show logs:
docker compose logs -fRebuild after code changes:
docker compose up -d --buildStop the app:
docker compose downDelete the local database:
docker compose down
rm data/coinsink.db- FastAPI
- SQLAlchemy
- SQLite
- Vanilla JavaScript
- Chart.js
- Docker Compose
MIT License. See LICENSE.


