Initial add backend stuff

This commit is contained in:
2026-07-08 15:45:16 -04:00
commit a7964f9410
89 changed files with 25924 additions and 0 deletions

17
appenv/appenv.go Normal file
View File

@@ -0,0 +1,17 @@
// Package appenv exposes the deployment environment that is baked into the
// binary at compile time. The concrete value of Environment is selected by a
// build tag (see env_development.go / env_staging.go / env_production.go), so it
// can never be misconfigured or missing at startup. The bundler propagates it
// into the JS bundle via the esbuild `__ENV_TYPE__` define.
//
// This is the framework half of what used to live in each app's
// internal/constants: the app keeps its concrete constants (cookie names,
// password rules, ...) and reads the environment from here.
package appenv
// The environment type names. Compared against Environment to branch behaviour.
const (
EnvTypeDevelopment = "development"
EnvTypeStaging = "staging"
EnvTypeProduction = "production"
)