Skip to content

lukehedger/kit-pics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swipe your way through all home and away kits from every Premier League season


Stack

  • Cloudflare Workers runtime
  • Hono with JSX for SSR pages and API routes
  • D1 for the kits catalogue and per-session votes
  • R2 for kit images (bucket kit-pics-images)
  • Workers Assets for other static files in public/

Local development

bun install
bun run seed:local                                 # init schema + seed 1090 kits into local D1
bun run r2:upload:local                            # upload PNGs from kits-source/ into local R2
bun run dev

Deploy

bun x wrangler d1 create kitpics                   # first time only, copy database_id into wrangler.toml
bun x wrangler r2 bucket create kit-pics-images    # first time only
bun run seed:remote
bun run r2:upload
bun run deploy

Layout

  • src/index.tsx — Hono app, routes, D1/R2 handlers
  • src/pages/ — SSR JSX pages (home, about, stats, timeline)
  • public/deck.js — client-side swipe deck (pointer events, posts votes to /api/votes)
  • public/timeline.js — client-side team selector for /timeline/
  • migrations/0001_init.sql — D1 schema
  • scripts/generate-seed.mjs — rebuilds migrations/0002_seed_kits.sql from src/kits.json
  • kits-source/ — source PNGs, uploaded to R2 (not bundled with the Worker)

About

⚽️ Swipe your way through every Premier League kit

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors