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 installRun 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 checkAuth 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(default[email protected])BRIANHUB_REQUIRE_AUTH(defaultfalse)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 - Security:
docs/security.md - Hardening/testing:
docs/pre-deploy-hardening.md - Domain/email rollout planning:
docs/domain-email-rollout-plan.md
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