- Go module at github.com/felt-app/felt with go-libsql pinned to commit hash - Full directory structure per research recommendations (cmd/leaf, internal/*, frontend/) - Makefile with build, run, run-dev, test, frontend, all, clean targets - LibSQL database with WAL mode, foreign keys, and embedded migration runner - SvelteKit SPA stub served via go:embed - Package stubs for all internal packages (server, nats, store, auth, clock, etc.) - go build and go vet pass cleanly Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
31 lines
687 B
Makefile
31 lines
687 B
Makefile
.PHONY: build run test frontend all clean
|
|
|
|
# Default data directory
|
|
DATA_DIR ?= ./data
|
|
ADDR ?= :8080
|
|
BINARY := cmd/leaf/leaf
|
|
|
|
build:
|
|
CGO_ENABLED=1 go build -o $(BINARY) ./cmd/leaf/
|
|
|
|
run: build
|
|
./$(BINARY) --data-dir $(DATA_DIR) --addr $(ADDR)
|
|
|
|
run-dev: build
|
|
./$(BINARY) --data-dir $(DATA_DIR) --addr $(ADDR) --dev
|
|
|
|
test:
|
|
CGO_ENABLED=1 go test ./...
|
|
|
|
frontend:
|
|
@mkdir -p frontend/build
|
|
@if [ ! -f frontend/build/index.html ]; then \
|
|
echo '<!DOCTYPE html><html><head><title>Felt</title></head><body><h1>Felt</h1><p>Loading...</p></body></html>' > frontend/build/index.html; \
|
|
fi
|
|
@echo "Frontend build complete (stub)"
|
|
|
|
all: frontend build
|
|
|
|
clean:
|
|
rm -f $(BINARY)
|
|
rm -rf data/
|