A desktop field service management application built with Tauri v2, SvelteKit, and TypeScript.
| Layer | Technology |
|---|---|
| Desktop shell | Tauri v2 (Rust) |
| Frontend | SvelteKit 2 + Svelte 5 |
| Styling | Tailwind CSS v4 |
| Icons | Phosphor Svelte |
| Database | SQLite via sqlx with versioned migrations |
| Language | TypeScript |
# Install dependencies
npm install
# Run in development mode (opens the desktop app)
npm run tauri dev
# Type-check the frontend
npm run check
# Lint the frontend
npm run lint
# Run tests
npm test # Vitest (frontend)
cargo test # Rust integration tests (from src-tauri/)
# Build the desktop app (produces a native installer in src-tauri/target/release/bundle/)
npm run tauri build
fieldstack/
├── src/ # SvelteKit frontend
│ ├── routes/
│ │ ├── +page.svelte # Root navigation shell
│ │ ├── dashboard/
│ │ ├── jobs/
│ │ ├── org/
│ │ ├── reports/
│ │ └── settings/
│ ├── lib/
│ │ ├── components/
│ │ │ ├── organisms/ # Sidebar, JobWizard, JobTable, JobDetails
│ │ │ └── primitives/ # Button, Badge, StatCard, Skeleton, EmptyState, Pagination
│ │ ├── stores/ # Svelte stores (jobs, ui, dashboard)
│ │ ├── types/ # TypeScript interfaces
│ │ └── utils/ # Typed Tauri invoke helpers (with retry logic)
│ └── tests/ # Vitest smoke tests
├── src-tauri/ # Tauri / Rust backend
│ ├── migrations/ # Versioned SQLite migrations (sqlx)
│ ├── src/
│ │ ├── commands/ # Tauri command handlers (jobs, org, proofs, drafts, reports)
│ │ ├── db/ # Database init and logging
│ │ ├── overdue.rs # Background overdue poller (smart sleep + Notify wake-up)
│ │ ├── tests.rs # Rust integration smoke tests
│ │ ├── lib.rs
│ │ └── main.rs
│ ├── Cargo.toml
│ └── tauri.conf.json
├── eslint.config.js # ESLint 9 flat config
└── package.json
SQLite database is created automatically on first launch at the app data directory. Schema is managed via versioned migrations in src-tauri/migrations/. Tables: companies, people, person_companies, jobs, proofs, audit_log, job_drafts, job_counter, app_config.
Seed data is inserted on first run: 2 companies and 3 people.
style-src 'self' — no unsafe-inlinejavascript:, data:, file:, ftp:, ws:, wss:, vbscript:)svelte/no-at-html-tags ESLint rule prevents {@html} usage on user-supplied dataMIT — see LICENSE for details.