BrianHub is a local-first planning application with two active modules:
Tasksfor task management, workflows, projects, shopping, and noticesSchedulingfor calendar-first planning (events, time blocks, and day-off entries)
- Task views:
List,Kanban,Calendar, andSmart - Task hierarchy: sections, subtasks, dependencies, tags, due dates, reminders, recurrence
- Calendar view supports
Month,Week, andDayranges - Week and month date-click navigation to day view
- Notices are shown in task calendar (holidays intentionally not shown in task calendar)
- Sidebar includes: task lists, projects, workflows, shopping lists, notices
- Shopping quick-add inbox in sidebar for rapid capture
- Calendar views:
Month,Week, andDay - Multiple user calendars with show/hide and per-calendar colors
- Event kinds: event, time block, day off
- Drag-and-drop rescheduling in time grid
- Calendar layers (events, time blocks, day off, tasks, holidays)
- Mobile-tailored scheduling experience with dedicated controls
- Local-first sync with
/sync/pushand/sync/pull - Authentication and session support (optional auth requirement)
- Owner/admin console with invite tokens and user controls
- Audit log page
- Automation console page
- Import/export page
- Backup scripts with retention and restore-check tooling
For detailed module behavior, see docs/product-features.md.
- Frontend: vanilla HTML/CSS/JS (
apps/web) - API: Fastify v4 (
services/api/src/server.js) - Data: SQLite (
data/brianhub.sqlite) viasql.js - Runtime: Node.js ESM (
"type": "module") - Tests: native Node test runner (
node --test)
Install dependencies:
npm install
# optional: copy the example env and adjust it for local dev
cp .env.example .envRun API + web in dev:
npm run devDefault endpoints:
- Web UI:
http://localhost:5173/apps/web/ - API:
http://localhost:3000
npm run dev # API + web
npm run dev:api # API only
npm run migrate # run DB migrations
npm run seed:test-data # seed test/demo data
npm run test # run test suite
npm run security:semgrep # run static security scan
npm run backup:db # create snapshot backup
npm run backup:retention # retention cleanup only
npm run backup:restore-check # restore integrity check
npm run deploy:host # host-side release deploy
npm run provision:vps # root-side VPS bootstrap helper
npm run rollback:host # host-side rollback
npm run backups:pull # local helper to mirror VPS backups
npm run roger:setup-admin # install restricted Roger admin access on the VPSAuth bootstrap helper:
npm run auth:bootstrap-ownerKey environment variables:
HOST(default0.0.0.0)PORT(default3000)LOG_LEVEL(defaultdebugin dev)BRIANHUB_DB(defaultdata/brianhub.sqlite)BRIANHUB_MIGRATIONS(defaultservices/api/db/migrations)BRIANHUB_CORS_ORIGINS(default*in local dev)BRIANHUB_APP_ORIGIN(optional, recommended for production)
BRIANHUB_OWNER_EMAIL(defaultbrian@pipecaminc.com)BRIANHUB_REQUIRE_AUTH(defaultfalse)BRIANHUB_ALLOW_HEADER_ACTOR_AUTH(defaulttrue, setfalsein production)BRIANHUB_SESSION_COOKIE_NAME(defaultbrianhub_session)BRIANHUB_SESSION_TTL_DAYS(default30)BRIANHUB_EXPOSE_INVITE_TOKEN(default enabled outside production)
BRIANHUB_BACKUP_DIR(defaultdata/backups)BRIANHUB_BACKUP_PREFIX(defaultbrianhub)BRIANHUB_BACKUP_ENCRYPTION_KEY(optional)BRIANHUB_BACKUP_UPLOAD_DIR(optional)BRIANHUB_BACKUP_S3_URI(optional)BRIANHUB_BACKUP_DAILY_KEEP_DAYS(default7)BRIANHUB_BACKUP_WEEKLY_KEEP_WEEKS(default52)
Retention defaults:
- Keep last 7 daily snapshots
- Keep 52 weekly snapshots
- Keep quarterly snapshots for older backups
Scheduling templates:
- systemd:
scripts/systemd/brianhub-backup.service,scripts/systemd/brianhub-backup.timer - cron:
scripts/cron/brianhub-backup.cron
- Documentation index:
docs/README.md - Product features:
docs/product-features.md - Deployment:
docs/deployment.md - Security:
docs/security.md - Hardening/testing:
docs/pre-deploy-hardening.md - Domain/email rollout planning:
docs/domain-email-rollout-plan.md
Production is designed for:
- a dedicated VPS
systemd + Caddy + Node 22- immutable releases under
/opt/brianhub/releases - a manual
origin/maindeploy flow with rollback
See docs/deployment.md for the complete host layout, service templates, Caddy config, upgrade workflow, and off-host backup pull process.
Feature changes must include documentation updates in the same workstream:
- Update
README.mdif setup, scripts, or top-level behavior changed - Update feature docs (
docs/product-features.mdor relevant doc) when UX/behavior changes