27 Commits

Author SHA1 Message Date
cf4bf9505a fix(docs): Fix service run commands to include all package files
- Change from 'go run ./cmd/{service}/main.go' to 'go run ./cmd/{service}/*.go'
  - go run with single file doesn't include other files in the package
  - Service implementations are in separate _fx.go files
  - Using wildcard includes all .go files in the package

- Update README.md and SUMMARY.md with correct commands
- Fixes 'undefined: provideXService' errors when running services
2025-11-06 21:04:03 +01:00
cba2096adf feat(docker): Add API Gateway to Docker Compose
- Create Dockerfile for API Gateway
  - Multi-stage build using golang:1.25-alpine
  - Minimal runtime image using alpine:latest
  - Exposes port 8080

- Add API Gateway service to docker-compose.yml
  - Depends on Consul and all core services
  - Environment variables for gateway configuration
  - Port 8080 exposed

- Update SUMMARY.md
  - Add API Gateway to service list
  - Add API Gateway to Docker build instructions
  - Update file structure to include API Gateway Dockerfile
2025-11-06 21:02:54 +01:00
031a90eca0 feat(docker): Add Docker support for all services
- Create Dockerfiles for all four services (auth, identity, authz, audit)
  - Multi-stage builds using golang:1.25-alpine
  - Minimal runtime images using alpine:latest
  - Copy config files to runtime image

- Create docker-compose.dev.yml for development
  - Only PostgreSQL and Consul
  - Use when running services locally with 'go run'

- Update docker-compose.yml for full deployment
  - All services + infrastructure
  - Services build from Dockerfiles
  - Health checks and dependencies configured
  - Environment variables for service configuration

- Add .dockerignore to optimize build context
  - Excludes docs, tests, IDE files, build artifacts

- Update SUMMARY.md
  - Document both docker-compose files
  - Add Docker deployment section
  - Update file structure to include Dockerfiles
2025-11-06 20:46:43 +01:00
33339f19cb docs: Fix duplicate heading in SUMMARY.md 2025-11-06 20:08:50 +01:00
6d6e07e09a docs: Add Consul verification steps to SUMMARY.md 2025-11-06 20:08:44 +01:00
3ac8983e98 feat(docker): Add Consul to docker-compose and update documentation
- Add Consul service to docker-compose.yml
  - Running in dev mode on port 8500
  - Health checks configured
  - Persistent volume for data
  - Web UI available at http://localhost:8500/ui

- Update SUMMARY.md
  - Document Consul setup in docker-compose
  - Add Consul verification steps
  - Update prerequisites to include Docker Compose
  - Add note about Consul Web UI

- Remove obsolete version field from docker-compose.yml
2025-11-06 20:08:37 +01:00
b1b895e818 feat(epic2): Implement core authentication and authorization services
- Implement Audit Service (2.5)
  - gRPC server with Record and Query operations
  - Database persistence with audit schema
  - Service registry integration
  - Entry point: cmd/audit-service

- Implement Identity Service (2.2)
  - User CRUD operations
  - Password hashing with argon2id
  - Email verification and password reset flows
  - Entry point: cmd/identity-service
  - Fix package naming conflicts in user_service.go

- Implement Auth Service (2.1)
  - JWT token generation and validation
  - Login, RefreshToken, ValidateToken, Logout RPCs
  - Integration with Identity Service
  - Entry point: cmd/auth-service
  - Note: RefreshToken entity needs Ent generation

- Implement Authz Service (2.3, 2.4)
  - Permission checking and authorization
  - User roles and permissions retrieval
  - RBAC-based authorization
  - Entry point: cmd/authz-service

- Implement gRPC clients for all services
  - Auth, Identity, Authz, and Audit clients
  - Service discovery integration
  - Full gRPC communication

