# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Project overview Ech0 is a self-hosted personal microblog (timeline) platform. It is shipped as a single Go binary that serves both the REST API and the built SPA. Backend is Go 1.26+ (Gin + Wire DI + GORM + SQLite via CGO), frontend is Vue 3 + Vite + TypeScript + UnoCSS under `web/`. Two satellite web projects also live in-repo: `hub/` (Vue 3 public-directory site) and `site/` (React Router marketing/docs site) — they are independent of the Go binary. **For a full architecture walkthrough, read `docs/dev/architecture-overview.md` first** — it covers the layered backend, business domains, Agent/MCP capability layers, event subsystem, infra modules, and `pkg/` libraries end-to-end. ## Common commands All backend commands run from the repository root; frontend commands run from `web/` (or via the `make web-*` wrappers). ```bash # Backend make run # go run ./cmd/ech0 serve (blocks on :6277) make dev # Air hot-reload (auto-installs Air via `make air-install` if missing) make test # go test ./... make lint # golangci-lint run make fmt # golangci-lint fmt make wire # regenerate internal/di/wire_gen.go (run after changing provider sets / DI graph) make wire-check # fails if wire_gen.go is stale vs. wire.go make openapi # regenerate OpenAPI spec (Huma type-first) -> internal/openapi/openapi.yaml make openapi-check # fails if the committed OpenAPI spec is stale vs. code (mirrors wire-check) # Frontend (from web/) pnpm install pnpm dev # Vite dev server on :5173, proxies to backend on :6277 pnpm build # type-check + vite build pnpm test:unit # vitest run pnpm lint # eslint . --fix pnpm lint:style # stylelint --fix (CSS/SCSS/