Context
.env.example ships JWT_SECRET=change_me_before_production. Safe as a placeholder but easy to leave in production. Enforce at boot.
Where
- File:
.env.example
- Line: 212
Current Behavior
Placeholder value with no runtime guard.
Expected Behavior
In config/config.go, if STELLAR_NETWORK == 'PUBLIC' (or ENV == 'production') and JWT_SECRET == 'change_me_before_production', refuse to boot with a clear error.
Proposed Approach
- Add a validation check in
config/config.go.
- Wire the check into the boot path.
- Add a test.
Acceptance Criteria
Definition of Done
-
PR links back with Closes #<this-issue-number>.
-
CI is green (both Verify TypeScript Frontend & SDK and Verify Go Indexer & API jobs must pass).
-
Local verification:
-
cd indexer && go build -v ./... succeeds
-
cd indexer && go vet ./... clean
-
cd indexer && go test -v ./... green
-
cd indexer && gofmt -l . prints nothing
Contributor Tips
- Indexer lives in
indexer/ (Go 1.22, Postgres, subscribes to Soroban events).
- Run locally with
docker compose up -d db && cd indexer && go run .
- Format with
gofmt -w . and vet with go vet ./... before pushing.
- Test with
cd indexer && go test -v ./....
- HTTP handlers must accept
context.Context and honor cancellation.
Tech Stack
indexer
How to Claim
Comment .take (or say you're working on it) and open a PR with Closes #<this-issue-number> in the description.
Difficulty: Medium (complexity:medium) -- used for Drips Wave point allocation.
Context
.env.exampleshipsJWT_SECRET=change_me_before_production. Safe as a placeholder but easy to leave in production. Enforce at boot.Where
.env.exampleCurrent Behavior
Placeholder value with no runtime guard.
Expected Behavior
In
config/config.go, ifSTELLAR_NETWORK == 'PUBLIC'(orENV == 'production') andJWT_SECRET == 'change_me_before_production', refuse to boot with a clear error.Proposed Approach
config/config.go.Acceptance Criteria
Definition of Done
PR links back with
Closes #<this-issue-number>.CI is green (both
Verify TypeScript Frontend & SDKandVerify Go Indexer & APIjobs must pass).Local verification:
cd indexer && go build -v ./...succeedscd indexer && go vet ./...cleancd indexer && go test -v ./...greencd indexer && gofmt -l .prints nothingContributor Tips
indexer/(Go 1.22, Postgres, subscribes to Soroban events).docker compose up -d db && cd indexer && go run .gofmt -w .and vet withgo vet ./...before pushing.cd indexer && go test -v ./....context.Contextand honor cancellation.Tech Stack
indexer
How to Claim
Comment
.take(or say you're working on it) and open a PR withCloses #<this-issue-number>in the description.Difficulty: Medium (
complexity:medium) -- used for Drips Wave point allocation.