Vaulthalla Logo

Architecture Map

Contributor-facing map of Vaulthalla subsystems and validation expectations.

Architecture Map

This is the contributor-facing map of the repo. It is not a full internal design document. Its job is to help you answer five questions quickly:

  1. what subsystem am I touching
  2. where does that code live
  3. how sharp is it
  4. what kind of contribution is appropriate
  5. what should I validate before opening a PR

Top-Level Repo Map

AreaWhat it contains
core/C++ daemon, CLI transport, FUSE service, runtime manager, auth, RBAC, crypto, sync, storage, previews, tests, usage/manpage generation
web/Next.js admin and filesystem client, websocket stores, auth/session proxy route
deploy/Runtime config, PostgreSQL schema SQL, systemd units, nginx template, lifecycle utility
debian/Debian package metadata and maintainer scripts
bin/Dev and operator install/uninstall/test helpers
tools/release/Versioning, changelog generation, packaging, publication, and contract tests
.github/CI workflows and composite actions

Subsystem Map

SubsystemWhat it doesMain pathsContribution fitLikely validation
Core runtime managerStarts and supervises runtime services such as sync, FUSE, protocol services, log rotation, DB janitor, and shell servercore/main/main.cpp, core/src/runtime/*, core/src/protocols/ProtocolService.cppMaintainer-guidedLinux build, targeted runtime checks, integration coverage when behavior changes
FUSE and filesystem behaviorMounts the filesystem, dispatches FUSE requests, and enforces filesystem semanticscore/src/fuse/*, core/include/fuse/*, core/src/fs/*, core/include/fs/*Maintainer-guidedLinux-only runtime validation, integration tests, manual mount/unmount behavior checks
CLI and local shell protocolImplements vh and vaulthalla, talks to /run/vaulthalla/cli.sock, and shares help/manpage generationcore/main/cli.cpp, core/src/protocols/shell/*, core/usage/*, deploy/systemd/vaulthalla-cli.socketOpen for help text, coordinate for behavior, maintainer-guided for lifecycle/protocol changesCore build, CLI usage review, integration tests for command behavior
Web/admin clientNext.js app for admin and filesystem flows, backed by websocket requests and an auth/session proxy routeweb/src/app/*, web/src/components/*, web/src/stores/*, web/src/app/api/auth/session/route.tsOpen for small polish, coordinate for flow changescd web && pnpm test, manual local UI checks when possible
Database and query layerOwns schema files, prepared statements, and DB access for auth, FS metadata, RBAC, sync, and vault statedeploy/psql/*, core/src/db/*, core/include/db/*Maintainer-guidedPostgreSQL-backed validation, integration tests, schema review
Storage providersManages storage engine abstractions and S3-compatible provider behaviorcore/src/storage/*, core/include/storage/*, core/src/vault/model/*, core/include/vault/*Coordinate before implementingLinux/runtime validation, storage-provider-specific checks, honest test notes if remote credentials were not available
Preview and thumbnail pipelineGenerates previews and thumbnails for supported content types and feeds the filesystem UIcore/src/preview/*, core/include/preview/*, web/src/components/fs/FilePreviewModal.tsx, web/src/components/fs/Thumb.tsxCoordinate before implementingTargeted file-format testing, UI preview checks, core build
Sync enginePlans and executes upload, download, delete, conflict, and key-rotation workcore/src/sync/*, core/include/sync/*Maintainer-guidedIntegration-style validation, repro steps, manual data-safety checks
RBAC and permission modelDefines admin and vault permissions, glob/path policy logic, role templates, and permission resolutioncore/src/rbac/*, core/include/rbac/*, deploy/psql/060_acl.sqlSecurity-sensitiveMaintainer approval first, focused tests, threat-aware review
Auth, session, and secret handlingManages token issuance, refresh/session validation, secret storage, and auth-related protocol behaviorcore/src/auth/*, core/include/auth/*, core/src/crypto/*, core/include/crypto/*, web/src/stores/useWebSocket.tsSecurity-sensitiveMaintainer approval first, focused tests, no hand-wavy validation
Packaging, systemd, and lifecycleDefines package payload, install/remove/purge scripts, systemd units, and privileged host setup flowsdebian/*, deploy/systemd/*, deploy/lifecycle/main.py, bin/setup/*, bin/teardown/*Coordinate before implementingPackage dry runs, lifecycle tests, clean-host install/upgrade/remove/purge checks
Release toolingManages version sync, changelog generation, packaging orchestration, publication, and contract teststools/release/*, .github/actions/package/action.yml, .github/workflows/release.ymlMaintainer-guidedpython3 -m tools.release check, release-tooling test suite, dry-run packaging
Tests and harnessesUnit, integration, lifecycle, and release contract coveragecore/tests/*, deploy/lifecycle/tests/*, tools/release/tests/*Open for scoped workRun the relevant test surface and avoid unrelated churn

Subsystem Notes

Core runtime

core/src/runtime/Manager.cpp is where service orchestration comes together. If your change affects startup order, restart behavior, shutdown behavior, or service wiring, treat it as maintainer-guided work.

FUSE and filesystem semantics

core/src/fuse/Service.cpp mounts the filesystem with allow_other and auto_unmount. That is not casual plumbing. Filesystem behavior changes can affect user data, trust boundaries, and operator expectations.

CLI and shell protocol

core/main/cli.cpp talks to the local control socket at /run/vaulthalla/cli.sock. Help text and usage improvements are easy contributions. Protocol or privileged lifecycle command changes are not.

Web/admin surface

The web client is a real contributor surface, but it is still wired into auth and websocket behavior. Small UX work is fair game. New flows, new command surfaces, and auth/session changes should start with discussion.

One practical caveat: the CI web build syncs private icon assets from ~/vaulthalla-web-icons in .github/actions/build_web/action.yml. If you are touching web UI and hit build failures related to missing private icons, coordinate with the maintainer rather than stubbing fake assets into the repo.

Database and schema

deploy/psql/000_schema.sql through deploy/psql/060_acl.sql define the installed schema surface. Schema work is sharp because it crosses packaging, bootstrap, runtime queries, retention, and upgrade safety.

Packaging and lifecycle

The Debian maintainer scripts in debian/postinst, debian/prerm, and debian/postrm are the lifecycle source of truth for install, upgrade, remove, and purge. The bin/ scripts are helpful local wrappers, but they are not the Debian contract.

Release tooling

tools/release/ is not just a convenience folder. It owns version alignment, changelog production, dry-run packaging, publication policy, and release artifact validation. Treat it like a product surface, not a scratchpad.

Read By Interest

If you are working on: