Skip to content

mdolton/card-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Credit Card Tracker

A simple web application for tracking your credit cards, including their credit limits and annual fees.

Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)

Verify Installation

python3 --version
pip3 --version

Development Setup

1. Clone or navigate to the project directory

cd /path/to/card-app

2. Create a virtual environment

python3 -m venv venv

3. Activate the virtual environment

Linux/macOS:

source venv/bin/activate

Windows:

venv\Scripts\activate

You should see (venv) in your terminal prompt when activated.

4. Install dependencies

pip install -r requirements.txt

5. Run the application

python app.py

The server will start at http://localhost:5000

Project Structure

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

API Endpoints

Cards

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)

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

Point Multipliers

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

Deactivating the Virtual Environment

When you're done developing:

deactivate

About

Tracks Credit Cards and their rewards

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors