refactor: consolidate database structure and move injector to engine
Database Structure Cleanup: - Move all SQL files from ./db/ to ./internal/db/ - Update sqlc.yaml to use new paths (preserving schema+setup.sql hack) - Consolidate database-related code in single directory - Remove empty ./db/ directory Injector Migration: - Move injector.go from content package to engine package - Update ContentClient interface to return map instead of slice for GetBulkContent - Update database client implementation to match interface - Remove injector dependency from enhancer (stub implementation) Demo-Site Consolidation: - Move demo-site to test-sites/demo-site for better organization - Update build scripts to use new demo-site location - Maintain all functionality while improving project structure This continues the unified architecture consolidation by moving core content processing logic to the engine and organizing related files properly.
This commit is contained in:
8
justfile
8
justfile
@@ -54,7 +54,7 @@ dev: build-lib build
|
||||
echo ""
|
||||
|
||||
# Start demo site with prefixed output (this will block) - use local installation
|
||||
cd {{justfile_directory()}} && npx --prefer-offline live-server demo-site --port=3000 --host=localhost --open=/index.html 2>&1 | sed 's/^/🌐 [DEMO] /' &
|
||||
cd {{justfile_directory()}} && npx --prefer-offline live-server test-sites/demo-site --port=3000 --host=localhost --open=/index.html 2>&1 | sed 's/^/🌐 [DEMO] /' &
|
||||
DEMO_PID=$!
|
||||
|
||||
# Wait for both processes
|
||||
@@ -70,7 +70,7 @@ dev-about: build-lib build
|
||||
INSERTR_DATABASE_PATH=./dev.db ./insertr serve --dev-mode &
|
||||
SERVER_PID=$!
|
||||
sleep 3
|
||||
npx --prefer-offline live-server demo-site --port=3000 --host=localhost --open=/about.html
|
||||
npx --prefer-offline live-server test-sites/demo-site --port=3000 --host=localhost --open=/about.html
|
||||
kill $SERVER_PID 2>/dev/null || true
|
||||
|
||||
# Check project status and validate setup
|
||||
@@ -208,7 +208,7 @@ help:
|
||||
|
||||
|
||||
# Enhance demo site (build-time content injection)
|
||||
enhance input="demo-site" output="dist":
|
||||
enhance input="test-sites/demo-site" output="dist":
|
||||
./insertr enhance {{input}} --output {{output}} --mock
|
||||
|
||||
# === Content API Server Commands ===
|
||||
@@ -267,7 +267,7 @@ status:
|
||||
@echo "\n🔧 Unified binary:"
|
||||
@ls -la insertr main.go cmd/ internal/ 2>/dev/null || echo " Missing unified binary components"
|
||||
@echo "\n🌐 Demo site:"
|
||||
@ls -la demo-site/index.html demo-site/about.html 2>/dev/null || echo " Missing demo files"
|
||||
@ls -la test-sites/demo-site/index.html test-sites/demo-site/about.html 2>/dev/null || echo " Missing demo files"
|
||||
@echo ""
|
||||
@echo "🚀 Development Commands:"
|
||||
@echo " just dev - Full-stack development (recommended)"
|
||||
|
||||
Reference in New Issue
Block a user