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

This commit is contained in:
2025-11-05 21:42:24 +01:00
parent b01d5bdeea
commit cab7cadf9e
6 changed files with 13 additions and 31 deletions

View File

@@ -189,7 +189,7 @@ When working on this project, follow this workflow:
- Implement tests - Implement tests
### 6. Verify Alignment ### 6. Verify Alignment
- Ensure code follows Clean/Hexagonal Architecture principles - Ensure code follows Hexagonal Architecture principles
- Verify it aligns with microservices architecture - Verify it aligns with microservices architecture
- Check that it follows plugin-first design - Check that it follows plugin-first design
- Confirm security-by-design principles are followed - Confirm security-by-design principles are followed
@@ -210,7 +210,7 @@ When working on this project, follow this workflow:
The project follows these core principles (documented in `requirements.md` and `playbook.md`): The project follows these core principles (documented in `requirements.md` and `playbook.md`):
1. **Clean/Hexagonal Architecture** 1. **Hexagonal Architecture**
- Clear separation between `pkg/` (interfaces) and `internal/` (implementations) - Clear separation between `pkg/` (interfaces) and `internal/` (implementations)
- Domain code in `internal/domain` - Domain code in `internal/domain`
- Only interfaces exported from `pkg/` - Only interfaces exported from `pkg/`
@@ -272,7 +272,7 @@ After implementing a feature, verify:
2. **Committing without verification** - Never commit code that doesn't build, has failing tests, or doesn't meet acceptance criteria 2. **Committing without verification** - Never commit code that doesn't build, has failing tests, or doesn't meet acceptance criteria
3. **Implementing without checking stories** - Stories contain specific deliverables and acceptance criteria 3. **Implementing without checking stories** - Stories contain specific deliverables and acceptance criteria
4. **Ignoring ADRs** - ADRs document why decisions were made; don't reinvent the wheel 4. **Ignoring ADRs** - ADRs document why decisions were made; don't reinvent the wheel
5. **Violating architecture principles** - Code must follow Clean/Hexagonal Architecture 5. **Violating architecture principles** - Code must follow Hexagonal Architecture
6. **Missing acceptance criteria** - All stories have specific criteria that must be met 6. **Missing acceptance criteria** - All stories have specific criteria that must be met
7. **Not following module patterns** - Modules must implement the `IModule` interface correctly 7. **Not following module patterns** - Modules must implement the `IModule` interface correctly
8. **Skipping observability** - All features must include proper logging, metrics, and tracing 8. **Skipping observability** - All features must include proper logging, metrics, and tracing

View File

