Implement SQLite persistence layer (TDD)

- Add SQLite and UUID dependencies (go-sqlite3, google/uuid)
- Create database connection with automatic migrations
- Implement UserRepository with full CRUD operations
- Implement HabitRepository with JSON serialization for arrays
- Implement HabitEntryRepository with date range queries
- Add comprehensive test coverage for all repositories
- Fix User entity to default timezone to UTC when empty
- All tests passing with TDD approach (Red-Green-Refactor)
This commit is contained in:
2025-11-25 14:29:51 +01:00
parent 64bfe80806
commit 0977d3a58b
14 changed files with 1530 additions and 1 deletions
+5
View File
@@ -1,3 +1,8 @@
module habit-tracker-api
go 1.23.4
require (
github.com/google/uuid v1.6.0 // indirect
github.com/mattn/go-sqlite3 v1.14.32 // indirect
)