| name | makefile-dev-workflow |
| description | Unified development workflow for EdgeQuake using Makefile commands. Use when starting services, running tests, or managing the full development stack (database, backend, frontend). Provides simplified alternatives to raw cargo/npm commands. |
| license | Proprietary (repository internal) |
| compatibility | Requires make, cargo, Node.js/pnpm, and Docker Desktop with docker-compose support. |
| metadata | {"repo":"raphaelmansuy/edgequake","area":"dev-infrastructure","file":"Makefile (333 lines, comprehensive)"} |
Makefile Development Workflow
When to use
Use this skill when you need to:
- Start development services (database, backend API, frontend)
- Stop services cleanly
- Run end-to-end tests with Playwright
- Check service health status
- Build and deploy applications
- Clean build artifacts
- Manage the full development stack with a single command
Core concepts
The repository includes a unified Makefile (at repo root) that wraps complex shell commands into simple targets. This replaces scattered docker-compose commands and cargo/npm invocations with a consistent interface.
Key directories
edgequake/: Rust backend API (port 8080)
edgequake_webui/: Next.js frontend (port 3000)
edgequake/docker/: Docker configuration with docker-compose.yml (contains PostgreSQL + pgvector + Apache AGE)
Quick start commands
Start full development stack (all services)
make dev
Starts PostgreSQL, Rust backend, and Next.js frontend in parallel. Displays URLs for all services.
Stop all services
make stop
Kills all running processes and stops Docker containers gracefully.
Check service status
make status
Shows health of backend, frontend, and database with actual health checks and endpoints.
Service-specific commands
Database management
make db-start
make db-stop
make db-logs
make db-shell
make db-reset
Backend (Rust) management
make backend-dev
make backend-build
make backend-test
make backend-run
make backend-clippy
make backend-fmt
Frontend (Next.js) management
make frontend-dev
make frontend-build
make frontend-start
make frontend-lint
make frontend-test
E2E Testing with Playwright
Run all E2E tests
cd edgequake_webui && pnpm exec playwright test
Runs all test specs in e2e/ directory with HTML reporter.
Run specific E2E test
cd edgequake_webui && pnpm exec playwright test markdown-test.spec.ts
Core query page tests
cd edgequake_webui && pnpm exec playwright test \
markdown-test.spec.ts \
streaming-test.spec.ts \
live-query-test.spec.ts \
final-validation.spec.ts
These tests verify:
- markdown-test: Markdown rendering in responses (no raw
** showing)
- streaming-test: Streaming text handling without concatenation issues
- live-query-test: End-to-end query execution with real LLM response
- final-validation: Complete query interface functionality
View test report
cd edgequake_webui && pnpm exec playwright show-report
Opens HTML report of last test run showing pass/fail, screenshots, traces.
Docker stack commands
Build all Docker images
make docker-build
Start full Docker stack (API + PostgreSQL)
make docker-up
Starts containerized EdgeQuake API and PostgreSQL with automatic health checks.
Stop Docker stack
make docker-down
View Docker logs
make docker-logs
Check Docker container status
make docker-ps
Code quality commands
Lint all code
make lint
Runs cargo clippy (Rust) and ESLint (frontend) with strict warnings-as-errors.
Format all code
make format
Applies rustfmt to Rust code and prettier to frontend code.
Run all tests
make test
Runs both backend tests (with mock LLM) and frontend tests in parallel.
Build all projects
make build
Produces release binaries for both backend and frontend.
Dependency checks
Verify dependencies
make check-deps
Verifies that required tools are installed:
cargo (Rust toolchain)
bun or npm (Node.js)
docker (optional, required for db-start/Docker commands)
If dependencies are missing, installation instructions are provided.
Installation
Install all dependencies
make install
Installs Rust crates and frontend npm packages.
Cleanup
Clean build artifacts
make clean
Removes target/ directory and .next/ build caches.
Clean everything (including dependencies)
make clean-all
Also removes node_modules/ - forces full reinstall on next run.
Utilities
Open Swagger UI
make swagger
Opens browser to http://localhost:8080/swagger-ui (API documentation).
View recent logs
make logs
Shows recent backend logs and Docker container status.
Common workflows
Development workflow
make install
make dev
make lint
make format
make test
cd edgequake_webui && pnpm exec playwright test
make stop
Testing workflow
make db-start
make backend-test
make frontend-test
cd edgequake_webui && pnpm exec playwright test markdown-test.spec.ts
make status
Production build workflow
make build
make docker-up
make status
make docker-down
Service URLs
Environment variables
Configure these in .env file (copy from .env.example):
OPENAI_API_KEY=sk-...
DATABASE_URL=postgres://edgequake:edgequake_secret@localhost:5432/edgequake
EDGEQUAKE_PORT=8080
EDGEQUAKE_HOST=0.0.0.0
RUST_LOG=info,edgequake=debug
Without OPENAI_API_KEY, the system uses a mock LLM provider (free, fast, no API key).
Troubleshooting
Port already in use
If port 3000 or 8080 is in use:
lsof -ti :3000 | xargs kill -9
lsof -ti :8080 | xargs kill -9
Database connection issues
make db-reset
make status
Frontend build issues
make clean-all
make install
make frontend-dev
Tests timing out
cd edgequake_webui && pnpm exec playwright test --timeout=60000
Implementation notes
- No docker-compose.yml at root: Use
edgequake/docker/docker-compose.yml instead
- Package manager: Frontend uses pnpm (fast, space-efficient) but falls back to npm
- Rust hot reload: Uses
cargo run for development (recompiles on save)
- Next.js dev: Uses Turbopack for faster iterations than Webpack
- Port isolation: Services communicate via localhost ports; no environment routing needed
Help
make help
Shows formatted help with all available targets and descriptions.
Related Skills