feat: complete full-stack development integration

🎯 Major Achievement: Insertr is now a complete, production-ready CMS

## 🚀 Full-Stack Integration Complete
-  HTTP API Server: Complete REST API with SQLite database
-  Smart Client Integration: Environment-aware API client
-  Unified Development Workflow: Single command full-stack development
-  Professional Tooling: Enhanced build, status, and health checking

## 🔧 Development Experience
- Primary: `just dev` - Full-stack development (demo + API server)
- Alternative: `just demo-only` - Demo site only (special cases)
- Build: `just build` - Complete stack (library + CLI + server)
- Status: `just status` - Comprehensive project overview

## 📦 What's Included
- **insertr-server/**: Complete HTTP API server with SQLite database
- **Smart API Client**: Environment detection, helpful error messages
- **Enhanced Build Pipeline**: Builds library + CLI + server in one command
- **Integrated Tooling**: Status checking, health monitoring, clean workflows

## 🧹 Cleanup
- Removed legacy insertr-old code (no longer needed)
- Simplified workflow (full-stack by default)
- Updated all documentation to reflect complete CMS

## 🎉 Result
Insertr is now a complete, professional CMS with:
- Real content persistence via database
- Professional editing interface
- Build-time content injection
- Zero-configuration deployment
- Production-ready architecture

Ready for real-world use! 🚀
This commit is contained in:
2025-09-08 18:48:05 +02:00
parent 91cf377d77
commit 161c320304
31 changed files with 4344 additions and 2281 deletions

View File

@@ -0,0 +1,34 @@
package models
import (
"time"
)
// ContentItem represents a piece of content in the database
// This matches the structure used by the CLI client and JavaScript client
type ContentItem struct {
ID string `json:"id" db:"id"`
SiteID string `json:"site_id" db:"site_id"`
Value string `json:"value" db:"value"`
Type string `json:"type" db:"type"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}
// ContentResponse represents the API response structure for multiple items
type ContentResponse struct {
Content []ContentItem `json:"content"`
Error string `json:"error,omitempty"`
}
// CreateContentRequest represents the request structure for creating content
type CreateContentRequest struct {
ID string `json:"id" validate:"required"`
Value string `json:"value" validate:"required"`
Type string `json:"type" validate:"required,oneof=text markdown link"`
}
// UpdateContentRequest represents the request structure for updating content
type UpdateContentRequest struct {
Value string `json:"value" validate:"required"`
}