- Add service configurations to config/default.yaml
- Create SUMMARY.md with implementation details and testing instructions
- Fix compilation errors in Identity Service (password package conflicts)
- All services build successfully and tests pass
2025-11-06 20:07:20 +01:00
f9170bb00b fix(docs): diagrams
All checks were successful
CI / Test (pull_request) Successful in 26s
CI / Lint (pull_request) Successful in 21s
CI / Build (pull_request) Successful in 16s
CI / Format Check (pull_request) Successful in 2s
2025-11-06 13:29:32 +01:00
b4b918cba8 docs: ensure newline before lists across docs for MkDocs rendering
All checks were successful
CI / Test (pull_request) Successful in 27s
CI / Lint (pull_request) Successful in 20s
CI / Build (pull_request) Successful in 16s
CI / Format Check (pull_request) Successful in 2s
2025-11-06 10:56:50 +01:00
fbc3fc37e4 feat: upgrade to Go 1.25.3 and update build to include api-gateway
Some checks failed
CI / Test (pull_request) Successful in 36s
CI / Lint (pull_request) Failing after 3s
CI / Build (pull_request) Successful in 16s
CI / Format Check (pull_request) Successful in 2s
- Create ADR-0034 documenting Go version upgrade to 1.25.3
- Mark ADR-0002 as superseded by ADR-0034
- Update CI workflow to use Go 1.25.3
- Update Makefile to build both platform and api-gateway binaries
- Update CI workflow to build and upload both binaries
- Update documentation (ADR README and mkdocs.yml) to include ADR-0034
2025-11-06 09:41:47 +01:00
38a251968c docs: Align documentation with true microservices architecture
Transform all documentation from modular monolith to true microservices
architecture where core services are independently deployable.

Key Changes:
- Core Kernel: Infrastructure only (no business logic)
- Core Services: Auth, Identity, Authz, Audit as separate microservices
  - Each service has own entry point (cmd/{service}/)
  - Each service has own gRPC server and database schema
  - Services register with Consul for service discovery
- API Gateway: Moved from Epic 8 to Epic 1 as core infrastructure
  - Single entry point for all external traffic
  - Handles routing, JWT validation, rate limiting, CORS
- Service Discovery: Consul as primary mechanism (ADR-0033)
- Database Pattern: Per-service connections with schema isolation

Documentation Updates:
- Updated all 9 architecture documents
- Updated 4 ADRs and created 2 new ADRs (API Gateway, Service Discovery)
- Rewrote Epic 1: Core Kernel & Infrastructure (infrastructure only)
- Rewrote Epic 2: Core Services (Auth, Identity, Authz, Audit as services)
- Updated Epic 3-8 stories for service architecture
- Updated plan.md, playbook.md, requirements.md, index.md
- Updated all epic READMEs and story files

New ADRs:
- ADR-0032: API Gateway Strategy
- ADR-0033: Service Discovery Implementation (Consul)

New Stories:
- Epic 1.7: Service Client Interfaces
- Epic 1.8: API Gateway Implementation
2025-11-06 08:54:19 +01:00
cab7cadf9e docs: update readme
All checks were successful
CI / Test (push) Successful in 21s
CI / Lint (push) Successful in 18s
CI / Build (push) Successful in 12s
CI / Format Check (push) Successful in 2s
2025-11-05 21:45:56 +01:00
8c90075086 fix: correct Mermaid graph syntax for endpoint labels with slashes
All checks were successful
CI / Test (pull_request) Successful in 22s
CI / Lint (pull_request) Successful in 18s
CI / Build (pull_request) Successful in 12s
CI / Format Check (pull_request) Successful in 2s
Mermaid graphs require node labels with special characters like forward
slashes to be quoted. Changed /healthz and /metrics from square bracket
format to quoted string format to fix the lexical error.
2025-11-05 21:26:17 +01:00
9b33c1528a fix: correct Mermaid sequence diagram syntax for permissions list
Mermaid sequence diagrams don't support YAML-style lists with dashes
in message content. Changed the multi-line permission list to a single
comma-separated line to fix the parse error.
2025-11-05 21:24:55 +01:00
0d6c62ab03 fix: remove t.Parallel() from metrics tests to fix race conditions
All checks were successful
CI / Test (pull_request) Successful in 21s
CI / Lint (pull_request) Successful in 17s
CI / Build (pull_request) Successful in 12s
CI / Format Check (pull_request) Successful in 2s
The Gin framework uses a global mode setting (gin.SetMode()) which is not
thread-safe when tests run in parallel. Removing t.Parallel() from metrics
tests that use gin.SetMode() prevents data races when running tests with
the race detector enabled.

