@@ -21,9 +21,9 @@ make help # Show all available commands
2121
2222** Key Features:**
2323- Feature flag implementation with OpenFeature standard support
24- - Multiple storage backends (S3, HTTP, Kubernetes, MongoDB, Redis, etc.)
24+ - Multiple storage backends (S3, HTTP, Kubernetes, MongoDB, Redis, GCS, Azure, PostgreSQL, etc.)
2525- Complex rollout strategies (A/B testing, progressive, scheduled)
26- - Data export and notification systems
26+ - Data export, notification, and tracking systems
2727
2828## 🏗️ Architecture
2929
@@ -36,28 +36,37 @@ OpenFeature SDKs → Relay Proxy (cmd/relayproxy/) → GO Module (ffclient)
3636** Data Flow:** Retrievers fetch configs → Cache stores flags → Change detection triggers Notifiers → Evaluation generates Events → Exporters send data
3737
3838** Key Components:**
39- - ** ` ffclient ` ** : Core Go module for direct integration
39+ - ** ` ffclient ` (root package) ** : Core Go module for direct integration (root ` .go ` files are ` package ffclient ` )
4040- ** ` cmd/relayproxy/ ` ** : HTTP API server (uses Echo + Zap logging)
41- - ** ` retriever/ ` ** : Flag configuration sources (file , HTTP, S3, K8s, MongoDB, Redis, GitHub, GitLab, Bitbucket, PostgreSQL, Azure)
42- - ** ` exporter/ ` ** : Data export destinations (S3, File, Kafka, Kinesis, Webhook, GCS, Pub/Sub, SQS, Azure)
43- - ** ` notifier/ ` ** : Change notifications (Slack, Webhook, Discord, Teams, Logs)
44- - ** ` modules/core ` ** : Core logic modules used by OpenFeature providers and WASM
41+ - ** ` retriever/ ` ** : Flag configuration sources (File , HTTP, S3, K8s, MongoDB, Redis, GitHub, GitLab, Bitbucket, PostgreSQL, Azure Blob Storage, GCS )
42+ - ** ` exporter/ ` ** : Data export destinations (S3, File, Kafka, Kinesis, Webhook, GCS, Pub/Sub, SQS, Azure, Logs, OpenTelemetry )
43+ - ** ` notifier/ ` ** : Change notifications (Slack, Webhook, Discord, Microsoft Teams, Logs)
44+ - ** ` modules/core ` ** : Core logic module used by OpenFeature providers and WASM
4545
4646## 📁 Directory Structure
4747
4848** Root Level:**
49- - ` ffclient/ ` : Core client package
50- - ` cmd/ ` : Applications (relayproxy, cli, lint, editor, wasm)
49+ - Root ` .go ` files : Core ` ffclient ` package ( ` variation.go ` , ` feature_flag.go ` , ` config.go ` , ` tracking.go ` , ` variation_all_flags.go ` , ` config_exporter.go ` )
50+ - ` cmd/ ` : Applications (relayproxy, cli, lint, editor, jsonschema-generator, wasm)
5151- ` retriever/ ` , ` exporter/ ` , ` notifier/ ` : Integration packages
52- - ` modules/ ` : Separate Go modules (core, evaluation )
52+ - ` modules/ ` : Separate Go modules (` core ` only )
5353- ` internal/ ` : Internal packages (cache, flagstate, notification, signer)
54- - ` openfeature/providers/ ` : Some providers (Kotlin, Python) - most are in OpenFeature contrib repos
54+ - ` ffcontext/ ` : Evaluation context package
55+ - ` ffuser/ ` : User context (legacy)
56+ - ` model/ ` : DTO models
57+ - ` cmdhelpers/ ` : Shared CLI helpers (errors, retriever config)
58+ - ` utils/ ` : Utilities (fflog, string helpers, constants)
59+ - ` openfeature/providers/ ` : In-repo providers (Kotlin, Python, PHP, Ruby, Swift)
60+ - ` openfeature/provider_tests/ ` : Integration tests for providers (Go, JS, Java, .NET)
5561- ` testutils/ ` , ` testdata/ ` , ` examples/ ` , ` website/ `
5662
5763** Key Files:**
5864- ` variation.go ` : Flag evaluation methods
59- - ` feature_flag.go ` : Core logic
65+ - ` variation_all_flags.go ` : Bulk evaluation of all flags
66+ - ` feature_flag.go ` : Core logic and initialization
6067- ` config.go ` : Configuration structure
68+ - ` config_exporter.go ` : Exporter configuration
69+ - ` tracking.go ` : Tracking/experimentation support
6170- ` Makefile ` : Primary interface (use ` make help ` )
6271
6372## 🔑 Key Concepts
@@ -72,7 +81,7 @@ OpenFeature SDKs → Relay Proxy (cmd/relayproxy/) → GO Module (ffclient)
7281
7382** Interfaces:**
7483- ` Retriever ` : ` Retrieve(ctx context.Context) ([]byte, error) `
75- - ` Exporter ` : ` Export(ctx context.Context, events []FeatureEvent ) error ` , ` IsBulk() bool `
84+ - ` Exporter ` : ` Export(context.Context, *fflog.FFLogger, []ExportableEvent ) error ` + ` IsBulk() bool `
7685- ` Notifier ` : ` Notify(cache DiffCache) error `
7786
7887## 🛠️ Common Tasks
@@ -86,11 +95,11 @@ OpenFeature SDKs → Relay Proxy (cmd/relayproxy/) → GO Module (ffclient)
86956 . Update docs
8796
8897** OpenFeature Providers:**
89- - Most providers in OpenFeature contrib repos (Go, JS, Java, .NET, Ruby, Swift, PHP )
90- - Some in this repo: Kotlin (` kotlin-provider/ ` ), Python (` python-provider/ ` )
91- - Providers use ` modules/core ` for evaluation logic
98+ - Most providers in OpenFeature contrib repos (Go, JS, Java, .NET)
99+ - In this repo: Kotlin (` kotlin-provider/ ` ), Python (` python-provider/ ` ), PHP ( ` php-provider/ ` ), Ruby ( ` ruby-provider/ ` ), Swift ( ` swift -provider/` )
100+ - Providers use ` modules/core ` for evaluation logic
92101
93- ** Modules (` modules/core ` :**
102+ ** Modules (` modules/core ` ) :**
94103- Core logic separated for reuse by OpenFeature providers and WASM module
95104- ` modules/core ` : Flag structures, context, models, utilities
96105- Allows independent versioning and smaller dependency trees
@@ -117,7 +126,7 @@ func TestFunction(t *testing.T) {
117126}
118127```
119128
120- ** Commands:** ` make test ` , ` make coverage ` , ` make bench `
129+ ** Commands:** ` make test ` , ` make coverage ` , ` make bench ` , ` make provider-tests `
121130** Coverage:** Aim for 90%+, use ` testify/assert ` , mock external deps
122131
123132## 📝 Code Patterns
@@ -155,11 +164,11 @@ pre-commit install # Install pre-commit hooks
155164```
156165
157166** Common Commands:**
158- - ** Build:** ` make build ` , ` make build-relayproxy ` , ` make build-cli ` , ` make build-wasm `
159- - ** Dev:** ` make watch-relayproxy ` , ` make watch-doc `
160- - ** Test:** ` make test ` , ` make coverage ` , ` make bench `
167+ - ** Build:** ` make build ` , ` make build-relayproxy ` , ` make build-cli ` , ` make build-wasm ` , ` make build-wasi ` , ` make build-editor-api ` , ` make build-jsonschema-generator ` , ` make build-modules `
168+ - ** Dev:** ` make watch-relayproxy ` , ` make watch-doc ` , ` make serve-doc `
169+ - ** Test:** ` make test ` , ` make coverage ` , ` make bench ` , ` make provider-tests `
161170- ** Quality:** ` make lint ` , ` make tidy ` , ` make vendor `
162- - ** Utils:** ` make clean ` , ` make swagger ` , ` make generate-helm-docs `
171+ - ** Utils:** ` make clean ` , ` make swagger ` , ` make generate-helm-docs ` , ` make bump-helm-chart-version ` , ` make bump-wasm-contrib `
163172
164173** Code Quality:**
165174- Use ` make lint ` (golangci-lint)
@@ -168,9 +177,9 @@ pre-commit install # Install pre-commit hooks
168177
169178## 🔍 Code Navigation
170179
171- ** Flag Evaluation:** ` variation.go ` → ` feature_flag.go ` → ` internal/cache/ ` → ` internal/flagstate/ `
172- ** API Endpoints:** ` cmd/relayproxy/api/routes_*.go ` → ` controller/ ` → ` model/ `
173- ** Configuration:** ` config.go ` (ffclient), ` cmd/relayproxy/config/config.go ` (relay proxy)
180+ ** Flag Evaluation:** ` variation.go ` → ` feature_flag.go ` → ` internal/cache/ ` → ` internal/flagstate/ `
181+ ** API Endpoints:** ` cmd/relayproxy/api/routes_*.go ` → ` controller/ ` → ` model/ `
182+ ** Configuration:** ` config.go ` (ffclient), ` cmd/relayproxy/config/config.go ` (relay proxy)
174183** Flag Format:** ` .schema/flag-schema.json ` , ` testdata/flag-config.* ` , https://gofeatureflag.org/docs
175184
176185## 🔗 Important Files
@@ -185,11 +194,10 @@ pre-commit install # Install pre-commit hooks
185194
186195** Key Libraries:** Echo (HTTP), Koanf (config), OpenTelemetry (observability), Prometheus (metrics), Testcontainers (integration tests)
187196
188- ** Monorepo Modules:**
189- - Main module (root): Core library
197+ ** Monorepo Modules (Go workspace) :**
198+ - Main module (root): Core ` ffclient ` library
190199- ` modules/core ` : Core data structures (used by providers/WASM/relayproxy)
191- - ` cmd/wasm ` : WebAssembly evaluation
192- - ` openfeature/providers/ ` : Some providers (most in contrib repos)
200+ - ` cmd/wasm ` : WebAssembly/WASI evaluation
193201
194202## 📚 Resources
195203
@@ -200,8 +208,8 @@ pre-commit install # Install pre-commit hooks
200208
201209## 🎯 Quick Reference
202210
203- ** Entry Points:** ` ffclient.Init() ` , ` cmd/relayproxy/main.go ` , ` cmd/cli/main.go `
204- ** Interfaces:** ` Retriever ` , ` Exporter ` , ` Notifier ` , ` Cache `
211+ ** Entry Points:** ` ffclient.Init() ` , ` cmd/relayproxy/main.go ` , ` cmd/cli/main.go `
212+ ** Interfaces:** ` Retriever ` , ` Exporter ` , ` Notifier ` , ` Cache `
205213** Config:** YAML/JSON/TOML flags, ` ffclient.Config ` , ` cmd/relayproxy/config/config.go `
206214
207215## ⚠️ What Agents Must NEVER Do
0 commit comments