Initial commit of Descrybe v2 without local scratch artifacts.

Drop one-shot tmp/axe scripts and agent i18n scratch so the Gitea tree is deployable.
This commit is contained in:
2026-08-09 22:47:43 +02:00
commit 8580c996c3
1285 changed files with 325780 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
// Package platformsettings is the durable store for platform-level product and
// integration config (OpenAI, SMTP, OAuth, Stripe, EPREL, Pinecone, feed allowlist,
// generic KV) managed from the admin dashboard — so these values need not live
// only in process env.
//
// Storage (reuse, no new migration): company_settings JSONB for a reserved
// system company (SystemCompanyID). Secrets are AES-GCM enc:v1: blobs, same
// pattern as aiprovider/email/woocommerce. Integration tunables live in Values
// (see keys.go); secret Value keys are encrypted on write.
//
// Runtime reads (prefer DB, fall back to EnvConfig / process env):
//
// svc := platformsettings.NewService(pool, env)
// oi, err := svc.ResolveOpenAI(ctx)
// smtp, err := svc.ResolveSMTP(ctx)
// stripe, err := svc.ResolveStripe(ctx, base)
// eprel, err := svc.ResolveEPREL(ctx)
// pc, err := svc.ResolvePinecone(ctx)
// g, err := svc.ResolveOAuthGoogle(ctx)
// v, ok, err := svc.GetKV(ctx, "my.key")
package platformsettings