- TypeScript 88.6%
- CSS 8.9%
- JavaScript 2.1%
- Dockerfile 0.4%
|
All checks were successful
Build and publish container image / Build Docker image and publish package tags (pull_request) Successful in 1m12s
CI / Validate lint, types, tests, and production build (pull_request) Successful in 2m57s
Build and publish container image / Build Docker image and publish package tags (push) Successful in 43s
CI / Validate lint, types, tests, and production build (push) Successful in 2m0s
|
||
|---|---|---|
| .forgejo/workflows | ||
| public | ||
| scripts | ||
| src | ||
| tests | ||
| .dockerignore | ||
| .gitignore | ||
| docker-compose.yml | ||
| Dockerfile | ||
| eslint.config.mjs | ||
| next-env.d.ts | ||
| next.config.ts | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| vitest.config.ts | ||
hermes-brain-web
hermes-brain-web is a read-only web UI for two mounted knowledge backends:
- a SQLite fact store
- a markdown brain wiki
It does not bundle Hermes internals, and it does not copy brain data into the repository or image. The container only reads mounted data and renders a browser-oriented UI on top.
What it does
- Browse all facts in the SQLite fact store.
- Browse all pages in the markdown brain wiki.
- Inspect metadata, tags, and relationship context for the selected record.
- Follow an interactive knowledge graph from the detail pane into connected records.
- Pivot from fact-store entities into the facts that reference them.
- Run entirely against read-only mounts.
Stack
- Next.js 16
- React 19
- TypeScript
- better-sqlite3 for local read-only SQLite access
- gray-matter for wiki frontmatter parsing
- Vitest + Testing Library for behavior-focused tests
Runtime contract
The app expects these environment variables inside the container:
HERMES_BRAIN_SQLITE_PATH=/data/memory/memory_store.dbHERMES_BRAIN_WIKI_ROOT=/data/wikiPORT=3000
The SQLite file and wiki directory can both be mounted read-only.
Run with Docker Compose
- Edit
docker-compose.ymland replace the placeholder host paths. - Start the app:
docker compose up --build
- Open
http://localhost:3000.
Example volume bindings:
volumes:
- /absolute/path/to/memory_store.db:/data/memory/memory_store.db:ro
- /absolute/path/to/wiki/brain:/data/wiki:ro
Container publishing
Forgejo Actions builds the Docker image in CI for pull requests and publishes it to the Forgejo container registry for deployable refs.
Publishing rules:
- pushes to
mainpublishcode.mehalter.com/clawlter/hermes-brain-web:dev - published releases tagged like
v1.2.3publish:code.mehalter.com/clawlter/hermes-brain-web:v1.2.3code.mehalter.com/clawlter/hermes-brain-web:v1code.mehalter.com/clawlter/hermes-brain-web:latest
- pull requests build the image without pushing it
The publish workflow expects a Forgejo Actions secret named PACKAGE_TOKEN with permission to push packages for the owning user.
Local development
Install dependencies:
npm ci
Run the app:
HERMES_BRAIN_SQLITE_PATH=/absolute/path/to/memory_store.db \
HERMES_BRAIN_WIKI_ROOT=/absolute/path/to/wiki/brain \
npm run dev
Quality checks
npm run lint
npm run typecheck
npm test
npm run build
Testing philosophy
The tests focus on behavior rather than brittle snapshots:
- config parsing verifies the container contract
- SQLite loader tests verify fact/entity/bank normalization
- wiki loader tests verify frontmatter parsing and bidirectional wiki-link extraction
- graph builder tests verify neighborhood construction for facts, entities, and wiki pages
- UI tests verify backend switching and graph-driven browsing behavior
Repository safety
- This repository contains no brain data.
- The app is read-only by design.
- Authentication is intentionally out of scope so you can put it behind your own reverse proxy or auth gateway.
Notes on the wiki parser
The wiki browser reads markdown files recursively, parses YAML frontmatter, extracts [[wiki-links]], and computes incoming/outgoing relationships in memory. It excludes the top-level index.md from the page corpus so the curated wiki landing page does not dominate graph results.