A REST API built with Flask for tracking personal expenses, with JWT authentication and Redis caching.
Base URL: https://expense-tracker-api-production-ad08.up.railway.app
- JWT authentication with access and refresh tokens
- Role-based access control (Admin/User)
- Full CRUD on expenses
- File upload support for receipts
- Redis caching on expense retrieval for faster responses
- PostgreSQL database with SQLAlchemy ORM
- Python, Flask, Flask-RESTful
- Flask-JWT-Extended
- SQLAlchemy, PostgreSQL
- Redis
- Bcrypt, Werkzeug
- Deployed on Railway
| Method | Endpoint | Description |
|---|---|---|
| POST | /register |
Create a new user |
| POST | /login |
Get access and refresh tokens |
| POST | /refresh |
Get a new access token |
| GET | /expenses |
Fetch all expenses for the logged-in user |
| POST | /expenses |
Create a new expense |
| PUT | /expenses/<id> |
Update an expense |
| DELETE | /expenses/<id> |
Delete an expense |
- Clone the repo
- Install dependencies:
pip install -r requirements.txt - Create a
.envfile with yourDATABASE_URLandREDIS_URL - Run the app:
python app.py