Merged
Conversation
Replaces direct process.env usage with a robust, type-safe config system: ✨ New Features: - Schema-based configuration with automatic validation - Full TypeScript type inference (literal types for enums) - Runtime config reloading capability - Centralized config management in config/ directory - Prevents Bun build-time env variable inlining 🏗️ Architecture (3 layers): 1. core/utils/env.ts - Dynamic env loader (prevents inlining) 2. core/utils/config-schema.ts - Schema system with validation 3. config/*.config.ts - Application configs (app, server, logger, etc) 📝 Config Files Added: - config/app.config.ts - Application settings - config/server.config.ts - Server configuration - config/logger.config.ts - Logging configuration - config/system.config.ts - System runtime info - config/build.config.ts - Build settings - config/database.config.ts - Database config (placeholder) - config/services.config.ts - External services (placeholder) 🔧 Core Changes: - core/utils/config-schema.ts - Schema system with InferConfig<T> - core/utils/env.ts - NEW dynamic env loader - core/config/env.ts - Updated to use new env system - Removed: env-dynamic.ts, env-runtime.ts, env-runtime-v2.ts 🎯 Application Updates: - app/server/live/FluxStackConfig.ts - Uses declarative configs - app/server/routes/config.ts - NEW config inspection endpoint - All route handlers updated to use typed configs ✅ Benefits: - Zero 'any' types - full type inference - Validation at boot time with clear errors - Single source of truth for configuration - Better IDE autocomplete and type checking - Prevents runtime config bugs 🔥 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
Fixes TypeScript errors where minify property was used but not defined in interfaces. Changes: - core/config/schema.ts: Add minify to ClientBuildConfig, OptimizationConfig, and BuildConfig - app/server/index.ts: Add minify: false to client build config 🔥 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Ensures the config/ folder is available in production builds. Changes: - core/build/index.ts: Add cpSync import and copy config/ folder after package.json - Config files are now available at dist/config/ for runtime usage This is required for the new declarative configuration system to work in production. 🔥 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This reverts commit d442703.
Adds config/ folder to the list of files copied during project creation. Changes: - create-fluxstack.ts: Add 'config' to filesToCopy array This ensures new projects have the declarative configuration system available. 🔥 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Instead of copying .env directly, now reads and replaces development with production. Changes: - core/build/index.ts: Read .env content and replace NODE_ENV values to production - Both NODE_ENV and VITE_NODE_ENV are set to production in dist/.env This ensures production builds use the correct environment mode. 🔥 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Updates CLAUDE.md with comprehensive documentation about the new Laravel-inspired config system. Changes: - Add section "Sistema de Configuração Declarativa" with examples - Update architecture diagram to include config/ folder - Add to "Mudanças Importantes" section - Include usage examples, helpers, and best practices Documentation covers: - Config folder structure - Schema definition examples - Type safety and validation - Available helpers (config.string, config.number, etc.) - Do's and Don'ts - Benefits and architecture 🔥 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Creates single source of truth for version number in core/utils/version.ts. Changes: - core/utils/version.ts: NEW file with FLUXSTACK_VERSION constant - core/utils/logger/startup-banner.ts: Import and use FLUXSTACK_VERSION - package.json: Update version to 1.2.0 and description Version 1.2.0 includes the new declarative configuration system. 🔥 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.