Sansan
0f552282f3
step 2: Add UUID columns with backfill and dual-write support
...
- Add migration 000007: Add UUID columns to soundtrack and song with backfill
- Update InsertSoundtrack and InsertSoundtrackWithExistingId to accept UUID
- Update AddSong to accept UUID
- Add dual-write: Go code now generates UUIDs for new records
- Add uuid and pgtype imports
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai >
2026-06-01 22:40:21 +02:00
Sansan
9256b7fe4b
feat: Add id column to song table and prep for UUID migration
...
- Add id serial4 PK to song table (was composite PK)
- Update queries to use soundtrack_id + path
- Add UUID columns to soundtrack and song (nullable)
- Add migration tracking table
TODO: Run sqlc generate, then create backfill migration (000008)
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai >
2026-06-01 21:58:21 +02:00
Sansan
90d621c195
feat: Rename game to soundtrack throughout codebase
...
- Database migration: rename game table to soundtrack
- Rename game_name to soundtrack_name, game_id to soundtrack_id
- Update all SQL queries in soundtrack.sql, song.sql, song_list.sql, statistics.sql
- Regenerate sqlc code (soundtrack.sql.go, song.sql.go, etc.)
- Update backend: music.go, sync.go, statistics.go
- Update server: musicHandler.go, syncHandler.go, routes.go
- Update frontend: hello.go
- Keep URL paths as /games for backward compatibility
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai >
2026-06-01 20:23:05 +02:00
Sansan
f4d1c3cf28
feat: Implement Statistics API with 8 endpoints under /api/v1/statistics/
...
- Add statistics.sql with 8 SQL queries for play count statistics
- Generate repository code via sqlc
- Add backend/statistics.go with business logic
- Add server/statistics_handler.go with Echo handlers
- Register protected routes under /api/v1/statistics/ with token auth
- Endpoints: games/most-played, games/least-played, games/never-played,
games/last-played, games/oldest-played, songs/most-played,
songs/least-played, summary
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai >
2026-06-01 19:40:22 +02:00
Sansan
3e37303979
feat: Implement Session Token System with /api/v1 base path
...
- Add migration 000004 for sessions table and performance indexes
- Create session.sql queries for CRUD operations
- Generate session repository code with sqlc
- Create token auth middleware for Echo framework
- Create token handler with create/delete/cleanup endpoints
- Add /api/v1 router with token authentication infrastructure
- Update dbHelper.go to use Up() instead of Migrate(2)
- Update server.go to initialize token handler
- Existing endpoints remain functional (to be deprecated)
New endpoints:
- POST /api/v1/token - Create new session token
- DELETE /api/v1/token - Invalidate token
- POST /api/v1/token/cleanup - Remove expired sessions
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai >
2026-06-01 18:07:28 +02:00
Sansan
d653463f58
Moved around more code. Implemented more sqlc. Added support to generate swagger.
...
Added support for profiling. Removed the pkg module altogether.
Everything except old sync is now using code generated by sqlc.
2025-01-15 16:04:14 +01:00