Commit 73ffc2

2025-08-09 21:07:26 Tebby Dog: adding humor
2-code/flask/pocket-change-showdown.md ..
@@ 1,54 1,50 @@
-# Pocket Change Showdown
+# Pocket Change Showdown: The Penny-Pincher's Paradise
-> Track every penny of your moving expenses with style! πŸ’°
+> Feck yeah! It's time to tackle your moving expenses with a dash of style and a whole lot of sass! πŸ’°
<div align="center">
-
+Hey look, there's more Flair than a corporate drone with a Monday morning hangover!
![Flask](https://img.shields.io/badge/Flask-2.3.3-000000?style=for-the-badge&logo=flask)
-![Docker](https://img.shields.io/badge/Docker-Ready-2496ED?style=for-the-badge&logo=docker)
-![Kubernetes](https://img.shields.io/badge/Kubernetes-Ready-326CE5?style=for-the-badge&logo=kubernetes&logoColor=white)
+![Docker](https://img.shields.io/badge/Docker-Ready-bluecrabby?style=for-the-badge&logo=docker)
+![Kubernetes](https://img.shields.io/badge/Kubernetes-Ready-bluekitty?style=for-the-badge&logo=kubernetes&logoColor=white)
![License](https://img.shields.io/badge/License-MIT?style=for-the-badge&logo=MIT&label=MIT)
-
<img src="https://teb.codes/2-Code/Flask/Pocket-Change-Showdown/logo.png" alt="logo" width="150"/>
-[Features](#features) β€’ [Quick Start](#quick-start) β€’ [Installation](#installation) β€’ [Documentation](#documentation) β€’ [Contributing](#contributing)
-
+Think you're bad at managing expenses? Ah, quit your whining. We've got everything: [sassy Features](#features) β€’ super-speed [Quick Start](#quick-start) β€’ hassle-free [Installation](#installation) β€’ wordy [Documentation](#documentation) β€’ places to rant... I mean, [Contributing](#contributing)!
</div>
---
## πŸ“‹ Table of Contents
-
-- [Features](#features)
-- [Screenshots](#screenshots)
-- [Quick Start](#quick-start)
-- [Installation](#installation)
- - [Docker](#docker)
- - [Kubernetes](#kubernetes)
- - [Local Development](#local-development)
-- [Configuration](#configuration)
-- [Usage](#usage)
-- [API Documentation](#api-documentation)
-- [Development](#development)
-- [Contributing](#contributing)
-- [License](#license)
+- [What Features?](#features)
+- [Screenshots – Because Who Reads?](#screenshots)
+- [Quick Start – No, Really, It’s Quick](#quick-start)
+- [Slog through Installation](#installation)
+ - [Docker - Walk the Weird Whale](#docker)
+ - [Kubernetes - Because You're Fancy](#kubernetes)
+ - [Local Mayhem - Developer Stuff](#local-development)
+- [Mess About with Configuration](#configuration)
+- [Usage - What’s the Point?](#usage)
+- [Guff About API Documentation](#api-documentation)
+- [What Matters in Development?](#development)
+- [Contributing - Your Turn to Bitch](#contributing)
+- [License - Free Stuff's Always Good](#license)
## ✨ Features
-
### Core Functionality
-- πŸ“Έ **Receipt Management** - Upload and store receipt images/PDFs (up to 16MB)
-- πŸ’³ **Multiple Payment Methods** - Track how you paid (Cash, Credit, Debit, etc.)
-- 🏷️ **Smart Categorization** - Pre-defined PCS categories (Moving, Travel, Housing, etc.)
-- πŸ“Š **Analytics Dashboard** - Interactive charts with Chart.js
-- 🎨 **8 Color Themes** - Personalize your experience
-- πŸ“± **Mobile Responsive** - Track expenses on the go
-- πŸ”’ **No Login Required** - Simple, secure, and private
+- πŸ“Έ **Receipt Management** - Store craploads of receipts. We dare you.
+- πŸ’³ **Multiple Payment Methods** - We track whether you spent cash, credit, IOUs, or favors.
+- 🏷️ **Smart Categorization** - Keep your spending habits smart and snarky.
+- πŸ“Š **Analytics Dashboard** - Like looking at a magic crystal ball of shame.
+- 🎨 **8 Color Themes** - Because your expenses can't be as drab as your personality.
+- πŸ“± **Mobile Responsive** - Track on the go, from your phone or hell, a potato.
+- πŸ”’ **No Login Required** - No strings attached, like that one-night stand.
### Data Management
-- πŸ“₯ **CSV Import** - Bulk upload expenses from spreadsheets
-- πŸ“€ **CSV Export** - Download all data for records
-- πŸ“„ **Template Download** - Get started with the right format
-- πŸ’Ύ **Persistent Storage** - Data survives container restarts
+- πŸ“₯ **CSV Import** - Bring the madness of an Excel sheet to a whole new level.
+- πŸ“€ **CSV Export** - Send your data on a field trip!
+- πŸ“„ **Template Download** - Look, Ma! I’m organized.
+- πŸ’Ύ **Persistent Storage** - Data that laughs in the face of restarts.
### PCS-Specific Categories
- 🚚 Moving
@@ 60,107 56,64 @@
- πŸ” Food
- πŸ“¦ Supplies
- πŸ›ŽοΈ Services
-- βž• Custom Categories
+- βž• Make up your own crap!
## πŸ“Έ Screenshots
-<details>
-<summary>Click to view screenshots</summary>
-
-### Dashboard
-Interactive analytics with spending trends and category breakdowns.
-![](./Analytics.png)
-
-### Expense Entry
-Simple form with receipt upload and auto-complete fields.
-![](./Expense.png)
-
-### Homepage
-A general overview of expenses
-![](./Home.png)
-### Import/Export
-Efficient data importing and exporting with template
-![](./Im-Export.png)
-
-### PDF Export
-Printer friendly PDF with customizable content
-![](./PDF.png)
-
-### Settings
-Manage categories, payment methods, and themes.
-![](./Settings.png)
-
-</details>
### Sample PDF
-[pdf_sample.pdf](./pdf_sample.pdf)
+Don’t just stand there, gawk! [pdf_sample.pdf](./pdf_sample.pdf)
## πŸš€ Quick Start
-
### Docker (Recommended)
-
```bash
-# Pull and run the latest image
+# Unleash the Kraken with the latest image
docker run -d \
--name pcs-tracker \
-p 5001:5001 \
-v pcs-data:/app/data \
-v pcs-uploads:/app/uploads \
tebwritescode/pocket-change-showdown:latest
-
-# Access at http://localhost:5001
+# Chuckle maniacally at http://localhost:5001
```
### Docker Compose
-
```bash
-# Clone the repository
+# Phone-up Chuck Norris: "We're cloning a repo"
git clone https://github.com/tebwritescode/pocket-change-showdown.git
cd pocket-change-showdown
-
-# Start with Docker Compose
+# Compose your mess with Docker Compose
docker-compose up -d
-
-# Access at http://localhost:5001
+# Dance your way to http://localhost:5001
```
## πŸ“¦ Installation
-
### Docker
-
-#### Multi-Architecture Support
-Images are available for:
-- `linux/amd64` (Intel/AMD)
-- `linux/arm64` (Apple Silicon, ARM servers)
-- `linux/arm/v7` (Raspberry Pi)
-
+#### Recognizing All Sorts
+Because compatibility is key, unless it isn't!
```bash
-# Pull specific architecture
+# Pull for your peculiar machine
docker pull --platform linux/arm64 tebwritescode/pocket-change-showdown:latest
-
-# Or let Docker auto-select
+# Or let Docker rub its chin and decide
docker pull tebwritescode/pocket-change-showdown:latest
```
-#### Docker Run Options
-
+#### Docker Run Degeneracy
```bash
-# Basic deployment
+# Deploy it, Captain
docker run -d \
--name pcs-tracker \
-p 5001:5001 \
tebwritescode/pocket-change-showdown:latest
-
-# With persistent storage
+# Make it last longer than a baking lesson
docker run -d \
--name pcs-tracker \
-p 5001:5001 \
-v $(pwd)/data:/app/data \
-v $(pwd)/uploads:/app/uploads \
tebwritescode/pocket-change-showdown:latest
-
-# With environment variables
+# Secret sauce for the discerning chef
docker run -d \
--name pcs-tracker \
-p 5001:5001 \
@@ 172,138 125,113 @@
```
### Kubernetes
-
```bash
-# Apply all manifests
+# Manifest your destiny, or just the code
kubectl apply -f k8s/
-
-# Or individually
+# Or one by bloody one
kubectl apply -f k8s/namespace.yaml
kubectl apply -f k8s/secret.yaml
kubectl apply -f k8s/pvc.yaml
kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/service.yaml
-kubectl apply -f k8s/ingress.yaml # Optional
+kubectl apply -f k8s/ingress.yaml # Optional, like an appendix
-# Check deployment status
+# Check if your stuff's intact
kubectl get all -n pcs-tracker
-
-# Access via NodePort (default: 30001)
-http://<node-ip>:30001
+# If it worked, buy yourself a drink at http://<node-ip>:30001
```
-#### Kubernetes Features
-- **Persistent Volumes** - Data and uploads stored in PVCs
-- **Health Checks** - Liveness and readiness probes
-- **Resource Limits** - CPU and memory constraints
-- **Multi-Service** - LoadBalancer and NodePort options
-- **Ingress Ready** - Configure for your domain
+#### Kubernetes Thingamabobs
+- **Persistent Volumes** - Turns out you don’t need to webscrape for data–it sticks around.
+- **Health Checks** - It only mostly dies.
+- **Resource Limits** - So demanding!
+- **Multi-Service** - Load balance like a tightrope walker.
+- **Ingress Ready** - Fancy domain? Me too.
### Local Development
-
```bash
-# Clone repository
+# Kiss the clouds goodbye
git clone https://github.com/tebwritescode/pocket-change-showdown.git
cd pocket-change-showdown
-
-# Create virtual environment
+# Create a virtual haven
python3 -m venv venv
-source venv/bin/activate # On Windows: venv\Scripts\activate
-
-# Install dependencies
+source venv/bin/activate
+# Unload a bag of dependencies
pip install -r requirements.txt
-
-# Run application
+# Go-Go-Gadget application
python app.py
-
-# Access at http://localhost:5001
+# Channel your inner regulator at http://localhost:5001
```
## βš™οΈ Configuration
-
### Environment Variables
-
| Variable | Description | Default |
|----------|-------------|---------|
-| `SECRET_KEY` | Flask secret key for sessions | `pcs-secret-key-2024` |
-| `FLASK_ENV` | Environment mode (`development`/`production`) | `production` |
-| `DATABASE_URL` | SQLAlchemy database URL | `sqlite:///data/pcs_tracker.db` |
-| `MAX_CONTENT_LENGTH` | Maximum upload size in bytes | `16777216` (16MB) |
+| `SECRET_KEY` | SMERSH-level deception sessions key | `pcs-secret-key-2024` |
+| `FLASK_ENV` | Sneaky environment mood | `production` |
+| `DATABASE_URL` | Alchemize this: your database | `sqlite:///data/pcs_tracker.db` |
+| `MAX_CONTENT_LENGTH` | Maximum cr-p (content) upload size | `16777216` (16MB) |
### Data Persistence
-
-The application stores data in two locations:
-- `/app/data` - SQLite database
-- `/app/uploads` - Receipt images (stored in database as BLOB)
-
-Mount these directories as volumes to persist data.
+To make data hang around like a bad smell:
+- `/app/data` - SQLite domicile
+- `/app/uploads` - Receipts chill as BLOBs
## πŸ“± Usage
-
-### Adding Expenses
-
-1. Click **"Add Expense"** from the navigation or homepage
-2. Fill in expense details (only title is truly required)
-3. Upload receipt photo/screenshot (optional)
-4. Save expense
-
-### Importing Data
-
-1. Navigate to **Import/Export** β†’ **Import CSV**
-2. Download the template for correct format
-3. Fill in your data
-4. Upload CSV file
-
-### CSV Format
-
+### Tossin' Pennies - Adding Expenses
+1. Sing "Add Expense!" from any rooftop or just click it
+2. Wake up from title-only dream
+3. Attach facepalming receipts (optional)
+4. Ceremoniously hit "Save"
+
+### Inflicting Data - Importing
+1. Explore **Import/Export** β†’ **Import CSV**
+2. Don shiny template armor
+3. Be daVinci, fill your masterpiece
+4. Blast off with CSV sere-naah-de
+
+### Cheese-Cutting Format
```csv
Date,Title,Description,Category,Cost,Payment Method,Location,Vendor,Notes,Tags
2024-01-15,Moving Truck,U-Haul rental,Moving,299.99,Credit Card,Downtown,U-Haul,26ft truck,moving
2024-01-16,Hotel Stay,Overnight stay,Lodging,125.00,Company Card,Holiday Inn,Holiday Inn,1 night,travel
```
-### Managing Categories & Payment Methods
-
-1. Go to **Settings**
-2. Add custom categories with colors
-3. Add custom payment methods
-4. Delete non-default items
-5. Change color theme
-
-### Analytics Dashboard
+### Manipulating Categories & Payment Methods
+1. Go where no wo/man has deemed necessary: **Settings**
+2. Cust-omize your little heart out
+3. Create methods even mad scientists couldn’t
+4. Marry whimsy: color themes purr with indulgence
-- Filter by time period (Week/Month/Quarter/Year)
-- View spending by category (Doughnut chart)
-- Payment method breakdown (Bar chart)
-- Daily spending trends (Line chart)
-- Top categories table with percentages
-
-## πŸ”Œ API Documentation
+### Accidental Analytics Dashboard
+- Scorn last week, guilt-trip for next: from nanosecond to year
+- See-spend scenario via doughnut dive
+- Payment method squabbles (Bar chart showdown)
+- Dailies take you on the trend train (Line chart)
+- Top dog categories, percentages & flaunting aplenty
+## πŸ”Œ API Guff
### Endpoints
-
-| Method | Endpoint | Description |
-|--------|----------|-------------|
-| GET | `/` | Homepage with statistics |
-| GET | `/expenses` | List all expenses |
-| GET/POST | `/expense/new` | Add new expense |
-| GET/POST | `/expense/<id>/edit` | Edit expense |
-| POST | `/expense/<id>/delete` | Delete expense |
-| GET | `/expense/<id>/receipt` | View receipt image |
-| GET | `/dashboard` | Analytics dashboard |
-| GET | `/api/expense_data` | JSON data for charts |
-| GET/POST | `/settings` | Application settings |
-| POST | `/settings/category/add` | Add category |
-| POST | `/settings/payment/add` | Add payment method |
-| GET | `/export` | Export CSV |
-| GET/POST | `/import` | Import CSV |
-| GET | `/template` | Download CSV template |
-
-### API Response Example
-
+| Method | Endpoint | Quirky Description |
+|--------|----------|--------------------|
+| GET | `/` | Home sweet home(wrecker) |
+| GET | `/expenses` | Expense expedition |
+| GET/POST | `/expense/new` | New expense enlightenment |
+| GET/POST | `/expense/<id>/edit` | Edit the unavoidable |
+| POST | `/expense/<id>/delete` | PURGE! |
+| GET | `/expense/<id>/receipt` | Picture-perception |
+| GET | `/dashboard` | Analytical nincompoopery |
+| GET | `/api/expense_data` | JSON chateria |
+| GET/POST | `/settings` | Mischief management |
+| POST | `/settings/category/add` | Go rogue - add category |
+| POST | `/settings/payment/add` | Payment etiquette upgrade |
+| GET | `/export` | CSV in Wonderland |
+| GET/POST | `/import` | CSV Carousel |
+| GET | `/template` | CSV preface nobility |
+
+### API Response Satire
```json
GET /api/expense_data?period=month
-
{
"categories": {
"labels": ["Moving", "Travel", "Housing"],
@@ 320,66 248,60 @@
}
```
-## πŸ› οΈ Development
-
+## πŸ› οΈ Development - Why Bother?
### Tech Stack
+- **Backend**: Flask, spicy SQLAlchemy
+- **Frontend**: Bootstrap, Chart.js, Font Awesome (a peacock)
+- **Database**: SQLite: SQLAlchemy Sings
+- **File Storage**: Database belly storage
+- **Deployment**: Orchestrations with Docker, Kubernetes & Gunicorn bravado
-- **Backend**: Flask 2.3.3, SQLAlchemy
-- **Frontend**: Bootstrap 5, Chart.js, Font Awesome
-- **Database**: SQLite with SQLAlchemy ORM
-- **File Storage**: Binary storage in database
-- **Deployment**: Docker, Kubernetes, Gunicorn
-
-### Project Structure
-
+### Structure of Madness
```
pocket-change-showdown/
-β”œβ”€β”€ app.py # Main Flask application
-β”œβ”€β”€ requirements.txt # Python dependencies
-β”œβ”€β”€ Dockerfile # Multi-arch Docker build
-β”œβ”€β”€ docker-compose.yml # Docker Compose config
-β”œβ”€β”€ templates/ # HTML templates
-β”‚ β”œβ”€β”€ base.html # Base template with themes
-β”‚ β”œβ”€β”€ index.html # Homepage
-β”‚ β”œβ”€β”€ expenses.html # Expense list
-β”‚ β”œβ”€β”€ expense_form.html # Add/Edit form
-β”‚ β”œβ”€β”€ dashboard.html # Analytics
-β”‚ β”œβ”€β”€ settings.html # Settings page
-β”‚ └── import.html # CSV import
-β”œβ”€β”€ k8s/ # Kubernetes manifests
+β”œβ”€β”€ app.py # App-worthy babel
+β”œβ”€β”€ requirements.txt # Dependency lug
+β”œβ”€β”€ Dockerfile # Docker concoction
+β”œβ”€β”€ docker-compose.yml # Docker squad
+β”œβ”€β”€ templates/ # HTML insidiousness
+β”‚ β”œβ”€β”€ base.html # The totally base
+β”‚ β”œβ”€β”€ index.html # Page of presents
+β”‚ β”œβ”€β”€ expenses.html # Expense paradox
+β”‚ β”œβ”€β”€ expense_form.html # Input vs Reality
+β”‚ β”œβ”€β”€ dashboard.html # Chase your shame
+β”‚ β”œβ”€β”€ settings.html # Hangover fixes
+β”‚ └── import.html # CSV courtship
+β”œβ”€β”€ k8s/ # Kubernetes enigma
β”‚ β”œβ”€β”€ namespace.yaml
β”‚ β”œβ”€β”€ secret.yaml
β”‚ β”œβ”€β”€ pvc.yaml
β”‚ β”œβ”€β”€ deployment.yaml
β”‚ β”œβ”€β”€ service.yaml
β”‚ └── ingress.yaml
-└── data/ # Database (created at runtime)
+└── data/ # Runtime ingenuity
```
-### Building from Source
-
+### Born from Code
```bash
-# Build Docker image
+# Glayvin! Build me this Docker monstrosity
docker build -t pcs-tracker .
-
-# Build multi-arch with buildx
+# Partake in fetching multi-arch wonders
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
-t tebwritescode/pocket-change-showdown:latest \
--push .
```
-### Database Schema
-
+### The Flat Schema (Non-Skiable)
```sql
--- Main expense table
+-- Ground Zero table for expense
CREATE TABLE expense (
- id INTEGER PRIMARY KEY,
+ id INTEGER,
title VARCHAR(200),
description TEXT,
- category_id INTEGER REFERENCES category(id),
- cost FLOAT DEFAULT 0.0,
- payment_method_id INTEGER REFERENCES payment_method(id),
+ category_id INTEGER,
+ cost FLOAT,
+ payment_method_id INTEGER,
date DATE,
receipt_image BLOB,
receipt_filename VARCHAR(200),
@@ 388,54 310,49 @@
notes TEXT,
tags VARCHAR(500),
created_at DATETIME,
- updated_at DATETIME
+ updated_at DATETIME,
+ PRIMARY KEY (id)
);
-
--- Categories table
+-- Column of categorization
CREATE TABLE category (
- id INTEGER PRIMARY KEY,
- name VARCHAR(100) UNIQUE NOT NULL,
- color VARCHAR(7) DEFAULT '#0d6efd',
- icon VARCHAR(50) DEFAULT 'fa-tag',
- is_default BOOLEAN DEFAULT FALSE
+ id INTEGER,
+ name VARCHAR(100),
+ color VARCHAR(7),
+ icon VARCHAR(50),
+ is_default BOOLEAN,
+ PRIMARY KEY (id)
);
-
--- Payment methods table
+-- Noteworthy payment table
CREATE TABLE payment_method (
- id INTEGER PRIMARY KEY,
- name VARCHAR(100) UNIQUE NOT NULL,
- icon VARCHAR(50) DEFAULT 'fa-credit-card',
- is_default BOOLEAN DEFAULT FALSE
+ id INTEGER,
+ name VARCHAR(100),
+ icon VARCHAR(50),
+ is_default BOOLEAN,
+ PRIMARY KEY (id)
);
-
--- Settings table
+-- Settings booth
CREATE TABLE settings (
- id INTEGER PRIMARY KEY,
- color_scheme VARCHAR(50) DEFAULT 'default',
- default_view VARCHAR(20) DEFAULT 'list'
+ id INTEGER,
+ color_scheme VARCHAR(50),
+ default_view VARCHAR(20),
+ PRIMARY KEY (id)
);
```
-## πŸ“„ License
-
-This project is open source and available under the [MIT License](LICENSE).
-
-## πŸ™ Acknowledgments
-
-- Built with Flask and Bootstrap
-- Charts powered by Chart.js
-- Icons by Font Awesome
+## πŸ“„ License - Go Forth and Conquer!
+This project is merrily open source and blissfully up for grabs under the [MIT License](LICENSE).
-## πŸ“ž Support
+## πŸ™ Cheers & Acknowledgments
+- Built under the spell of Flask and Bootstrap
+- Charts magicked by Chart.js
+- Icons with Font Awesome - Awe as your own
-For issues, questions, or suggestions:
-- Open an issue on [GitHub](https://github.com/tebwritescode/pocket-change-showdown/issues)
-- Contact via GitHub discussions
+## πŸ“ž Screech for Help
+For tirades, discontent, or amusing suggestions:
+- Holler on [GitHub Issues](https://github.com/tebwritescode/pocket-change-showdown/issues)
+- Vent thoroughly in GitHub Discussions
---
-
<div align="center">
-
-**P**ocket **C**hange **S**howdown - Track every penny, win the move!
-
+**P**ocket **C**hange **S**howdown - Because tracking every penny is nothing short of glorious insanity!
</div>
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9