| name | build-deploy |
| description | Build and deploy the audiobook-organizer using Makefile targets. Handles full builds (frontend + backend), API-only builds, test runs, and deployment. Always uses `make` targets instead of manual commands; auto-installs frontend dependencies before builds. Use when asked to build, run, test, deploy, or for frontend dev server. |
Build & Deploy
Wraps the Makefile build system, ensuring consistent builds and preventing common mistakes (forgetting frontend location, missing npm install, using wrong targets).
Quick Start
Common commands:
make build
make build-api
make run
make run-api
make test-short
make test-all
make web-dev
make deploy
make deploy-debug
Key Points
Frontend location: repo_root/web/ (Vite project)
Dependencies: make build and make web-build automatically run npm install in web/ before building. This ensures:
- No "missing dependency" surprises
- Minor version updates don't break the build
- Fast path:
npm install exits instantly if package.json hasn't changed
Embedded UI: Default make build embeds the React frontend into the Go binary (tag embed_frontend). This creates a single self-contained binary served on :8484. For frontend development, use make web-dev (separate Vite server on :5173).
Build Variants
| Target | Frontend | Backend | Speed | Use Case |
|---|
make build | ✓ Build | ✓ Embed | Slower | Deployment, distribution |
make build-api | ✗ Skip | ✓ Build | Faster | Local API iteration |
make run | ✓ Build | ✓ Run | — | One-step dev |
make run-api | ✗ Skip | ✓ Run | — | Backend-only dev |
make web-dev | ✓ Live | ✗ Skip | — | Frontend dev (Vite HMR) |
Testing
make test
make test-short
make test-all
make test-all-short
make test-frontend
make test-e2e
Deployment
make deploy
make deploy-debug
Deploy targets are defined in Makefile.local (not in the main Makefile). They handle:
- Go build with versioning
- Frontend build
- Upload to production server
- Service restart
See references/makefile-targets.md for full target list and options.
Frontend Development
For React/TypeScript work, use the Vite dev server:
make web-dev
Then:
To test the embedded UI (after make build):
./audiobook-organizer
When to Use This Skill
"Build the backend" → make build-api
"Run the app" → make run (or make web-dev if frontend-focused)
"Run tests" → make test-short (or make test-all for full)
"Deploy" → make deploy
"I need the frontend" → make web-dev (live editing)