A simple web application for tracking your credit cards, including their credit limits and annual fees.
- Python 3.8 or higher
- pip (Python package manager)
python3 --version
pip3 --versioncd /path/to/card-apppython3 -m venv venvLinux/macOS:
source venv/bin/activateWindows:
venv\Scripts\activateYou should see (venv) in your terminal prompt when activated.
pip install -r requirements.txtpython app.pyThe server will start at http://localhost:5000
card-app/
├── app.py # Flask backend server
├── index.html # Frontend UI - card management
├── benefits.html # Frontend UI - benefits management
├── multipliers.html # Frontend UI - point multipliers management
├── requirements.txt # Python dependencies
├── cards.db # SQLite database (created on first run)
└── README.md
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Serves the frontend |
| GET | /api/cards |
List all cards |
| POST | /api/cards |
Add a new card |
| PUT | /api/cards/<id> |
Update a card |
| DELETE | /api/cards/<id> |
Delete a card (and its benefits) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /benefits.html?card_id=<id> |
Benefits page for a card |
| GET | /api/cards/<id>/benefits |
List benefits for a card |
| POST | /api/cards/<id>/benefits |
Add a benefit to a card |
| PUT | /api/benefits/<id> |
Update a benefit |
| DELETE | /api/benefits/<id> |
Delete a benefit |
| Method | Endpoint | Description |
|---|---|---|
| GET | /multipliers.html?card_id=<id> |
Multipliers page for a card |
| GET | /api/cards/<id>/multipliers |
List multipliers for a card |
| POST | /api/cards/<id>/multipliers |
Add a multiplier to a card |
| PUT | /api/multipliers/<id> |
Update a multiplier |
| DELETE | /api/multipliers/<id> |
Delete a multiplier |
When you're done developing:
deactivate