Repository navigation
Development
-
Go (version from
backend/go.mod, currently 1.26) - Node.js 26 and npm (the version CI and the image use)
- Docker with buildx (optional, for images)
-
heif-convertfrom libheif (optional, for HEIC uploads outside Docker) make
git clone https://github.com/jnanadarshan/homevault.git
cd homevault
make install # go mod tidy + npm install
make dev # backend on :59234, Next.js dev server on :5959Open http://localhost:5959. make dev runs scripts/dev.sh, which builds and
starts the backend with BACKEND_PORT=59234, matching the frontend proxy's
default BACKEND_URL, and stops both on Ctrl+C. Local data goes to
backend/data/ (git-ignored).
Running the parts separately:
# Terminal 1: API
cd backend
BACKEND_PORT=59234 LOG_FORMAT=console LOG_LEVEL=debug go run ./cmd/server
# Terminal 2: UI
cd frontend
npm run devIf you run the backend on another port (it defaults to 8080 when
BACKEND_PORTis unset), start the frontend withBACKEND_URL=http://localhost:<port> npm run dev.
| Target | What it does |
|---|---|
make dev |
Backend and frontend with hot reload (frontend). |
make build |
Builds the backend binary, the Next.js production bundle and the WASM sync engine. |
make wasm |
Rebuilds frontend/public/homevault-sync.wasm from frontend/wasm/. |
make start |
Serves the already-built app. |
make stop |
Stops local dev processes. |
make version |
Prints the current version. |
make help |
Lists everything, including release targets. |
cd backend && go test ./... && go vet ./...
cd frontend && npm run lint && npm run builddocker build -t homevault:dev --build-arg VERSION=$(cat VERSION) .
docker run --rm -p 5959:5959 -v "$PWD/data:/homevault" homevault:devMulti-arch: docker buildx build --platform linux/amd64,linux/arm64 -t <you>/homevault:dev .
The schema lives in backend/internal/db/migrations/*.sql. The files are
embedded in the binary and applied in filename order on start-up; applied files
are tracked in the schema_migrations table. To change the schema, add a new
file (for example 002_add_x.sql). Never edit one that has already shipped.
- Add or extend a handler in
backend/internal/api/handlers/. - Register the route in
backend/internal/api/router.go. - Add a typed function in
frontend/lib/api.ts. - Document it in API reference and OpenAPI spec, and in the in-app Help → API tab.
The site you are reading is built with Zensical from
the docs/ folder and mkdocs.yml. It needs Python 3.11 or newer, and Node.js
for the API explorer.
make docs # live preview on http://127.0.0.1:8000
make docs-build # build into site/, failing on broken linksPushing a documentation change to main publishes it to GitHub Pages through
.github/workflows/docs.yml.
Get started
User guide
- Core concepts
- Items and photos
- Barcodes, QR codes and labels
- Finding things
- Audits and missing things
- Segments, categories and tags
- Stock, expiry and floor plans
- Import, export and Master Data
- Phone app and offline use
Operations
API
Project