Case study
PinMe
Artists keep reference boards and run timed practice sessions where each image is drawn once. Full-stack: FastAPI + PostgreSQL + S3-compatible storage behind a Next.js frontend, with Google sign-in and CI on both repos.
- FastAPI
- PostgreSQL
- SQLAlchemy
- Next.js
- TanStack Query
- Docker
- Cloudflare R2
Live demo currently offline; screenshots show the app running locally.
Problem
Artists save references in messy folders and boards, then keep redrawing the same favourites. PinMe turns a board into a practice queue: each image is drawn once, and the board only refills when you decide to reset it.
What I built
- Boards of reference images (create, edit, delete, upload JPEG/PNG/WebP) with a grid and random cover preview.
- Timed practice sessions: pick a board, time per image and image count; the queue has no repeats inside a session.
- Practice screen with a large reference, countdown, progress, Pause, Skip and Complete; a summary with completed, skipped and total time.
- Progress stored per user and image; Reset makes a board available again while keeping completion history.
- Google sign-in with an allowlist and a JWT in an HTTP-only cookie; protected routes behind a RequireAuth guard.
- Layered API (routers → services → repositories/storage), Alembic migrations, pytest suite and ESLint/tsc/build checks in GitHub Actions on both repos.
Engineering decisions
- Queue snapshot at session start: a random order of available images is stored in session_images, so a reload or pause never reshuffles or repeats.
- Completed is not the same as available: progress (AVAILABLE/COMPLETED) is separate from session events, so Reset can flip progress while keeping history for a future heatmap.
- Image sources behind an adapter registry: today LOCAL_UPLOAD on S3-compatible storage; Google Drive and Pinterest can be added without touching board or practice logic.
- Same-origin /api/* proxy in Next.js so the auth cookie stays first-party across vercel.app and railway.app; the build fails if API_ORIGIN is missing.
- Production refuses unsafe config: no default or short JWT_SECRET, no passwordless dev login outside APP_ENV=local. Images are private and served through an owner-checked endpoint.
Results
- Complete practice flow working end to end: boards, uploads, timed sessions, Complete/Skip, pause/resume, summary, reset.
- Tests run without Docker (in-memory SQLite, fake storage adapter) and cover auth, boards, owner-only image access and the practice flow.
- Ran in production until November 2026 on Vercel + Railway + Neon + Cloudflare R2 with the same container locally and in prod.
Gallery


Limitations & next
- The API host trial ended, so the live demo is offline; re-hosting the API is the first step.
- Pinterest import for my own account via the Pinterest API, as a new image-source adapter.
- Stats page with a GitHub-style activity heatmap built from the completion history already stored.