2025-08-15 07:49:05 -04:00
2025-06-13 16:49:51 -04:00
2025-08-07 18:18:36 -04:00
2025-06-13 16:49:51 -04:00
2025-08-07 18:18:36 -04:00
2025-06-13 16:49:51 -04:00

Pet Picture Queue

A web application to manage pet pictures from subscribers. Built with Flask, SQLite, and Jinja2 templates.

Features

  • Upload pet pictures with subscriber information
  • View all uploaded pictures in a grid layout
  • Mark pictures as posted
  • Modern, responsive UI using Tailwind CSS
  • Click to view full-size images
  • Download original images
  • Add descriptions to pet pictures

Setup

Local Development

  1. Install dependencies:
uv pip install -e .
  1. Run the application:
python main.py

The application will be available at http://localhost:5000

Database Migration

Local Migration

If you have an existing database and want to add the description field:

python migrate.py

Docker Migration

To run the migration in Docker:

docker compose --profile migrate up --build migrate

This will safely add the description column to your existing database without affecting existing data.

Docker Deployment

  1. Start the application:
docker compose up --build -d
  1. Stop the application:
docker compose down

The application will be available at http://localhost:54321

Using Docker Directly

  1. Build the Docker image:
docker build -t pet-picture-queue .
  1. Run the container:
docker run -d \
  -p 54321:5000 \
  -v $(pwd)/static/uploads:/app/static/uploads \
  -v $(pwd)/pet_pictures.db:/app/pet_pictures.db \
  --name pet-picture-queue \
  pet-picture-queue

The application will be available at http://localhost:54321

Usage

  1. Visit the homepage to see all uploaded pet pictures
  2. Click "Upload New" to add a new pet picture
  3. Fill in the subscriber name and select a picture
  4. Add an optional description for the pet picture
  5. View uploaded pictures on the homepage
  6. Click on any picture to view it in full size
  7. Use the "Download Original" button to download the original file
  8. Mark pictures as posted using the "Mark as Posted" button

File Structure

  • main.py - Main Flask application
  • migrate.py - Database migration script
  • templates/ - Jinja2 templates
    • base.html - Base template with common layout
    • index.html - Homepage with picture grid
    • upload.html - Upload form
  • static/uploads/ - Directory for uploaded pictures
  • pet_pictures.db - SQLite database (created automatically)
  • Dockerfile - Docker configuration
  • .dockerignore - Docker build exclusions
  • docker-compose.yml - Docker Compose configuration
Description
No description provided
Readme 2.9 MiB
Languages
Python 65.2%
HTML 32.8%
Dockerfile 2%