Skip to content

feat: set up configuration management and constants #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 6, 2025

Conversation

nullcoder
Copy link
Owner

Summary

  • Implement configuration module for type-safe environment access
  • Create centralized constants file with validation helpers
  • Build feature flags system with gradual rollout support

Test plan

  • Configuration module correctly reads environment variables
  • Constants validation helpers work as expected
  • Feature flags can be toggled based on environment
  • All tests pass (15 tests)
  • ESLint and TypeScript checks pass
  • Edge-runtime compatible

Implementation details

  • Added ENVIRONMENT variable to wrangler.toml with dev/staging overrides
  • Types work with auto-generated CloudflareEnv without extending it
  • Feature flags support percentage rollouts and user targeting
  • Constants reuse existing type definitions to avoid duplication

Closes #27

🤖 Generated with Claude Code

- Add configuration module for type-safe environment access
- Create constants file with limits and validation helpers
- Implement feature flags system with gradual rollout support
- Add ENVIRONMENT variable to wrangler.toml
- Update types to work with auto-generated CloudflareEnv
- Add comprehensive tests for config and constants
- Document new modules in lib/README.md

All modules are edge-runtime compatible and provide centralized
management of environment variables, application constants, and
feature toggles without requiring code changes.

Closes #27

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <claude@ghostpaste.dev>
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ghostpaste 2ed93a8 Visit preview Jun 05 2025, 10:01 PM

@nullcoder nullcoder merged commit 8f8e55b into main Jun 6, 2025
1 check passed
@nullcoder nullcoder deleted the feat/configuration-and-constants branch June 6, 2025 03:14
nullcoder added a commit that referenced this pull request Jun 6, 2025
Updated TODO.md to reflect completion of configuration-related tasks
from PR #32 which implemented:
- Configuration module for environment variables
- Constants file for limits and defaults
- Feature flags system

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
nullcoder added a commit that referenced this pull request Jun 6, 2025
Updated TODO.md to reflect completion of configuration-related tasks
from PR #32 which implemented:
- Configuration module for environment variables
- Constants file for limits and defaults
- Feature flags system

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set up configuration management and constants
1 participant