docs: add mkdocs, update links, add architecture documentation
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
# Task 0.1.1: Initialize Go Module
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.1.1
|
||||
- **Title**: Initialize Go Module
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.1 Repository Bootstrap
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: 5 minutes
|
||||
- **Dependencies**: None
|
||||
|
||||
## Description
|
||||
Initialize the Go module with the correct module path for the platform.
|
||||
|
||||
## Requirements
|
||||
- Use module path: `git.dcentral.systems/toolz/goplt`
|
||||
- Go version: 1.24.3
|
||||
- Ensure `go.mod` file is created correctly
|
||||
|
||||
## Implementation Steps
|
||||
1. Run `go mod init git.dcentral.systems/toolz/goplt` in the project root
|
||||
2. Verify `go.mod` file is created with correct module path
|
||||
3. Set Go version in `go.mod`: `go 1.24`
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] `go.mod` file exists in project root
|
||||
- [ ] Module path is `git.dcentral.systems/toolz/goplt`
|
||||
- [ ] Go version is set to `1.24`
|
||||
- [ ] `go mod verify` passes
|
||||
|
||||
## Related ADRs
|
||||
- [ADR-0001: Go Module Path](../../adr/0001-go-module-path.md)
|
||||
- [ADR-0002: Go Version](../../adr/0002-go-version.md)
|
||||
|
||||
## Implementation Notes
|
||||
- Ensure the module path matches the organization's Git hosting structure
|
||||
- The module path will be used for all internal imports
|
||||
- Update any documentation that references placeholder module paths
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
# Verify module initialization
|
||||
go mod verify
|
||||
go mod tidy
|
||||
```
|
||||
|
||||
47
docs/content/stories/phase0/0.1.1-initialize-go-module.md
Normal file
47
docs/content/stories/phase0/0.1.1-initialize-go-module.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# Task 0.1.1: Initialize Go Module
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.1.1
|
||||
- **Title**: Initialize Go Module
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.1 Repository Bootstrap
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: 5 minutes
|
||||
- **Dependencies**: None
|
||||
|
||||
## Description
|
||||
Initialize the Go module with the correct module path for the platform.
|
||||
|
||||
## Requirements
|
||||
- Use module path: `git.dcentral.systems/toolz/goplt`
|
||||
- Go version: 1.24.3
|
||||
- Ensure `go.mod` file is created correctly
|
||||
|
||||
## Implementation Steps
|
||||
1. Run `go mod init git.dcentral.systems/toolz/goplt` in the project root
|
||||
2. Verify `go.mod` file is created with correct module path
|
||||
3. Set Go version in `go.mod`: `go 1.24`
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] `go.mod` file exists in project root
|
||||
- [ ] Module path is `git.dcentral.systems/toolz/goplt`
|
||||
- [ ] Go version is set to `1.24`
|
||||
- [ ] `go mod verify` passes
|
||||
|
||||
## Related ADRs
|
||||
- [ADR-0001: Go Module Path](../../adr/0001-go-module-path.md)
|
||||
- [ADR-0002: Go Version](../../adr/0002-go-version.md)
|
||||
|
||||
## Implementation Notes
|
||||
- Ensure the module path matches the organization's Git hosting structure
|
||||
- The module path will be used for all internal imports
|
||||
- Update any documentation that references placeholder module paths
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
# Verify module initialization
|
||||
go mod verify
|
||||
go mod tidy
|
||||
```
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
# Task 0.1.2: Create directory structure:
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.1.2
|
||||
- **Title**: Create directory structure:
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.1
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: TBD
|
||||
- **Dependencies**: TBD
|
||||
|
||||
## Description
|
||||
Create directory structure:
|
||||
|
||||
## Requirements
|
||||
- Create directory structure:
|
||||
|
||||
## Implementation Steps
|
||||
1. TODO: Add implementation steps
|
||||
2. TODO: Add implementation steps
|
||||
3. TODO: Add implementation steps
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Task 0.1.2 is completed
|
||||
- [ ] All requirements are met
|
||||
- [ ] Code compiles and tests pass
|
||||
|
||||
## Related ADRs
|
||||
- See relevant ADRs in `docs/adr/`
|
||||
|
||||
## Implementation Notes
|
||||
- TODO: Add implementation notes
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
# TODO: Add test commands
|
||||
go test ./...
|
||||
```
|
||||
|
||||
|
||||
## Code Reference
|
||||
|
||||
```go
|
||||
platform/
|
||||
├── cmd/
|
||||
│ └── platform/ # Main entry point
|
||||
├── internal/ # Private implementation code
|
||||
│ ├── di/ # Dependency injection container
|
||||
│ ├── registry/ # Module registry
|
||||
│ ├── pluginloader/ # Plugin loader (optional)
|
||||
│ └── infra/ # Infrastructure adapters
|
||||
├── pkg/ # Public interfaces (exported)
|
||||
│ ├── config/ # ConfigProvider interface
|
||||
│ ├── logger/ # Logger interface
|
||||
│ ├── module/ # IModule interface
|
||||
│ ├── auth/ # Auth interfaces
|
||||
│ ├── perm/ # Permission DSL
|
||||
│ └── infra/ # Infrastructure interfaces
|
||||
├── modules/ # Feature modules
|
||||
│ └── blog/ # Sample Blog module (Phase 4)
|
||||
├── config/ # Configuration files
|
||||
│ ├── default.yaml
|
||||
│ ├── development.yaml
|
||||
│ └── production.yaml
|
||||
├── api/ # OpenAPI specs
|
||||
├── scripts/ # Build/test scripts
|
||||
├── docs/ # Documentation
|
||||
├── ops/ # Operations (Grafana dashboards, etc.)
|
||||
├── .github/
|
||||
│ └── workflows/
|
||||
│ └── ci.yml
|
||||
├── Dockerfile
|
||||
├── docker-compose.yml
|
||||
├── docker-compose.test.yml
|
||||
└── go.mod
|
||||
```
|
||||
@@ -0,0 +1,56 @@
|
||||
# Task 0.1.3: Add Gitignore
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.1.3
|
||||
- **Title**: Add Gitignore
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.1 Repository Bootstrap
|
||||
- **Status**: Pending
|
||||
- **Priority**: Medium
|
||||
- **Estimated Time**: 5 minutes
|
||||
- **Dependencies**: 0.1.1
|
||||
|
||||
## Description
|
||||
Create a comprehensive `.gitignore` file for Go projects that excludes build artifacts, dependencies, IDE files, and sensitive data.
|
||||
|
||||
## Requirements
|
||||
- Ignore Go build artifacts
|
||||
- Ignore dependency caches
|
||||
- Ignore IDE-specific files
|
||||
- Ignore environment-specific files
|
||||
- Ignore secrets and sensitive data
|
||||
|
||||
## Implementation Steps
|
||||
1. Create `.gitignore` in project root
|
||||
2. Add standard Go ignores:
|
||||
- `*.exe`, `*.exe~`, `*.dll`, `*.so`, `*.dylib`
|
||||
- `*.test`, `*.out`
|
||||
- `go.work`, `go.work.sum`
|
||||
3. Add IDE ignores:
|
||||
- `.vscode/`, `.idea/`, `*.swp`, `*.swo`
|
||||
4. Add environment ignores:
|
||||
- `.env`, `.env.local`, `config/secrets/`
|
||||
5. Add OS ignores:
|
||||
- `.DS_Store`, `Thumbs.db`
|
||||
6. Add build artifacts:
|
||||
- `bin/`, `dist/`, `tmp/`
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] `.gitignore` file exists
|
||||
- [ ] Common Go artifacts are ignored
|
||||
- [ ] IDE files are ignored
|
||||
- [ ] Sensitive files are ignored
|
||||
- [ ] Test with `git status` to verify
|
||||
|
||||
## Implementation Notes
|
||||
- Use standard Go `.gitignore` templates
|
||||
- Ensure `config/secrets/` is ignored (for secret files)
|
||||
- Consider adding `*.log` for log files
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
# Verify gitignore works
|
||||
git status
|
||||
# Should not show build artifacts or IDE files
|
||||
```
|
||||
|
||||
56
docs/content/stories/phase0/0.1.3-add-gitignore.md
Normal file
56
docs/content/stories/phase0/0.1.3-add-gitignore.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# Task 0.1.3: Add Gitignore
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.1.3
|
||||
- **Title**: Add Gitignore
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.1 Repository Bootstrap
|
||||
- **Status**: Pending
|
||||
- **Priority**: Medium
|
||||
- **Estimated Time**: 5 minutes
|
||||
- **Dependencies**: 0.1.1
|
||||
|
||||
## Description
|
||||
Create a comprehensive `.gitignore` file for Go projects that excludes build artifacts, dependencies, IDE files, and sensitive data.
|
||||
|
||||
## Requirements
|
||||
- Ignore Go build artifacts
|
||||
- Ignore dependency caches
|
||||
- Ignore IDE-specific files
|
||||
- Ignore environment-specific files
|
||||
- Ignore secrets and sensitive data
|
||||
|
||||
## Implementation Steps
|
||||
1. Create `.gitignore` in project root
|
||||
2. Add standard Go ignores:
|
||||
- `*.exe`, `*.exe~`, `*.dll`, `*.so`, `*.dylib`
|
||||
- `*.test`, `*.out`
|
||||
- `go.work`, `go.work.sum`
|
||||
3. Add IDE ignores:
|
||||
- `.vscode/`, `.idea/`, `*.swp`, `*.swo`
|
||||
4. Add environment ignores:
|
||||
- `.env`, `.env.local`, `config/secrets/`
|
||||
5. Add OS ignores:
|
||||
- `.DS_Store`, `Thumbs.db`
|
||||
6. Add build artifacts:
|
||||
- `bin/`, `dist/`, `tmp/`
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] `.gitignore` file exists
|
||||
- [ ] Common Go artifacts are ignored
|
||||
- [ ] IDE files are ignored
|
||||
- [ ] Sensitive files are ignored
|
||||
- [ ] Test with `git status` to verify
|
||||
|
||||
## Implementation Notes
|
||||
- Use standard Go `.gitignore` templates
|
||||
- Ensure `config/secrets/` is ignored (for secret files)
|
||||
- Consider adding `*.log` for log files
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
# Verify gitignore works
|
||||
git status
|
||||
# Should not show build artifacts or IDE files
|
||||
```
|
||||
|
||||
63
docs/content/stories/phase0/0.1.4-create-initial-readme.md
Normal file
63
docs/content/stories/phase0/0.1.4-create-initial-readme.md
Normal file
@@ -0,0 +1,63 @@
|
||||
# Task 0.1.4: Create Initial README
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.1.4
|
||||
- **Title**: Create Initial README
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.1 Repository Bootstrap
|
||||
- **Status**: Pending
|
||||
- **Priority**: Medium
|
||||
- **Estimated Time**: 20 minutes
|
||||
- **Dependencies**: 0.1.1
|
||||
|
||||
## Description
|
||||
Create an initial `README.md` file that provides an overview of the project, its purpose, architecture, and quick start instructions.
|
||||
|
||||
## Requirements
|
||||
- Project overview and description
|
||||
- Architecture overview
|
||||
- Quick start guide
|
||||
- Links to documentation
|
||||
- Build and run instructions
|
||||
|
||||
## Implementation Steps
|
||||
1. Create `README.md` in project root
|
||||
2. Add project title and description
|
||||
3. Add architecture overview section
|
||||
4. Add quick start instructions
|
||||
5. Add links to documentation (`docs/`)
|
||||
6. Add build and run commands
|
||||
7. Add contribution guidelines (placeholder)
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] `README.md` exists
|
||||
- [ ] Project overview is clear
|
||||
- [ ] Quick start instructions are present
|
||||
- [ ] Links to documentation work
|
||||
- [ ] Build instructions are accurate
|
||||
|
||||
## Implementation Notes
|
||||
- Keep README concise but informative
|
||||
- Update as project evolves
|
||||
- Include badges (build status, etc.) later
|
||||
- Reference ADRs for architecture decisions
|
||||
|
||||
## Content Structure
|
||||
```markdown
|
||||
# Go Platform (goplt)
|
||||
|
||||
[Description]
|
||||
|
||||
## Architecture
|
||||
[Overview]
|
||||
|
||||
## Quick Start
|
||||
[Instructions]
|
||||
|
||||
## Documentation
|
||||
[Links]
|
||||
|
||||
## Development
|
||||
[Setup instructions]
|
||||
```
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
# Task 0.1.4: Create Initial README
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.1.4
|
||||
- **Title**: Create Initial README
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.1 Repository Bootstrap
|
||||
- **Status**: Pending
|
||||
- **Priority**: Medium
|
||||
- **Estimated Time**: 20 minutes
|
||||
- **Dependencies**: 0.1.1
|
||||
|
||||
## Description
|
||||
Create an initial `README.md` file that provides an overview of the project, its purpose, architecture, and quick start instructions.
|
||||
|
||||
## Requirements
|
||||
- Project overview and description
|
||||
- Architecture overview
|
||||
- Quick start guide
|
||||
- Links to documentation
|
||||
- Build and run instructions
|
||||
|
||||
## Implementation Steps
|
||||
1. Create `README.md` in project root
|
||||
2. Add project title and description
|
||||
3. Add architecture overview section
|
||||
4. Add quick start instructions
|
||||
5. Add links to documentation (`docs/`)
|
||||
6. Add build and run commands
|
||||
7. Add contribution guidelines (placeholder)
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] `README.md` exists
|
||||
- [ ] Project overview is clear
|
||||
- [ ] Quick start instructions are present
|
||||
- [ ] Links to documentation work
|
||||
- [ ] Build instructions are accurate
|
||||
|
||||
## Implementation Notes
|
||||
- Keep README concise but informative
|
||||
- Update as project evolves
|
||||
- Include badges (build status, etc.) later
|
||||
- Reference ADRs for architecture decisions
|
||||
|
||||
## Content Structure
|
||||
```markdown
|
||||
# Go Platform (goplt)
|
||||
|
||||
[Description]
|
||||
|
||||
## Architecture
|
||||
[Overview]
|
||||
|
||||
## Quick Start
|
||||
[Instructions]
|
||||
|
||||
## Documentation
|
||||
[Links]
|
||||
|
||||
## Development
|
||||
[Setup instructions]
|
||||
```
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
# Task 0.2.1: Install Configuration Dependencies
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.2.1
|
||||
- **Title**: Install Configuration Dependencies
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.2 Configuration System
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: 5 minutes
|
||||
- **Dependencies**: 0.1.1
|
||||
|
||||
## Description
|
||||
Install Viper and Cobra packages for configuration management and CLI support.
|
||||
|
||||
## Requirements
|
||||
- Install `github.com/spf13/viper` v1.18.0+
|
||||
- Install `github.com/spf13/cobra` v1.8.0+
|
||||
- Add to `go.mod` with proper version constraints
|
||||
|
||||
## Implementation Steps
|
||||
1. Run `go get github.com/spf13/viper@v1.18.0`
|
||||
2. Run `go get github.com/spf13/cobra@v1.8.0`
|
||||
3. Run `go mod tidy` to update dependencies
|
||||
4. Verify packages in `go.mod`
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Viper is listed in `go.mod`
|
||||
- [ ] Cobra is listed in `go.mod`
|
||||
- [ ] `go mod verify` passes
|
||||
- [ ] Dependencies are properly versioned
|
||||
|
||||
## Related ADRs
|
||||
- [ADR-0004: Configuration Management](../../adr/0004-configuration-management.md)
|
||||
|
||||
## Implementation Notes
|
||||
- Use specific versions for reproducibility
|
||||
- Consider using `go get -u` for latest patch versions
|
||||
- Document version choices in ADR
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
go mod verify
|
||||
go list -m github.com/spf13/viper
|
||||
go list -m github.com/spf13/cobra
|
||||
```
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
# Task 0.2.1: Install Configuration Dependencies
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.2.1
|
||||
- **Title**: Install Configuration Dependencies
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.2 Configuration System
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: 5 minutes
|
||||
- **Dependencies**: 0.1.1
|
||||
|
||||
## Description
|
||||
Install Viper and Cobra packages for configuration management and CLI support.
|
||||
|
||||
## Requirements
|
||||
- Install `github.com/spf13/viper` v1.18.0+
|
||||
- Install `github.com/spf13/cobra` v1.8.0+
|
||||
- Add to `go.mod` with proper version constraints
|
||||
|
||||
## Implementation Steps
|
||||
1. Run `go get github.com/spf13/viper@v1.18.0`
|
||||
2. Run `go get github.com/spf13/cobra@v1.8.0`
|
||||
3. Run `go mod tidy` to update dependencies
|
||||
4. Verify packages in `go.mod`
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Viper is listed in `go.mod`
|
||||
- [ ] Cobra is listed in `go.mod`
|
||||
- [ ] `go mod verify` passes
|
||||
- [ ] Dependencies are properly versioned
|
||||
|
||||
## Related ADRs
|
||||
- [ADR-0004: Configuration Management](../../adr/0004-configuration-management.md)
|
||||
|
||||
## Implementation Notes
|
||||
- Use specific versions for reproducibility
|
||||
- Consider using `go get -u` for latest patch versions
|
||||
- Document version choices in ADR
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
go mod verify
|
||||
go list -m github.com/spf13/viper
|
||||
go list -m github.com/spf13/cobra
|
||||
```
|
||||
|
||||
59
docs/content/stories/phase0/0.2.2-create-config-interface.md
Normal file
59
docs/content/stories/phase0/0.2.2-create-config-interface.md
Normal file
@@ -0,0 +1,59 @@
|
||||
# Task 0.2.2: Create Config Interface
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.2.2
|
||||
- **Title**: Create Config Interface
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.2 Configuration System
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: 15 minutes
|
||||
- **Dependencies**: 0.2.1
|
||||
|
||||
## Description
|
||||
Create the `ConfigProvider` interface in `pkg/config/` to abstract configuration access. This interface will be used by all modules and services.
|
||||
|
||||
## Requirements
|
||||
- Define interface in `pkg/config/config.go`
|
||||
- Include methods for type-safe access
|
||||
- Support nested configuration keys
|
||||
- Support unmarshaling into structs
|
||||
|
||||
## Implementation Steps
|
||||
1. Create `pkg/config/config.go`
|
||||
2. Define `ConfigProvider` interface:
|
||||
```go
|
||||
type ConfigProvider interface {
|
||||
Get(key string) any
|
||||
Unmarshal(v any) error
|
||||
GetString(key string) string
|
||||
GetInt(key string) int
|
||||
GetBool(key string) bool
|
||||
GetStringSlice(key string) []string
|
||||
}
|
||||
```
|
||||
3. Add package documentation
|
||||
4. Export interface for use by modules
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] `pkg/config/config.go` exists
|
||||
- [ ] `ConfigProvider` interface is defined
|
||||
- [ ] Interface methods match requirements
|
||||
- [ ] Package documentation is present
|
||||
- [ ] Interface compiles without errors
|
||||
|
||||
## Related ADRs
|
||||
- [ADR-0004: Configuration Management](../../adr/0004-configuration-management.md)
|
||||
|
||||
## Implementation Notes
|
||||
- Interface should be minimal and focused
|
||||
- Additional methods can be added later if needed
|
||||
- Consider adding `GetDuration()` for time.Duration values
|
||||
- Consider adding `IsSet(key string) bool` to check if key exists
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
go build ./pkg/config
|
||||
go vet ./pkg/config
|
||||
```
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
# Task 0.2.2: Create Config Interface
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.2.2
|
||||
- **Title**: Create Config Interface
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.2 Configuration System
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: 15 minutes
|
||||
- **Dependencies**: 0.2.1
|
||||
|
||||
## Description
|
||||
Create the `ConfigProvider` interface in `pkg/config/` to abstract configuration access. This interface will be used by all modules and services.
|
||||
|
||||
## Requirements
|
||||
- Define interface in `pkg/config/config.go`
|
||||
- Include methods for type-safe access
|
||||
- Support nested configuration keys
|
||||
- Support unmarshaling into structs
|
||||
|
||||
## Implementation Steps
|
||||
1. Create `pkg/config/config.go`
|
||||
2. Define `ConfigProvider` interface:
|
||||
```go
|
||||
type ConfigProvider interface {
|
||||
Get(key string) any
|
||||
Unmarshal(v any) error
|
||||
GetString(key string) string
|
||||
GetInt(key string) int
|
||||
GetBool(key string) bool
|
||||
GetStringSlice(key string) []string
|
||||
}
|
||||
```
|
||||
3. Add package documentation
|
||||
4. Export interface for use by modules
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] `pkg/config/config.go` exists
|
||||
- [ ] `ConfigProvider` interface is defined
|
||||
- [ ] Interface methods match requirements
|
||||
- [ ] Package documentation is present
|
||||
- [ ] Interface compiles without errors
|
||||
|
||||
## Related ADRs
|
||||
- [ADR-0004: Configuration Management](../../adr/0004-configuration-management.md)
|
||||
|
||||
## Implementation Notes
|
||||
- Interface should be minimal and focused
|
||||
- Additional methods can be added later if needed
|
||||
- Consider adding `GetDuration()` for time.Duration values
|
||||
- Consider adding `IsSet(key string) bool` to check if key exists
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
go build ./pkg/config
|
||||
go vet ./pkg/config
|
||||
```
|
||||
|
||||
60
docs/content/stories/phase0/0.2.3-implement-config-loader.md
Normal file
60
docs/content/stories/phase0/0.2.3-implement-config-loader.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# Task 0.2.3: Implement Config Loader
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.2.3
|
||||
- **Title**: Implement Config Loader
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.2 Configuration System
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: 30 minutes
|
||||
- **Dependencies**: 0.2.1, 0.2.2
|
||||
|
||||
## Description
|
||||
Implement the Viper-based configuration loader in `internal/config/` that implements the `ConfigProvider` interface. This loader will handle hierarchical configuration loading from files and environment variables.
|
||||
|
||||
## Requirements
|
||||
- Implement `ConfigProvider` interface using Viper
|
||||
- Load configuration in order: defaults → environment-specific → env vars
|
||||
- Support YAML configuration files
|
||||
- Support environment variable overrides
|
||||
- Provide placeholder for secret manager integration (Phase 6)
|
||||
|
||||
## Implementation Steps
|
||||
1. Create `internal/config/config.go`:
|
||||
- Implement `ConfigProvider` interface
|
||||
- Wrap Viper instance
|
||||
- Implement all interface methods
|
||||
2. Create `internal/config/loader.go`:
|
||||
- `LoadConfig()` function
|
||||
- Load `config/default.yaml` as baseline
|
||||
- Merge environment-specific YAML (development/production)
|
||||
- Apply environment variable overrides
|
||||
- Set up automatic environment variable binding
|
||||
3. Add error handling for missing config files
|
||||
4. Add logging for configuration loading
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] `internal/config/config.go` implements `ConfigProvider`
|
||||
- [ ] `internal/config/loader.go` has `LoadConfig()` function
|
||||
- [ ] Configuration loads from `config/default.yaml`
|
||||
- [ ] Environment-specific configs are merged correctly
|
||||
- [ ] Environment variables override file values
|
||||
- [ ] Errors are handled gracefully
|
||||
|
||||
## Related ADRs
|
||||
- [ADR-0004: Configuration Management](../../adr/0004-configuration-management.md)
|
||||
|
||||
## Implementation Notes
|
||||
- Use Viper's `SetConfigName()` and `AddConfigPath()`
|
||||
- Use `MergeInConfig()` for environment-specific files
|
||||
- Use `AutomaticEnv()` for environment variable binding
|
||||
- Set environment variable prefix (e.g., `GOPLT_`)
|
||||
- Use `SetEnvKeyReplacer()` to replace dots with underscores
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
# Test config loading
|
||||
go test ./internal/config -v
|
||||
```
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
# Task 0.2.3: Implement Config Loader
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.2.3
|
||||
- **Title**: Implement Config Loader
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.2 Configuration System
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: 30 minutes
|
||||
- **Dependencies**: 0.2.1, 0.2.2
|
||||
|
||||
## Description
|
||||
Implement the Viper-based configuration loader in `internal/config/` that implements the `ConfigProvider` interface. This loader will handle hierarchical configuration loading from files and environment variables.
|
||||
|
||||
## Requirements
|
||||
- Implement `ConfigProvider` interface using Viper
|
||||
- Load configuration in order: defaults → environment-specific → env vars
|
||||
- Support YAML configuration files
|
||||
- Support environment variable overrides
|
||||
- Provide placeholder for secret manager integration (Phase 6)
|
||||
|
||||
## Implementation Steps
|
||||
1. Create `internal/config/config.go`:
|
||||
- Implement `ConfigProvider` interface
|
||||
- Wrap Viper instance
|
||||
- Implement all interface methods
|
||||
2. Create `internal/config/loader.go`:
|
||||
- `LoadConfig()` function
|
||||
- Load `config/default.yaml` as baseline
|
||||
- Merge environment-specific YAML (development/production)
|
||||
- Apply environment variable overrides
|
||||
- Set up automatic environment variable binding
|
||||
3. Add error handling for missing config files
|
||||
4. Add logging for configuration loading
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] `internal/config/config.go` implements `ConfigProvider`
|
||||
- [ ] `internal/config/loader.go` has `LoadConfig()` function
|
||||
- [ ] Configuration loads from `config/default.yaml`
|
||||
- [ ] Environment-specific configs are merged correctly
|
||||
- [ ] Environment variables override file values
|
||||
- [ ] Errors are handled gracefully
|
||||
|
||||
## Related ADRs
|
||||
- [ADR-0004: Configuration Management](../../adr/0004-configuration-management.md)
|
||||
|
||||
## Implementation Notes
|
||||
- Use Viper's `SetConfigName()` and `AddConfigPath()`
|
||||
- Use `MergeInConfig()` for environment-specific files
|
||||
- Use `AutomaticEnv()` for environment variable binding
|
||||
- Set environment variable prefix (e.g., `GOPLT_`)
|
||||
- Use `SetEnvKeyReplacer()` to replace dots with underscores
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
# Test config loading
|
||||
go test ./internal/config -v
|
||||
```
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
# Task 0.2.4: Create Configuration Files
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.2.4
|
||||
- **Title**: Create Configuration Files
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.2 Configuration System
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: 15 minutes
|
||||
- **Dependencies**: 0.1.2
|
||||
|
||||
## Description
|
||||
Create the baseline configuration YAML files that define the default configuration structure for the platform.
|
||||
|
||||
## Requirements
|
||||
- Create `config/default.yaml` with baseline values
|
||||
- Create `config/development.yaml` with development overrides
|
||||
- Create `config/production.yaml` with production overrides
|
||||
- Define configuration schema for all core services
|
||||
|
||||
## Implementation Steps
|
||||
1. Create `config/default.yaml`:
|
||||
```yaml
|
||||
environment: development
|
||||
server:
|
||||
port: 8080
|
||||
host: "0.0.0.0"
|
||||
database:
|
||||
driver: "postgres"
|
||||
dsn: ""
|
||||
logging:
|
||||
level: "info"
|
||||
format: "json"
|
||||
```
|
||||
2. Create `config/development.yaml`:
|
||||
- Override logging level to "debug"
|
||||
- Add development-specific settings
|
||||
3. Create `config/production.yaml`:
|
||||
- Override logging level to "warn"
|
||||
- Add production-specific settings
|
||||
4. Document configuration options
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] `config/default.yaml` exists with complete structure
|
||||
- [ ] `config/development.yaml` exists
|
||||
- [ ] `config/production.yaml` exists
|
||||
- [ ] All configuration files are valid YAML
|
||||
- [ ] Configuration structure is documented
|
||||
|
||||
## Related ADRs
|
||||
- [ADR-0004: Configuration Management](../../adr/0004-configuration-management.md)
|
||||
|
||||
## Implementation Notes
|
||||
- Use consistent indentation (2 spaces)
|
||||
- Add comments for unclear configuration options
|
||||
- Use environment variables for sensitive values (DSN, secrets)
|
||||
- Consider adding validation schema later
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
# Validate YAML syntax
|
||||
yamllint config/*.yaml
|
||||
# or
|
||||
python3 -c "import yaml; yaml.safe_load(open('config/default.yaml'))"
|
||||
```
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
# Task 0.2.4: Create Configuration Files
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.2.4
|
||||
- **Title**: Create Configuration Files
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.2 Configuration System
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: 15 minutes
|
||||
- **Dependencies**: 0.1.2
|
||||
|
||||
## Description
|
||||
Create the baseline configuration YAML files that define the default configuration structure for the platform.
|
||||
|
||||
## Requirements
|
||||
- Create `config/default.yaml` with baseline values
|
||||
- Create `config/development.yaml` with development overrides
|
||||
- Create `config/production.yaml` with production overrides
|
||||
- Define configuration schema for all core services
|
||||
|
||||
## Implementation Steps
|
||||
1. Create `config/default.yaml`:
|
||||
```yaml
|
||||
environment: development
|
||||
server:
|
||||
port: 8080
|
||||
host: "0.0.0.0"
|
||||
database:
|
||||
driver: "postgres"
|
||||
dsn: ""
|
||||
logging:
|
||||
level: "info"
|
||||
format: "json"
|
||||
```
|
||||
2. Create `config/development.yaml`:
|
||||
- Override logging level to "debug"
|
||||
- Add development-specific settings
|
||||
3. Create `config/production.yaml`:
|
||||
- Override logging level to "warn"
|
||||
- Add production-specific settings
|
||||
4. Document configuration options
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] `config/default.yaml` exists with complete structure
|
||||
- [ ] `config/development.yaml` exists
|
||||
- [ ] `config/production.yaml` exists
|
||||
- [ ] All configuration files are valid YAML
|
||||
- [ ] Configuration structure is documented
|
||||
|
||||
## Related ADRs
|
||||
- [ADR-0004: Configuration Management](../../adr/0004-configuration-management.md)
|
||||
|
||||
## Implementation Notes
|
||||
- Use consistent indentation (2 spaces)
|
||||
- Add comments for unclear configuration options
|
||||
- Use environment variables for sensitive values (DSN, secrets)
|
||||
- Consider adding validation schema later
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
# Validate YAML syntax
|
||||
yamllint config/*.yaml
|
||||
# or
|
||||
python3 -c "import yaml; yaml.safe_load(open('config/default.yaml'))"
|
||||
```
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# Task 0.2.5: Add `internal/config/loader.go` with `LoadConfig()` function
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.2.5
|
||||
- **Title**: Add `internal/config/loader.go` with `LoadConfig()` function
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.2
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: TBD
|
||||
- **Dependencies**: TBD
|
||||
|
||||
## Description
|
||||
Add `internal/config/loader.go` with `LoadConfig()` function
|
||||
|
||||
## Requirements
|
||||
- Add `internal/config/loader.go` with `LoadConfig()` function
|
||||
|
||||
## Implementation Steps
|
||||
1. TODO: Add implementation steps
|
||||
2. TODO: Add implementation steps
|
||||
3. TODO: Add implementation steps
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Task 0.2.5 is completed
|
||||
- [ ] All requirements are met
|
||||
- [ ] Code compiles and tests pass
|
||||
|
||||
## Related ADRs
|
||||
- See relevant ADRs in `docs/adr/`
|
||||
|
||||
## Implementation Notes
|
||||
- TODO: Add implementation notes
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
# TODO: Add test commands
|
||||
go test ./...
|
||||
```
|
||||
|
||||
33
docs/content/stories/phase0/0.3.1-install-gouberorgzap.md
Normal file
33
docs/content/stories/phase0/0.3.1-install-gouberorgzap.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Task 0.3.1: Install Logging Dependencies
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.3.1
|
||||
- **Title**: Install Logging Dependencies
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.3 Logging Foundation
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: 5 minutes
|
||||
- **Dependencies**: 0.1.1
|
||||
|
||||
## Description
|
||||
Install the Zap logging library for structured logging.
|
||||
|
||||
## Requirements
|
||||
- Install `go.uber.org/zap` v1.26.0+
|
||||
- Add to `go.mod` with proper version constraints
|
||||
|
||||
## Implementation Steps
|
||||
1. Run `go get go.uber.org/zap@v1.26.0`
|
||||
2. Run `go mod tidy`
|
||||
3. Verify package in `go.mod`
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Zap is listed in `go.mod`
|
||||
- [ ] Version is v1.26.0 or later
|
||||
- [ ] `go mod verify` passes
|
||||
|
||||
## Related ADRs
|
||||
- [ADR-0005: Logging Framework](../../adr/0005-logging-framework.md)
|
||||
- [ADR-0012: Logger Interface Design](../../adr/0012-logger-interface-design.md)
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# Task 0.3.1: Install Logging Dependencies
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.3.1
|
||||
- **Title**: Install Logging Dependencies
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.3 Logging Foundation
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: 5 minutes
|
||||
- **Dependencies**: 0.1.1
|
||||
|
||||
## Description
|
||||
Install the Zap logging library for structured logging.
|
||||
|
||||
## Requirements
|
||||
- Install `go.uber.org/zap` v1.26.0+
|
||||
- Add to `go.mod` with proper version constraints
|
||||
|
||||
## Implementation Steps
|
||||
1. Run `go get go.uber.org/zap@v1.26.0`
|
||||
2. Run `go mod tidy`
|
||||
3. Verify package in `go.mod`
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Zap is listed in `go.mod`
|
||||
- [ ] Version is v1.26.0 or later
|
||||
- [ ] `go mod verify` passes
|
||||
|
||||
## Related ADRs
|
||||
- [ADR-0005: Logging Framework](../../adr/0005-logging-framework.md)
|
||||
- [ADR-0012: Logger Interface Design](../../adr/0012-logger-interface-design.md)
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
# Task 0.3.2: Create `pkg/logger/logger.go` interface:
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.3.2
|
||||
- **Title**: Create `pkg/logger/logger.go` interface:
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.3
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: TBD
|
||||
- **Dependencies**: TBD
|
||||
|
||||
## Description
|
||||
Create `pkg/logger/logger.go` interface:
|
||||
|
||||
## Requirements
|
||||
- Create `pkg/logger/logger.go` interface:
|
||||
|
||||
## Implementation Steps
|
||||
1. TODO: Add implementation steps
|
||||
2. TODO: Add implementation steps
|
||||
3. TODO: Add implementation steps
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Task 0.3.2 is completed
|
||||
- [ ] All requirements are met
|
||||
- [ ] Code compiles and tests pass
|
||||
|
||||
## Related ADRs
|
||||
- See relevant ADRs in `docs/adr/`
|
||||
|
||||
## Implementation Notes
|
||||
- TODO: Add implementation notes
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
# TODO: Add test commands
|
||||
go test ./...
|
||||
```
|
||||
|
||||
|
||||
## Code Reference
|
||||
|
||||
```go
|
||||
type Logger interface {
|
||||
Debug(msg string, fields ...Field)
|
||||
Info(msg string, fields ...Field)
|
||||
Warn(msg string, fields ...Field)
|
||||
Error(msg string, fields ...Field)
|
||||
With(fields ...Field) Logger
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,40 @@
|
||||
# Task 0.3.3: Implement `internal/logger/zap_logger.go`:
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.3.3
|
||||
- **Title**: Implement `internal/logger/zap_logger.go`:
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.3
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: TBD
|
||||
- **Dependencies**: TBD
|
||||
|
||||
## Description
|
||||
Implement `internal/logger/zap_logger.go`:
|
||||
|
||||
## Requirements
|
||||
- Implement `internal/logger/zap_logger.go`:
|
||||
|
||||
## Implementation Steps
|
||||
1. TODO: Add implementation steps
|
||||
2. TODO: Add implementation steps
|
||||
3. TODO: Add implementation steps
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Task 0.3.3 is completed
|
||||
- [ ] All requirements are met
|
||||
- [ ] Code compiles and tests pass
|
||||
|
||||
## Related ADRs
|
||||
- See relevant ADRs in `docs/adr/`
|
||||
|
||||
## Implementation Notes
|
||||
- TODO: Add implementation notes
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
# TODO: Add test commands
|
||||
go test ./...
|
||||
```
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# Task 0.3.4: Add request ID middleware helper (Gin middleware)
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.3.4
|
||||
- **Title**: Add request ID middleware helper (Gin middleware)
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.3
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: TBD
|
||||
- **Dependencies**: TBD
|
||||
|
||||
## Description
|
||||
Add request ID middleware helper (Gin middleware)
|
||||
|
||||
## Requirements
|
||||
- Add request ID middleware helper (Gin middleware)
|
||||
|
||||
## Implementation Steps
|
||||
1. TODO: Add implementation steps
|
||||
2. TODO: Add implementation steps
|
||||
3. TODO: Add implementation steps
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Task 0.3.4 is completed
|
||||
- [ ] All requirements are met
|
||||
- [ ] Code compiles and tests pass
|
||||
|
||||
## Related ADRs
|
||||
- See relevant ADRs in `docs/adr/`
|
||||
|
||||
## Implementation Notes
|
||||
- TODO: Add implementation notes
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
# TODO: Add test commands
|
||||
go test ./...
|
||||
```
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# Task 0.4.1: Create `.github/workflows/ci.yml`:
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.4.1
|
||||
- **Title**: Create `.github/workflows/ci.yml`:
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.4
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: TBD
|
||||
- **Dependencies**: TBD
|
||||
|
||||
## Description
|
||||
Create `.github/workflows/ci.yml`:
|
||||
|
||||
## Requirements
|
||||
- Create `.github/workflows/ci.yml`:
|
||||
|
||||
## Implementation Steps
|
||||
1. TODO: Add implementation steps
|
||||
2. TODO: Add implementation steps
|
||||
3. TODO: Add implementation steps
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Task 0.4.1 is completed
|
||||
- [ ] All requirements are met
|
||||
- [ ] Code compiles and tests pass
|
||||
|
||||
## Related ADRs
|
||||
- See relevant ADRs in `docs/adr/`
|
||||
|
||||
## Implementation Notes
|
||||
- TODO: Add implementation notes
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
# TODO: Add test commands
|
||||
go test ./...
|
||||
```
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# Task 0.4.2: Add `Makefile` with common commands:
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.4.2
|
||||
- **Title**: Add `Makefile` with common commands:
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.4
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: TBD
|
||||
- **Dependencies**: TBD
|
||||
|
||||
## Description
|
||||
Add `Makefile` with common commands:
|
||||
|
||||
## Requirements
|
||||
- Add `Makefile` with common commands:
|
||||
|
||||
## Implementation Steps
|
||||
1. TODO: Add implementation steps
|
||||
2. TODO: Add implementation steps
|
||||
3. TODO: Add implementation steps
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Task 0.4.2 is completed
|
||||
- [ ] All requirements are met
|
||||
- [ ] Code compiles and tests pass
|
||||
|
||||
## Related ADRs
|
||||
- See relevant ADRs in `docs/adr/`
|
||||
|
||||
## Implementation Notes
|
||||
- TODO: Add implementation notes
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
# TODO: Add test commands
|
||||
go test ./...
|
||||
```
|
||||
|
||||
40
docs/content/stories/phase0/0.5.1-install-gouberorgfx.md
Normal file
40
docs/content/stories/phase0/0.5.1-install-gouberorgfx.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# Task 0.5.1: Install `go.uber.org/fx`
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.5.1
|
||||
- **Title**: Install `go.uber.org/fx`
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.5
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: TBD
|
||||
- **Dependencies**: TBD
|
||||
|
||||
## Description
|
||||
Install `go.uber.org/fx`
|
||||
|
||||
## Requirements
|
||||
- Install `go.uber.org/fx`
|
||||
|
||||
## Implementation Steps
|
||||
1. TODO: Add implementation steps
|
||||
2. TODO: Add implementation steps
|
||||
3. TODO: Add implementation steps
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Task 0.5.1 is completed
|
||||
- [ ] All requirements are met
|
||||
- [ ] Code compiles and tests pass
|
||||
|
||||
## Related ADRs
|
||||
- See relevant ADRs in `docs/adr/`
|
||||
|
||||
## Implementation Notes
|
||||
- TODO: Add implementation notes
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
# TODO: Add test commands
|
||||
go test ./...
|
||||
```
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# Task 0.5.2: Create `internal/di/container.go`:
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.5.2
|
||||
- **Title**: Create `internal/di/container.go`:
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.5
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: TBD
|
||||
- **Dependencies**: TBD
|
||||
|
||||
## Description
|
||||
Create `internal/di/container.go`:
|
||||
|
||||
## Requirements
|
||||
- Create `internal/di/container.go`:
|
||||
|
||||
## Implementation Steps
|
||||
1. TODO: Add implementation steps
|
||||
2. TODO: Add implementation steps
|
||||
3. TODO: Add implementation steps
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Task 0.5.2 is completed
|
||||
- [ ] All requirements are met
|
||||
- [ ] Code compiles and tests pass
|
||||
|
||||
## Related ADRs
|
||||
- See relevant ADRs in `docs/adr/`
|
||||
|
||||
## Implementation Notes
|
||||
- TODO: Add implementation notes
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
# TODO: Add test commands
|
||||
go test ./...
|
||||
```
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# Task 0.5.3: Create `cmd/platform/main.go` skeleton:
|
||||
|
||||
## Metadata
|
||||
- **Task ID**: 0.5.3
|
||||
- **Title**: Create `cmd/platform/main.go` skeleton:
|
||||
- **Phase**: 0 - Project Setup & Foundation
|
||||
- **Section**: 0.5
|
||||
- **Status**: Pending
|
||||
- **Priority**: High
|
||||
- **Estimated Time**: TBD
|
||||
- **Dependencies**: TBD
|
||||
|
||||
## Description
|
||||
Create `cmd/platform/main.go` skeleton:
|
||||
|
||||
## Requirements
|
||||
- Create `cmd/platform/main.go` skeleton:
|
||||
|
||||
## Implementation Steps
|
||||
1. TODO: Add implementation steps
|
||||
2. TODO: Add implementation steps
|
||||
3. TODO: Add implementation steps
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Task 0.5.3 is completed
|
||||
- [ ] All requirements are met
|
||||
- [ ] Code compiles and tests pass
|
||||
|
||||
## Related ADRs
|
||||
- See relevant ADRs in `docs/adr/`
|
||||
|
||||
## Implementation Notes
|
||||
- TODO: Add implementation notes
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
# TODO: Add test commands
|
||||
go test ./...
|
||||
```
|
||||
|
||||
47
docs/content/stories/phase0/README.md
Normal file
47
docs/content/stories/phase0/README.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# Phase 0: Project Setup & Foundation
|
||||
|
||||
## Overview
|
||||
Initialize repository structure, set up Go modules and basic tooling, create configuration management foundation, and establish CI/CD skeleton.
|
||||
|
||||
## Tasks
|
||||
|
||||
### 0.1 Repository Bootstrap
|
||||
- [0.1.1 - Initialize Go Module](./0.1.1-initialize-go-module.md)
|
||||
- [0.1.2 - Create Directory Structure](./0.1.2-create-directory-structure.md)
|
||||
- [0.1.3 - Add Gitignore](./0.1.3-add-gitignore.md)
|
||||
- [0.1.4 - Create Initial README](./0.1.4-create-initial-readme.md)
|
||||
|
||||
### 0.2 Configuration System
|
||||
- [0.2.1 - Install Configuration Dependencies](./0.2.1-install-config-dependencies.md)
|
||||
- [0.2.2 - Create Config Interface](./0.2.2-create-config-interface.md)
|
||||
- [0.2.3 - Implement Config Loader](./0.2.3-implement-config-loader.md)
|
||||
- [0.2.4 - Create Configuration Files](./0.2.4-create-configuration-files.md)
|
||||
|
||||
### 0.3 Logging Foundation
|
||||
- [0.3.1 - Install Logging Dependencies](./0.3.1-install-logging-dependencies.md)
|
||||
- [0.3.2 - Create Logger Interface](./0.3.2-create-logger-interface.md) - Create `pkg/logger/logger.go` interface
|
||||
- [0.3.3 - Implement Zap Logger](./0.3.3-implement-zap-logger.md) - Implement `internal/logger/zap_logger.go`
|
||||
- [0.3.4 - Add Request ID Middleware](./0.3.4-add-request-id-middleware.md) - Create Gin middleware for request IDs
|
||||
|
||||
### 0.4 Basic CI/CD Pipeline
|
||||
- [0.4.1 - Create GitHub Actions Workflow](./0.4.1-create-github-actions-workflow.md)
|
||||
- [0.4.2 - Create Makefile](./0.4.2-create-makefile.md)
|
||||
|
||||
### 0.5 Dependency Injection Setup
|
||||
- [0.5.1 - Install FX Dependency](./0.5.1-install-fx-dependency.md)
|
||||
- [0.5.2 - Create DI Container](./0.5.2-create-di-container.md)
|
||||
- [0.5.3 - Create Main Entry Point](./0.5.3-create-main-entry-point.md)
|
||||
|
||||
## Deliverables Checklist
|
||||
- [ ] Repository structure in place
|
||||
- [ ] Configuration system loads YAML files and env vars
|
||||
- [ ] Structured logging works
|
||||
- [ ] CI pipeline runs linting and builds binary
|
||||
- [ ] Basic DI container initialized
|
||||
|
||||
## Acceptance Criteria
|
||||
- `go build ./cmd/platform` succeeds
|
||||
- `go test ./...` runs (even if tests are empty)
|
||||
- CI pipeline passes on empty commit
|
||||
- Config loads from `config/default.yaml`
|
||||
|
||||
Reference in New Issue
Block a user