chore(web): remove Go templates, integrate React build into Docker, clean up #10
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 4 of #6 — Frontend Migration
Goal
Complete the migration by removing the old Go template frontend, integrating the React build into the production Docker image, and updating all serving infrastructure.
Tasks
Remove Go Templates
internal/api/templates/directory (items.html, projects.html, schemas.html, settings.html, login.html, base.html, audit.html)html/templateimports)HandleIndex,HandleProjects,HandleSchemas,HandleSettingsweb handlersroutes.goGo Server Static File Serving
web/dist/at/with SPA fallback (all non-API routes return index.html)go:embedthe built assets into the binary for single-binary deployment./web/dist/)/api/*routes take precedence over SPA fallbackDocker Integration
npm ci && npm run buildinweb/go buildwith embedded or copiedweb/dist/docker-compose.yaml— no changes needed if single binarydocker-compose.prod.yamlif it existsMakefile Updates
make web-install—cd web && npm cimake web-build—cd web && npm run buildmake web-dev—cd web && npm run devmake buildto include web build stepmake cleanto includeweb/dist/Documentation Updates
npm install/ web buildweb/directoryCleanup
go buildstill works without web assets (graceful fallback or build tag)Acceptance Criteria
make buildproduces working binary with embedded frontendDependencies
Requires #7, #8, #9 (all pages migrated before templates can be removed).