Commit Graph
4 Commits
Author SHA1 Message Date
juliaandClaude Sonnet 4.6 1b889ac112 feat: manage fruits — full CRUD with images and synonyms (story #02)
Backend: domain structs, FruitRepository interface + pg implementation,
9 Echo v4 handlers (list/get/create/update/delete, image sub-resources),
migration 000002 (fruit_type ENUM, fruits, fruit_synonyms, fruit_images),
route-scoped BodyLimit("5M") for uploads, http.DetectContentType for serving.

Frontend: typed fetch API layer, Pinia setup-style fruitStore, FruitList
(paginated), FruitCreate, and FruitDetail (edit + synonyms editor + image
gallery). 25 backend unit tests + integration test; 18 frontend tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 10:18:01 +02:00
juliaandClaude Sonnet 4.6 a9100fc7d0 chore: tidy go.mod — promote deps from indirect to direct
golang-migrate, pgx/v5, and echo/v4 are all imported directly;
go mod tidy correctly marks them as direct dependencies.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 10:08:58 +02:00
juliaandClaude Sonnet 4.6 4d28916c7b fix: address code review findings from story #01
- 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>
2026-06-16 17:14:29 +02:00
juliaandClaude Sonnet 4.6 24a368cac3 feat: bootstrap OSDB full-stack skeleton (story #01)
- Go backend: Echo v4 + pgxpool + embedded golang-migrate; health endpoints
  at /health and /api/v1/health; TDD health handler (httptest)
- Vue 3 frontend: Vite + TypeScript + Pinia + vue-router + Tailwind CSS v4;
  TDD HelloWorld component (@vue/test-utils + jsdom + vitest)
- Infra: docker-compose postgres:16 with env-interpolated credentials;
  Makefile with dev-db health-wait loop, migrate-up/down, run, test, fmt
- embed.FS migrations at backend/migrations/ (000001 no-op baseline)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 17:04:32 +02:00