From 508051ed73395c42a4d4a0476fb9b59213ce8f8f Mon Sep 17 00:00:00 2001 From: fiqri khoirul muttaqin Date: Tue, 4 Aug 2026 17:20:53 +0700 Subject: [PATCH 1/2] docs: remove release notes --- RELEASE-v1.0.0.md | 74 ----------------------------------------------- 1 file changed, 74 deletions(-) delete mode 100644 RELEASE-v1.0.0.md diff --git a/RELEASE-v1.0.0.md b/RELEASE-v1.0.0.md deleted file mode 100644 index ae4f11c..0000000 --- a/RELEASE-v1.0.0.md +++ /dev/null @@ -1,74 +0,0 @@ -# Release v1.0.0 - Int64 IDs, Facade Refactor & Infrastructure Reorganization - -**Release Date:** 2026-08-04 - -## πŸš€ Highlights - -Major architectural changes: **UUIDβ†’int64 ID migration**, **facade pattern**, and **infrastructure reorganization**. - -## ✨ Features - -### Core Changes -- **Int64 ID Migration**: Switched all entity IDs from UUID to int64/bigserial -- **Facade Pattern**: Exposed module contracts via facade packages -- **Module Reorganization**: Moved `monitoring` and `seed` to `internal/infrastructure/` - -### Database -- Replaced UUID ids with bigserial bigint in all migrations -- Regenerated sqlc with int64 IDs - -### Modules Updated -- **Authentication**: int64 IDs, JWT claims use int64 -- **Authorization**: int64 IDs, Casbin subjects as decimal -- **User**: int64 IDs, added create user command -- **Tenant**: int64 IDs, fixed middleware tenant resolution -- **Todo**: int64 IDs, updated all operations -- **Shared**: cursor, tenantfilter, auditlog, middleware - -### DevOps -- Added hot reload config (`.air.toml`) -- Added devcontainer setup -- Added dev and test Docker Compose configurations -- Added database seed command - -### Testing -- Comprehensive test suites for all modules -- Integration tests for authentication, authorization, tenant, todo, user handlers - -### Documentation -- Int64 IDs and facade design spec -- Implementation plan for int64 IDs and facade refactor -- Database seed design spec - -## πŸ”§ Package Structure - -``` -internal/ -β”œβ”€β”€ infrastructure/ -β”‚ β”œβ”€β”€ auth/ -β”‚ β”œβ”€β”€ cache/ -β”‚ β”œβ”€β”€ email/ -β”‚ β”œβ”€β”€ logger/ -β”‚ β”œβ”€β”€ messaging/ -β”‚ β”œβ”€β”€ monitoring/ -β”‚ └── seed/ -β”œβ”€β”€ shared/ -β”‚ β”œβ”€β”€ middleware/ -β”‚ └── ... -└── ... -``` - -## ⚠️ Breaking Changes - -- All entity IDs are now int64 instead of UUID -- API responses return integer IDs instead of UUID strings -- Package paths changed: `internal/monitoring/` β†’ `internal/infrastructure/monitoring/`, `internal/seed/` β†’ `internal/infrastructure/seed/` - -## πŸ§ͺ Testing - -- All lint checks pass -- Code compiles successfully - ---- - -**Full Changelog**: https://github.com/IDTS-LAB/go-codebase/commits/master From 0ddab8644e223dcab92f8ae031e4dc1bc57e7029 Mon Sep 17 00:00:00 2001 From: fiqri khoirul muttaqin Date: Tue, 4 Aug 2026 17:24:08 +0700 Subject: [PATCH 2/2] docs: remove release notes --- RELEASE-v1.0.0.md | 214 ---------------------------------------------- 1 file changed, 214 deletions(-) delete mode 100644 RELEASE-v1.0.0.md diff --git a/RELEASE-v1.0.0.md b/RELEASE-v1.0.0.md deleted file mode 100644 index 029555c..0000000 --- a/RELEASE-v1.0.0.md +++ /dev/null @@ -1,214 +0,0 @@ -# Release v1.0.0 - -**Release Date:** 2026-08-04 - -## Project Overview - -**Go Codebase** is a production-ready Golang backend template built with **Domain-Driven Design (DDD)**, **Vertical Slice Architecture**, **CQRS**, **Clean Architecture**, and **Modular Monolith** principles. - -### Tech Stack - -| Component | Technology | -|-----------|-----------| -| Language | Go 1.26+ | -| HTTP Router | Chi | -| DI | Uber Fx | -| Database | PostgreSQL | -| Query Builder | SQLC | -| Migrations | Goose | -| Config | Koanf | -| Logging | Zap | -| Validation | go-playground/validator | -| Auth | JWT (access + refresh tokens) | -| RBAC | Casbin | -| Cache | Redis | -| Messaging | NATS | -| Events | In-memory EventBus | -| Tracing | OpenTelemetry (OTLP HTTP) | -| Docs | Swagger (swaggo/swag) | -| Container | Docker + Docker Compose | - -### Modules - -- **Authentication** β€” Register, login, refresh, logout, email verification, password reset -- **Authorization** β€” RBAC with Casbin (roles, permissions, user-role assignments) -- **User** β€” Admin user CRUD operations -- **Todo** β€” Todo management with search and completion -- **Tenant** β€” Multi-tenancy support -- **Monitoring** β€” Prometheus metrics and Grafana dashboards - -### Architecture - -- **DDD** β€” Entities, Value Objects, Domain Services, Specifications, Domain Events -- **CQRS** β€” Separate Command and Query handlers -- **Clean Architecture** β€” Strict dependency direction -- **Modular Monolith** β€” Each module is independent -- **Vertical Slice** β€” Each feature is self-contained -- **Event-Driven** β€” Domain events decouple side effects - ---- - -## What's New in v1.0.0 - -### πŸš€ Core Features - -#### Int64 ID Migration -Switched all entity IDs from UUID to int64/bigserial for better performance and database efficiency: - -- **Core**: Entity and Identifier types now use int64 -- **Database**: All migrations updated to use BIGINT (bigserial) -- **SQLC**: Regenerated queries with int64 IDs -- **Authentication**: User and tenant IDs are int64 -- **Authorization**: Casbin subjects converted to decimal format -- **User**: int64 IDs throughout -- **Tenant**: int64 IDs, fixed middleware tenant resolution -- **Todo**: int64 IDs, all operations updated -- **Shared**: cursor, tenantfilter, auditlog, middleware updated - -#### Facade Pattern -Exposed module contracts via facade packages for cleaner module boundaries: -- `internal/authorization/facade/authorization_facade.go` -- `internal/user/facade/user_facade.go` - -### πŸ—οΈ Infrastructure Reorganization - -Moved infrastructure-related packages to `internal/infrastructure/`: -- `internal/monitoring/` β†’ `internal/infrastructure/monitoring/` -- `internal/seed/` β†’ `internal/infrastructure/seed/` - -### πŸ—„οΈ Database - -- Added database seed command (`make seed`) -- Seed creates default tenant, admin/user roles, permissions, and sample todos -- All migrations updated for int64 IDs - -### πŸ› οΈ Development Experience - -- Added hot reload with Air (`.air.toml`) -- Added devcontainer setup for consistent development environments -- Added dev Docker Compose configuration -- Added test Docker Compose configuration -- Added `make seed-up` target (migrate + seed) - -### πŸ“Š Monitoring & Observability - -- Prometheus metrics at `/metrics` -- Grafana dashboards (provisioned automatically): - - Go App RED β€” request rate, error rate, latency - - PostgreSQL β€” connections, tps, cache hit ratio - - Redis β€” hit rate, memory, commands/s - - System Overview β€” all-services health -- Alerting rules for high error rate, latency, service down, memory usage - -### πŸ§ͺ Testing - -- Comprehensive test suites for all modules -- Unit tests for domain entities and specifications -- Integration tests for authentication, authorization, tenant, todo, user handlers -- Test helper for database setup - -### πŸ“ Documentation - -- Int64 IDs and facade design spec -- Implementation plan for int64 IDs and facade refactor -- Database seed design spec - ---- - -## API Endpoints - -### Authentication -| Method | Endpoint | Description | -|--------|----------|-------------| -| POST | /api/v1/auth/register | Register a new user | -| POST | /api/v1/auth/login | Login and get tokens | -| POST | /api/v1/auth/refresh | Refresh access token | -| POST | /api/v1/auth/logout | Revoke refresh token | -| GET | /api/v1/auth/verify-email?token= | Verify email address | -| POST | /api/v1/auth/forgot-password | Request password reset | -| POST | /api/v1/auth/reset-password | Reset password with token | - -### Todos -| Method | Endpoint | Description | -|--------|----------|-------------| -| POST | /api/v1/todos | Create a todo | -| GET | /api/v1/todos | List all todos | -| GET | /api/v1/todos/{id} | Get a todo | -| PUT | /api/v1/todos/{id} | Update a todo | -| DELETE | /api/v1/todos/{id} | Delete a todo | -| PATCH | /api/v1/todos/{id}/complete | Complete a todo | - -### Users -| Method | Endpoint | Description | -|--------|----------|-------------| -| GET | /api/v1/users | List users | -| GET | /api/v1/users/{id} | Get a user | -| PUT | /api/v1/users/{id} | Update a user | -| DELETE | /api/v1/users/{id} | Delete a user | - -### Authorization (RBAC) -| Method | Endpoint | Description | -|--------|----------|-------------| -| POST | /api/v1/auth/roles | Create a role | -| GET | /api/v1/auth/roles | List roles | -| POST | /api/v1/auth/permissions | Create a permission | -| POST | /api/v1/auth/users/{userId}/roles | Assign role to user | -| POST | /api/v1/auth/roles/{roleId}/permissions | Assign permission to role | -| POST | /api/v1/auth/check-permission | Check user permission | - ---- - -## Quick Start - -```bash -# Start all services (PostgreSQL, Redis, NATS, Jaeger, Prometheus, Grafana) -make docker-up - -# Run database migrations -make migrate-up - -# Generate SQLC code -make sqlc - -# Seed default roles and permissions -make seed - -# Start the API server -make run -``` - -The server starts at `http://localhost:8080`. - -- **Swagger UI**: `http://localhost:8080/swagger/index.html` -- **Health check**: `http://localhost:8080/health` -- **Metrics**: `http://localhost:9090` (Prometheus) - ---- - -## ⚠️ Breaking Changes - -- All entity IDs are now int64 instead of UUID -- API responses return integer IDs instead of UUID strings -- Package paths changed: `internal/monitoring/` β†’ `internal/infrastructure/monitoring/`, `internal/seed/` β†’ `internal/infrastructure/seed/` - ---- - -## πŸ§ͺ Testing - -```bash -# Run all tests -make test - -# Run unit tests only -make test-unit - -# Run integration tests only -make test-integration - -# Run with coverage -make test-coverage -``` - ---- - -**Full Changelog**: https://github.com/IDTS-LAB/go-codebase/commits/v1.0.0