Repository Architecture
Top-Level Structure
index.html: static app shell and UI markupresources/: app CSS, JS modules, fonts, and shared iconstemplates/: curated template data plus generation scriptsupdater/: update-related assets and helper scripts for self-hosted packagingdocs/: isolated documentation workspace (ownpackage.json+ lockfile).github/workflows/: CI, CodeQL, release packaging, and Pages deployment
Generated/local-only paths in this repo:
node_modules/: installed dependencies (root workspace)docs/node_modules/: installed dependencies (docs workspace).preview/: local preview/output artifacts of the documentation
JavaScript Module Areas
Under resources/js/:
core/: config, DOM refs, state normalization, utility helpersservices/: storage and data access abstractionsfeatures/: UI feature modules (templates, settings, icon handling, preview, row editor, emoji)main.js: orchestration and wiring
State and Persistence
- runtime state is normalized and persisted in browser local storage
- imports for templates/settings are validated before acceptance
- migration logic keeps compatibility with legacy storage keys
Templates Search Subsystem
- template payloads live in
templates/* - indexing is driven by
templates/template-search-index.json - generation/maintenance scripts live in
updater/scripts/
Security-Oriented Handling
- strict CSP is defined in
index.html - custom HTML input as well as SVG embedding is sanitized with vendored
DOMPurify(resources/js/vendor/purify.es.mjs) - remote icon sources are constrained by extension/validation rules
- imported data has size and schema validation guards
Docs System
- docs content source is
docs/source - VitePress config is
docs/.vitepress/config.mjs - static docs-only assets are served from
docs/public/(for exampledocs/public/icons/notebuddy-logo.svg) and are located insidedocs/source/public - docs base path is environment-driven via
DOCS_BASE- local docs profile:
/docs/ - GitHub Pages profile:
/pve-notebuddy/docs/
- local docs profile:
- docs toolchain is currently
vitepress@2.0.0-alpha.17
CI and Delivery Workflows
CIworkflow:- installs root dependencies and verifies vendored DOMPurify is in sync
- syntax-checks JS modules and validates JSON fixtures/templates
- installs docs dependencies and builds docs
CodeQL Advancedworkflow runs JavaScript code scanning on pushes/PRs/scheduleBuild Release Packageworkflow assembles a self-hosted zip artifact for releasesDeploy GitHub Pagesworkflow builds docs withDOCS_BASE=/pve-notebuddy/docs/, assembles_site, uploads artifact, and deploys with Pages actions