v1.16.0
What's New: User Authentication & Task Management
This release adds two major domains to the clean architecture template — user authentication and task management — across all four transport layers (REST, gRPC, RabbitMQ RPC, NATS RPC).
User Authentication
- Registration with bcrypt password hashing and email uniqueness enforcement
- Login with JWT token generation and configurable expiry
- Auth middleware for all transport layers (Fiber, gRPC interceptor, AMQP/NATS token extraction)
- Profile endpoint to retrieve the authenticated user
Task Management
- Full CRUD for tasks scoped to the authenticated user
- Status state machine with validated transitions:
todo→in_progress→done(andin_progress→todo) - List endpoint with pagination (
limit/offset) and optional status filtering - Ownership enforcement — users can only access their own tasks
Infrastructure
- JWT package (
pkg/jwt) with token generation and validation - Three new database migrations:
userstable,taskstable,user_idforeign key on translation history - gRPC server options support (for injecting unary interceptors)
- Protobuf definitions for auth and task services
Testing
- 27 unit tests for the task use case covering all operations and error paths
- Unit tests for user use case (register, login, get)
- Table-driven entity tests for task status transitions
- Auth middleware tests for both REST and gRPC
- Integration tests restructured into separate files by domain (
user_test.go,task_test.go,translation_test.go)
Other Changes
- Swagger docs regenerated with full coverage of new endpoints
- Docker Compose updated with JWT configuration
- Logger simplified (removed redundant debug-level branching in error path)
Chore Changed and PR's
- chore(deps): bump rabbitmq from 4.2.4-management to 4.2.5-management by @dependabot[bot] in #397
- chore(deps): bump google.golang.org/grpc from 1.79.2 to 1.79.3 by @dependabot[bot] in #396
- chore(deps): bump github.com/jackc/pgx/v5 from 5.8.0 to 5.9.1 by @dependabot[bot] in #398
- chore(deps): bump nginx from 1.29.6-alpine to 1.29.7-alpine by @dependabot[bot] in #399
- chore(deps): bump github.com/nats-io/nats.go from 1.49.0 to 1.50.0 by @dependabot[bot] in #400
- chore(deps): update go-playground/validator, zerolog, grpc, and other by @soltanoff in #405
- feat: implement user authentication and task management with JWT support by @soltanoff in #406
Full Changelog: v1.15.2...v1.16.0