cleanup: remove legacy insertr-cli and insertr-server directories

🧹 **Legacy Code Cleanup**

**Removed Directories:**
- `insertr-cli/` - 23 files removed (replaced by unified binary)
- `insertr-server/` - 24 files removed (replaced by unified binary)

**Updated References:**
- `TODO.md` - Updated file paths to reflect unified structure
- `scripts/dev.js` - Updated required/optional file checks

**Benefits:**
 **Single Source of Truth** - No more duplicate code or confusion
 **Smaller Repository** - Removed ~47 legacy files and binaries
 **Cleaner Development** - Only unified binary approach remains
 **Better Maintenance** - No legacy code paths to maintain

**All Functionality Preserved:**
- Database layer: `internal/db/`
- Content logic: `internal/content/`
- API handlers: `internal/api/`
- Commands: `cmd/enhance.go`, `cmd/serve.go`

The unified `insertr` binary now provides all functionality with enhanced architecture and no backwards compatibility baggage.
This commit is contained in:
2025-09-10 18:38:56 +02:00
parent eb620eacb1
commit 8a709a5250
51 changed files with 12 additions and 8743 deletions

27
TODO.md
View File

@@ -7,7 +7,7 @@
## ✅ What's Already Built & Working
### **Complete Foundation**
-**Go CLI Client** - Full REST API client with all CRUD operations (`insertr-cli/pkg/content/client.go`)
-**Go Content Client** - Full REST API client with all CRUD operations (`internal/content/client.go`)
-**JavaScript API Client** - Browser client with same API endpoints (`lib/src/core/api-client.js`)
-**Content Types** - Well-defined data structures (`ContentItem`, `ContentResponse`)
-**Mock Backend** - Working development server with realistic test data
@@ -111,23 +111,16 @@ Static Site Build ← CLI Enhancement ← Database Content
## 🗂️ **Next Steps: Server Implementation**
### **Files to Create**
### **✅ Implemented - Unified Binary Architecture**
```
insertr-server/ # New HTTP server application
├── cmd/
│ └── server/
│ └── main.go # Server entry point
├── internal/
├── api/
├── handlers.go # HTTP handlers for content endpoints
└── middleware.go # Auth, CORS, logging middleware
│ ├── db/
│ │ ├── sqlite.go # SQLite implementation
│ │ └── migrations/ # Database schema versions
│ └── models/
│ └── content.go # Content model (matches existing ContentItem)
├── go.mod
└── go.sum
✅ COMPLETED: All server functionality integrated into unified binary
cmd/
├── serve.go # Runtime API server command
└── enhance.go # Build-time enhancement command
internal/
├── api/ # HTTP handlers and middleware
├── db/ # Multi-database layer with sqlc
└── content/ # Content management logic
```
### **Files to Modify**