journal/Journal.App
Jacob Schmidt a05c4b0209 Set up monorepo: centralize .NET packages, npm workspaces, remove Journal.DevTool
- Add Directory.Build.props with shared TargetFramework/Nullable/ImplicitUsings
- Add Directory.Packages.props for centralized NuGet version management
- Strip duplicated properties and Version attributes from all .csproj files
- Fix Directory.Build.props TFM from net10 to net10.0
- Configure npm workspaces in root package.json (Journal.App)
- Hoist node_modules to repo root with single lockfile
- Add node_modules/ to .gitignore
- Remove Journal.DevTool contents, keep as empty folder with .gitkeep
- Remove Journal.DevTool from solution and npm workspaces

Co-Authored-By: Oz <oz-agent@warp.dev>
2026-03-02 19:33:11 -06:00
..
2026-03-01 17:40:37 -06:00

Journal.App

SvelteKit 5 + Tauri 2 desktop application for Project Journal.

Tech Stack

  • Frontend: SvelteKit 5, TypeScript, Vite 6
  • Tauri shell: Rust (Tauri 2), tokio async runtime
  • Backend bridge: Journal.Sidecar.exe managed as a persistent long-lived child process

Dev Setup

npm install
npm run dev        # SvelteKit dev server at http://localhost:1420
npm run tauri dev  # Tauri desktop window (connects to dev server)

Build Targets

Command Output Use case
npm run build Journal.App/build/ Web bundle for Journal.WebGateway
.\scripts\publish-app.ps1 -Target web Journal.App/build/ Same, via script
.\scripts\publish-app.ps1 -Target tauri -TauriBundles none src-tauri/target/release/journalapp.exe Raw desktop exe
.\scripts\publish-app.ps1 -Target tauri -TauriBundles nsis NSIS installer Packaged installer

Frontend State Management

Svelte stores are the source of truth for all feature state.

Current Stores

Store file State exports Notes
src/lib/stores/entries.ts entriesStore Entry list, getDefaultEntry, createEntryDraft
src/lib/stores/fragments.ts fragmentsStore Fragment CRUD + parse/serialize helpers
src/lib/stores/todos.ts todoListsStore, todosStore Todo list and item CRUD
src/lib/stores/lists.ts listsStore Generic list CRUD, createListDraft
src/lib/stores/settings.ts settingsTags, settingsFragmentTypes Tag/type config

Store-First Rule

  • Components call store helper functions for CRUD operations — not inline mutations.
  • Components should focus on rendering, local form state, and invoking store operations.
  • Backend calls (sendCommand) belong inside store/service helpers, not components.

Tauri Commands (Rust → Frontend)

Command Description
sidecar_command Forward a CommandEnvelope to Journal.Sidecar stdin/stdout and return parsed JSON
get_sidecar_root Get currently resolved sidecar root path
set_sidecar_root Override root path (saved to settings.json, restarts sidecar)
get_ui_settings Load tag/fragment-type settings
set_ui_settings Persist tag/fragment-type settings
shutdown Stop sidecar, exit app

Sidecar Path Resolution

The Rust shell looks for Journal.Sidecar.exe starting from the auto-detected repository root:

  1. <root>/Journal.Sidecar.exe
  2. <root>/publish/Journal.Sidecar.exe
  3. <root>/Journal.Sidecar/bin/Debug/net10.0/Journal.Sidecar.exe
  4. <root>/Journal.Sidecar/bin/Release/net10.0/win-x64/publish/Journal.Sidecar.exe
  5. Recursive scan of <root>/Journal.Sidecar/

Build the sidecar before running the Tauri app:

.\scripts\publish-sidecar.ps1 -Configuration Release -Runtime win-x64

VS Code + Svelte + Tauri + rust-analyzer