Commit Graph

7 Commits

Author SHA1 Message Date
2a0915dda0 build: Update library assets with UI visibility fix
- Rebuild JavaScript library with delayed control panel initialization
- Update server assets to include latest UI behavior changes
- Ensure built assets reflect invisible UI for regular visitors

The control panel now only appears after gate activation, maintaining
the invisible CMS principle for end users.
2025-09-17 19:12:52 +02:00
71561316da Fix demo site auto-enhancement and content persistence
- Restructure demo directory from test-sites/ to demos/ with flattened layout
- Add auto-enhancement on server startup for all sites with auto_enhance: true
- Fix inconsistent content ID generation that prevented dan-eden-portfolio content persistence
- Update server configuration to enhance from source to separate output directories
- Remove manual enhancement from justfile in favor of automatic server enhancement
- Clean up legacy test files and unused restore command
- Update build system to use CDN endpoint instead of file copying
2025-09-17 00:07:40 +02:00
2ce37874ff docs: update API documentation for single POST upsert endpoint
- Replace separate POST/PUT endpoints with unified POST upsert endpoint
- Add comprehensive API usage examples with automatic ID generation
- Simplify content management to single endpoint for create/update operations
- Document element_context for backend ID generation and version control features
2025-09-11 14:48:03 +02:00
f73e21ce6e feat: add manual file enhancement with development mode support
- Add manual enhance API endpoint (POST /api/enhance?site_id={site}) for triggering file enhancement
- Implement enhance button in JavaScript library status indicator (🔄 Enhance)
- Disable auto-enhancement in development mode to prevent live-reload conflicts
- Add dev mode parameter to SiteManager to control enhancement behavior
- Update API routing structure to support /api/enhance endpoint
- Include enhance button styling and user feedback (loading, success, error states)
- Button triggers file enhancement and page reload to show updated static files

Development workflow improvements:
- Content edits → Immediate editor preview (no unwanted page reloads)
- Manual enhance button → Intentional file updates + reload for testing
- Production mode maintains automatic enhancement on content changes

This resolves the live-reload conflict where automatic file enhancement
was causing unwanted page reloads during content editing in development.
2025-09-10 23:38:46 +02:00
2d0778287d fix: disable auto-enhancement in development mode to prevent live-reload loops
- Add dev_mode parameter to SiteManager constructor
- Modify IsAutoEnhanceEnabled() to return false when dev_mode is true
- Update serve.go to pass dev_mode flag to SiteManager
- Add ForceEnhanceEnabled() method for testing production behavior in development
- Update documentation to explain development vs production mode behavior

This fixes the development workflow where content updates would trigger
file modifications that caused unwanted page reloads in live-server.

Development mode: Content saved to database only, editor loads dynamically
Production mode: Content saved + files enhanced for immediate static deployment
2025-09-10 23:12:32 +02:00
8d92c6477b feat: implement server-hosted static site enhancement with real-time content updates
- Add SiteManager for registering and managing static sites with file-based enhancement
- Implement EnhanceInPlace method for in-place file modification using database content
- Integrate automatic file enhancement triggers in UpdateContent API handler
- Add comprehensive site configuration support in insertr.yaml with auto-enhancement
- Extend serve command to automatically register and manage configured sites
- Add backup system for original files before enhancement
- Support multi-site hosting with individual auto-enhancement settings
- Update documentation for server-hosted enhancement workflow

This enables real-time content deployment where database content changes
immediately update static files without requiring rebuilds or redeployment.
The database remains the single source of truth while maintaining static
file performance benefits.
2025-09-10 23:05:09 +02:00
ae9ae7e442 docs: update all documentation for unified binary architecture
📚 **Complete Documentation Overhaul**

**Updated Files:**
 **README.md** - Updated commands, configuration, and workflow
 **COMMANDS.md** - New comprehensive command reference
 **INTEGRATION-SUMMARY.md** - Updated architecture overview
 **insertr-server/README.md** - Redirect to unified binary docs

**Key Documentation Changes:**

🔧 **Unified Binary Commands:**
- Updated all examples to use `./insertr enhance` and `./insertr serve`
- Removed references to separate CLI/server binaries
- Added comprehensive configuration documentation

⚙️ **Configuration Section:**
- Added YAML configuration examples (`insertr.yaml`)
- Documented environment variables (`INSERTR_*`)
- Explained configuration precedence (CLI → env → YAML → defaults)

📖 **Command Reference (COMMANDS.md):**
- Complete reference for all commands and flags
- Usage patterns for development and production
- API endpoint documentation
- Error handling and debugging guides
- CI/CD integration examples

🏗️ **Architecture Updates:**
- Updated development workflow instructions
- Fixed CLI → Binary terminology
- Updated hot reload and build process documentation

**Migration Notes:**
- All functionality preserved in unified binary
- Simplified development workflow with `just dev`
- Single executable for all operations
2025-09-10 18:12:31 +02:00