Financial / Wallet API
A backend project for handling users, wallets, transactions, transfers, authentication, and account management. I built it as a way to work through the backend concerns that appear once you move beyond simple CRUD APIs.
Overview
A backend project built to practice designing a REST API the way a real financial product would need it: clear data models for users, wallets, and transactions, safe transfer logic, authenticated endpoints, and sensible account management. Built with Flask and PostgreSQL, using SQLAlchemy for the data layer and JWT for authentication, with Docker for a consistent local environment.
What I built
- User accounts and authentication
- Wallets and balances
- Transactions and transfers
- Account management
Engineering
The API is organized around clear resources — users, wallets, transactions — with endpoints that require a valid JWT before touching wallet or transaction data. Passwords are hashed rather than stored in plain text, and request data is validated before it reaches the database layer.
Error handling is treated as part of the API's actual behavior rather than an afterthought: failed transfers, invalid input, and auth failures return meaningful responses instead of generic errors.
Database design
Wallets and transactions are modelled as related SQLAlchemy entities rather than flattened into a single table, so a transfer updates both sides of a transaction consistently instead of relying on the client to keep balances in sync.
Security considerations
Authentication is required for anything that touches account or money data, and the focus so far has been getting the fundamentals right — hashed passwords, token-based auth, and validated input — before layering on anything more advanced.
Docker setup
The project runs in Docker to keep the local environment consistent between development sessions, and to make it straightforward to bring PostgreSQL up alongside the API without manual setup.
Current status
The API is in development. Core flows — accounts, wallets, transactions, and transfers — are functional and being refined; it isn't deployed anywhere publicly yet.
Technology
- Python
- Flask
- PostgreSQL
- SQLAlchemy
- REST API
- JWT authentication
- Docker
Screenshots
Screenshots will be added here as Financial / Wallet API progresses.