Scaffold project structure and Phase 1 starter #1

Merged
parkerhdavis merged 2 commits from scaffold-and-phase1-starter into main 2026-05-13 12:41:58 -06:00
parkerhdavis commented 2026-05-13 12:37:32 -06:00 (Migrated from github.com)

Summary

Bootstrap the Garnet repo with the Tauri 2 + Rust + React + Bun + Tailwind 4 + daisyUI 5 shape used by Packi, and land the Phase 1 starter on top: an SQLite-backed library DB with versioned migrations, register/list/remove/scan commands for library roots, and a daisyUI shell that exercises them end-to-end. Module loader is intentionally absent — modules/example-module/manifest.json sketches the proposed manifest shape, and src/modules.rs enumerates manifests without executing any module code, in keeping with the deliberate Phase 2 open question on the loading model.

What's here

Scaffold (matches Packi):

  • Root configs: package.json (workspaces apps/*), tsconfig.json, biome.json, bunfig.toml, .gitignore.
  • Makefile with portfolio targets (setup/dev/down/build/build-{linux,macos,windows}/lint/lint-fix/format/typecheck/test/icons/version/clean) and full OS-detection branches.
  • apps/desktop/backend/ Cargo + Tauri config + plugins (dialog/fs/opener). .cargo/config.toml points cargo output at the repo-root target/.
  • apps/desktop/frontend/ Bun-native build pipeline (build.ts + dev.ts, no Vite). Tailwind 4 + daisyUI 5 with Garnet-red dark/light theme palettes.
  • resources/icons/generate-icons.sh adapted from Packi; source PNGs + generated set committed.
  • LICENSE renamed to LICENSE.md (per Licensing Standards); bundle.licenseFile in tauri.conf.json points at it. Every authored source file carries the SPDX-License-Identifier: AGPL-3.0-or-later header.

Phase 1 starter:

  • SQLite at $XDG_DATA_HOME/garnet/library.sqlite via rusqlite (bundled), with foreign_keys=ON / journal_mode=WAL / busy_timeout=5000 PRAGMAs and a versioned migrations runner. Schema v1: library_roots, assets, migrations.
  • Tauri commands: register_library_root, list_library_roots, remove_library_root, scan_library_root (walkdir-based stub indexer that inserts one asset row per file with relative_path / size / mtime / extension-based format), plus load_settings / save_settings and a list_modules enumeration stub.
  • React shell: navbar with version badge, empty-state CTA, library-roots cards with Scan/Remove buttons, scan-result alert. Zustand libraryStore + typed lib/tauri.ts invoke wrapper.

What's not here (and why)

  • Real metadata extraction (EXIF, ID3, stream info), thumbnails, tagging, collections, search facets, project/workspace concept — all Phase 1 items beyond the starter, intentionally deferred until Packi has stabilized.
  • The module loader (dynamic Rust plugin / sidecar / JS-only). Phase 2. Decision is deliberately deferred until there's a real prototype to test against.
  • The 3D Texturing module (eventual Packi port). Phase 3.

Test plan

  • make dev boots into the app shell and library-roots flow works end-to-end (verified locally).
  • make typecheck clean.
  • make lint clean (Biome + clippy).
  • make test runs (no tests yet but harness should be green).
  • make build produces a Linux installer.
## Summary Bootstrap the Garnet repo with the Tauri 2 + Rust + React + Bun + Tailwind 4 + daisyUI 5 shape used by Packi, and land the Phase 1 starter on top: an SQLite-backed library DB with versioned migrations, register/list/remove/scan commands for library roots, and a daisyUI shell that exercises them end-to-end. Module loader is intentionally absent — `modules/example-module/manifest.json` sketches the proposed manifest shape, and `src/modules.rs` enumerates manifests without executing any module code, in keeping with the deliberate Phase 2 open question on the loading model. ## What's here **Scaffold (matches Packi):** - Root configs: `package.json` (workspaces `apps/*`), `tsconfig.json`, `biome.json`, `bunfig.toml`, `.gitignore`. - `Makefile` with portfolio targets (`setup`/`dev`/`down`/`build`/`build-{linux,macos,windows}`/`lint`/`lint-fix`/`format`/`typecheck`/`test`/`icons`/`version`/`clean`) and full OS-detection branches. - `apps/desktop/backend/` Cargo + Tauri config + plugins (dialog/fs/opener). `.cargo/config.toml` points cargo output at the repo-root `target/`. - `apps/desktop/frontend/` Bun-native build pipeline (`build.ts` + `dev.ts`, no Vite). Tailwind 4 + daisyUI 5 with Garnet-red `dark`/`light` theme palettes. - `resources/icons/generate-icons.sh` adapted from Packi; source PNGs + generated set committed. - LICENSE renamed to `LICENSE.md` (per Licensing Standards); `bundle.licenseFile` in `tauri.conf.json` points at it. Every authored source file carries the `SPDX-License-Identifier: AGPL-3.0-or-later` header. **Phase 1 starter:** - SQLite at `$XDG_DATA_HOME/garnet/library.sqlite` via `rusqlite` (bundled), with `foreign_keys=ON` / `journal_mode=WAL` / `busy_timeout=5000` PRAGMAs and a versioned migrations runner. Schema v1: `library_roots`, `assets`, `migrations`. - Tauri commands: `register_library_root`, `list_library_roots`, `remove_library_root`, `scan_library_root` (walkdir-based stub indexer that inserts one asset row per file with `relative_path` / `size` / `mtime` / extension-based `format`), plus `load_settings` / `save_settings` and a `list_modules` enumeration stub. - React shell: navbar with version badge, empty-state CTA, library-roots cards with Scan/Remove buttons, scan-result alert. Zustand `libraryStore` + typed `lib/tauri.ts` invoke wrapper. ## What's not here (and why) - Real metadata extraction (EXIF, ID3, stream info), thumbnails, tagging, collections, search facets, project/workspace concept — all Phase 1 items beyond the starter, intentionally deferred until Packi has stabilized. - The module loader (dynamic Rust plugin / sidecar / JS-only). Phase 2. Decision is deliberately deferred until there's a real prototype to test against. - The 3D Texturing module (eventual Packi port). Phase 3. ## Test plan - [x] `make dev` boots into the app shell and library-roots flow works end-to-end (verified locally). - [ ] `make typecheck` clean. - [ ] `make lint` clean (Biome + clippy). - [ ] `make test` runs (no tests yet but harness should be green). - [ ] `make build` produces a Linux installer.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
phd-software/garnet!1
No description provided.