All tests now pass with 'make test' which includes -race flag.
2025-11-05 21:20:29 +01:00
278a727b8c docs: remove all emojis from playbook document
- Remove emoji numbers from section headers (1-13)
- Remove rocket emoji from final congratulations message
- All sections now use plain numbers instead of emoji numbers
2025-11-05 20:55:49 +01:00
926f3f927e docs: verify and update Epic 1 story statuses to Completed
- Verified all acceptance criteria for Stories 1.1-1.6
- Updated Status fields from Pending to Completed
- Marked all acceptance criteria checkboxes as completed
- All stories in Epic 1 are now fully implemented and verified
2025-11-05 20:41:51 +01:00
d1d0b170ce fix: improve logging and error visibility, move Story 1.7 to Epic 2
Fixes:
- Added database connection logging with masked DSN
- Added migration progress logging
- Added HTTP server startup logging with address
- Fixed database provider to accept logger parameter
- Improved error visibility throughout initialization

Documentation:
- Moved Story 1.7 (Service Client Interfaces) to Epic 2 as Story 2.7
- Updated Epic 1 and Epic 2 READMEs
- Updated COMPLETE_TASK_LIST.md
- Updated story metadata (ID, Epic, Dependencies)

These changes will help diagnose startup issues and provide better visibility into what the application is doing.
2025-11-05 19:39:25 +01:00
fde01bfc73 feat(epic1): complete OpenTelemetry integration and add verification documentation
Story 1.6: OpenTelemetry Distributed Tracing
- Implemented tracer initialization with stdout (dev) and OTLP (prod) exporters
- Added HTTP request instrumentation via Gin middleware
- Integrated trace ID correlation in structured logs
- Added tracing configuration to config files
- Registered tracer provider in DI container

Documentation and Setup:
- Created Docker Compose setup for PostgreSQL database
- Added comprehensive Epic 1 summary with verification instructions
- Added Epic 0 summary with verification instructions
- Linked summaries in documentation index and epic READMEs
- Included detailed database testing instructions
- Added Docker Compose commands and troubleshooting guide

All Epic 1 stories (1.1-1.6) are now complete. Story 1.7 depends on Epic 2.
2025-11-05 18:20:15 +01:00
a38a08ca17 docs: add ADR-0031 for service repository structure decision
All checks were successful
CI / Test (push) Successful in 11s
CI / Format Check (push) Successful in 3s
CI / Lint (push) Successful in 9s
CI / Build (push) Successful in 6s
Create ADR documenting the decision to use a monorepo structure with
service directories for organizing microservices (Option 1).

The ADR covers:
- Decision to use monorepo with service directories
- Rationale for monorepo vs separate repositories
- Proposed directory structure with cmd/ and services/
- Implementation strategy across epics
- Consequences and mitigations
- Migration path if needed in the future

This clarifies how services (Auth, Identity, Authz, Audit) should be
organized in the codebase while maintaining service independence and
microservices architecture principles.
2025-11-05 15:13:34 +01:00
610677af72 docs: mark all epic0 stories as completed
All checks were successful
CI / Lint (pull_request) Successful in 10s
CI / Format Check (pull_request) Successful in 2s
CI / Test (pull_request) Successful in 11s
CI / Build (pull_request) Successful in 6s
Update status of all epic0 stories (0.1-0.5) from Pending to Completed:
- 0.1: Project Initialization - Directory structure and Go module setup
- 0.2: Configuration Management System - Viper-based config implemented
- 0.3: Structured Logging System - Zap logger with middleware implemented
- 0.4: CI/CD Pipeline - GitHub Actions workflow with tests and linting
- 0.5: DI and Bootstrap - FX-based DI container with lifecycle management

All stories have been implemented with tests and are working.
2025-11-05 13:44:00 +01:00
66b0c3b40d docs: update dead links 2025-11-05 11:00:36 +01:00
b4f8875a0e docs: add system specifications 2025-11-05 09:51:47 +01:00
ace9678f6c feat: reword phase to epic, update mkdocs 2025-11-05 09:28:33 +01:00
65a428534c feat: microservice architecture 2025-11-05 09:12:34 +01:00
54a047f5dc docs: add mkdocs, update links, add architecture documentation 2025-11-05 07:44:21 +01:00
6a17236474 docs: add implementation plan, ADRs, and task tracking system
- Add comprehensive 8-phase implementation plan (docs/plan.md)
- Add 28 Architecture Decision Records (docs/adr/) covering all phases
- Add task tracking system with 283+ task files (docs/stories/)
- Add task generator script for automated task file creation
- Add reference playbooks and requirements documentation

This commit establishes the complete planning foundation for the Go
Platform implementation, documenting all architectural decisions and
providing detailed task breakdown for Phases 0-8.
2025-11-04 22:05:37 +01:00