@@ -1,12 +1,12 @@
# Go Platform (goplt) # Go Platform
**Plugin-friendly SaaS/Enterprise Platform Go Edition** **SaaS/Enterprise Platform Go Edition**
A modular, extensible platform built with Go that provides a solid foundation for building scalable, secure, and observable applications. The platform supports plugin-based architecture, enabling teams to build feature modules independently while sharing core services. A modular, extensible platform built with Go that provides a solid foundation for building scalable, secure, and observable applications. The platform supports plugin-based architecture, enabling teams to build feature modules independently while sharing core services.
## Architecture Overview ## Architecture Overview
Go Platform follows **Clean/Hexagonal Architecture** principles with clear separation between: Go Platform follows **Hexagonal Architecture** principles with clear separation between:
- **Core Kernel**: Foundation services (authentication, authorization, configuration, logging, observability) - **Core Kernel**: Foundation services (authentication, authorization, configuration, logging, observability)
- **Module Framework**: Plugin system for extending functionality - **Module Framework**: Plugin system for extending functionality
@@ -14,15 +14,6 @@ Go Platform follows **Clean/Hexagonal Architecture** principles with clear separ
- **Security-by-Design**: Built-in JWT authentication, RBAC/ABAC authorization, and audit logging - **Security-by-Design**: Built-in JWT authentication, RBAC/ABAC authorization, and audit logging
- **Observability**: OpenTelemetry integration for tracing, metrics, and logging - **Observability**: OpenTelemetry integration for tracing, metrics, and logging
### Key Principles
- **Clean Architecture**: Separation between `pkg/` (interfaces) and `internal/` (implementations)
- **Dependency Injection**: Using `uber-go/fx` for lifecycle management
- **Microservices-Ready**: Each module is an independent service from day one
- **Plugin-First Design**: Extensible architecture supporting static and dynamic module loading
- **Security-by-Design**: JWT authentication, RBAC/ABAC, and audit logging
- **Observability**: OpenTelemetry, structured logging, and Prometheus metrics
## Directory Structure ## Directory Structure
``` ```
@@ -40,7 +31,7 @@ goplt/
├── pkg/ # Public interfaces (exported) ├── pkg/ # Public interfaces (exported)
│ ├── config/ # ConfigProvider interface │ ├── config/ # ConfigProvider interface
│ ├── logger/ # Logger interface │ ├── logger/ # Logger interface
│ ├── module/ # IModule interface │ ├── module/ # IModule interface
│ ├── auth/ # Auth interfaces │ ├── auth/ # Auth interfaces
│ ├── perm/ # Permission DSL │ ├── perm/ # Permission DSL
│ └── infra/ # Infrastructure interfaces │ └── infra/ # Infrastructure interfaces
@@ -212,7 +203,7 @@ type IModule interface {
- **Structured Logging**: JSON-formatted logs with correlation IDs - **Structured Logging**: JSON-formatted logs with correlation IDs
- **Health Checks**: Kubernetes-ready health and readiness endpoints - **Health Checks**: Kubernetes-ready health and readiness endpoints
## 🔧 Configuration ## Configuration
Configuration is managed through YAML files and environment variables. See `config/default.yaml` for the base configuration structure. Configuration is managed through YAML files and environment variables. See `config/default.yaml` for the base configuration structure.
@@ -223,15 +214,6 @@ Key configuration sections:
- **Logging**: Log level, format, and output destination - **Logging**: Log level, format, and output destination
- **Authentication**: JWT settings and token configuration - **Authentication**: JWT settings and token configuration
## Testing
The project follows table-driven testing patterns and includes:
- Unit tests for all packages
- Integration tests for service interactions
- Mock generation for interfaces
- Test coverage reporting
## Contributing ## Contributing
1. Create a feature branch: `git checkout -b feature/my-feature` 1. Create a feature branch: `git checkout -b feature/my-feature`
@@ -251,6 +233,6 @@ The project follows table-driven testing patterns and includes:
- [Implementation Plan](docs/content/plan.md) - [Implementation Plan](docs/content/plan.md)
- [Playbook](docs/content/playbook.md) - [Playbook](docs/content/playbook.md)
## 📞 Support ## Support
For questions and support, please refer to the documentation or create an issue in the repository. For questions and support, please refer to the documentation or create an issue in the repository.

View File

@@ -69,7 +69,7 @@ graph TB
## Layered Architecture ## Layered Architecture
The platform follows a **clean/hexagonal architecture** with clear separation of concerns across layers. The platform follows a **hexagonal architecture** with clear separation of concerns across layers.
```mermaid ```mermaid
graph TD graph TD

View File

@@ -63,7 +63,7 @@ Detailed task definitions for each epic are available in the [Stories section](s
## Key Principles ## Key Principles
- **Clean/Hexagonal Architecture**: Clear separation between core and plugins - **Hexagonal Architecture**: Clear separation between core and plugins
- **Microservices Architecture**: Each module is an independent service from day one - **Microservices Architecture**: Each module is an independent service from day one
- **Plugin-First Design**: Extensible architecture supporting static and dynamic modules - **Plugin-First Design**: Extensible architecture supporting static and dynamic modules
- **Security-by-Design**: Built-in authentication, authorization, and audit capabilities - **Security-by-Design**: Built-in authentication, authorization, and audit capabilities

View File

@@ -13,7 +13,7 @@ This plan breaks down the implementation into **8 epics**, each with specific de
**Total Estimated Timeline:** 8-12 weeks (depending on team size and parallelization) **Total Estimated Timeline:** 8-12 weeks (depending on team size and parallelization)
**Key Principles:** **Key Principles:**
- **Clean/Hexagonal Architecture** with clear separation between `pkg/` (interfaces) and `internal/` (implementations) - **Hexagonal Architecture** with clear separation between `pkg/` (interfaces) and `internal/` (implementations)
- **Dependency Injection** using `uber-go/fx` for lifecycle management - **Dependency Injection** using `uber-go/fx` for lifecycle management
- **Microservices Architecture** - each module is an independent service from day one - **Microservices Architecture** - each module is an independent service from day one
- **Service Client Interfaces** - all inter-service communication via gRPC/HTTP - **Service Client Interfaces** - all inter-service communication via gRPC/HTTP

View File

@@ -5,7 +5,7 @@
| Principle | Gospecific rationale | Enforcement Technique | | Principle | Gospecific rationale | Enforcement Technique |
|-----------|-----------------------|------------------------| |-----------|-----------------------|------------------------|
| **Clean / Hexagonal Architecture** | Gos packagelevel visibility (`internal/`) naturally creates a *boundary* between core and plugins. | Keep all **domain** code in `internal/domain`, expose only **interfaces** in `pkg/`. | | **Hexagonal Architecture** | Gos packagelevel visibility (`internal/`) naturally creates a *boundary* between core and plugins. | Keep all **domain** code in `internal/domain`, expose only **interfaces** in `pkg/`. |
| **Dependency Injection (DI) via Constructors** | Go avoids reflectionheavy containers; compiletime wiring is preferred. | Use **ubergo/fx** (runtime graph) *or* **ubergo/dig** for optional runtime DI. For a lighter weight solution, use plain **constructor injection** with a small **registry**. | | **Dependency Injection (DI) via Constructors** | Go avoids reflectionheavy containers; compiletime wiring is preferred. | Use **ubergo/fx** (runtime graph) *or* **ubergo/dig** for optional runtime DI. For a lighter weight solution, use plain **constructor injection** with a small **registry**. |
| **Modular Monolith → Microserviceready** | A single binary is cheap in Go; later you can extract modules into separate services without breaking APIs. | Each module lives in its own Go **module** (`go.mod`) under `./modules/*`. The core loads them via the **Go plugin** system *or* static registration (preferred for CI stability). | | **Modular Monolith → Microserviceready** | A single binary is cheap in Go; later you can extract modules into separate services without breaking APIs. | Each module lives in its own Go **module** (`go.mod`) under `./modules/*`. The core loads them via the **Go plugin** system *or* static registration (preferred for CI stability). |
| **Pluginfirst design** | Gos `plugin` package allows runtime loading of compiled `.so` files (Linux/macOS). | Provide an **IModule** interface and a **loader** that discovers `*.so` files (or compiledin modules for CI). | | **Pluginfirst design** | Gos `plugin` package allows runtime loading of compiled `.so` files (Linux/macOS). | Provide an **IModule** interface and a **loader** that discovers `*.so` files (or compiledin modules for CI). |