Add bcrypt user file auth, JWT middleware on all write routes, Pinia
authStore with localStorage persistence, login view with redirect
support, and v-if guards on all CRUD controls and admin nav link.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Auto-crop thumbnails on image upload (Go stdlib, no external deps):
find non-background bounding box, pad 5px, scale to ≤300px, encode JPEG
- Add thumbnail_data BYTEA column to fruit_images and publication_fruit_images
- New GET /api/v1/fruits/:id/images/:imageId/thumbnail endpoint (fallback to full data)
- New GET /api/v1/publications/:id/fruit-images/:imgId/thumbnail endpoint
- New POST /api/v1/admin/backfill-thumbnails to retroactively generate thumbnails
- ListFruits response now includes synonyms and thumbnail_url per fruit
- Replace FruitList table with responsive FruitCard grid (thumbnail + name + OSDB ID + type + synonyms)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Full CRUD for publications; link fruits to publications; upload per-fruit
PDF descriptions and fruit images stored as BYTEA; fruit detail page shows
publication descriptions and images. ImageOverlayDrawer for cover thumbnail
full-size view.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Makefile: -include .env (soft) so fresh clone doesn't hard-fail
- main.go: replace log.Fatalf-in-goroutine with error channel; startup
failures now reach main goroutine so defer pool.Close() always runs
- main.go: context.WithTimeout(30s) on database.Connect to fail fast
instead of hanging indefinitely on unreachable Postgres
- router.go: store pool on Echo context via middleware so future story
handlers can retrieve it with c.Get("pool")
- config.go: require DATABASE_URL explicitly (log.Fatal if missing)
instead of falling back to hardcoded credentials
- HelloWorld.test.ts: URL-aware fetch stub + afterEach restoreAllMocks;
add flushPromises test verifying backend status renders
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>