Skip to content
supastack
Browse documentation

For AI agents: fetch the complete documentation index at /llms.txt, the full documentation corpus at /llms-full.txt, the agent skill at /skill.md, or this page as Markdown at /docs/desktop/project-structure.md (or send Accept: text/markdown).

Project structure

Find the Rust shell, the boot page, the release scripts and the boundary to the web app.

Setup and configuration

Before any step, read Before you start and Terminal basics. Open the supastack folder at its root — the folder containing package.json. A Desktop checkout contains apps/desktop and its release scripts; the All Platforms monorepo adds the Web backend and the mobile app alongside. An environment variable is a named setting stored in a local .env file or your hosting dashboard; the shell reads SUPASTACK_APP_URL as a terminal setting, not from a file.

1. Open apps/desktop/src-tauri/src/lib.rs — every native behavior lives in this one file.

2. Browse apps/desktop/src-tauri/ — configuration, capabilities and icons.

3. From the repository root run corepack pnpm --filter @supastack/desktop dev with a reachable backend.

The checkout contains the Tauri shell only: Rust source, its config, the boot page and the release scripts. Product screens live in the web app the window loads — a Desktop-only checkout has no app screens of its own. Read AGENTS.md and .ai/PROJECT_CONTEXT.md before changing behavior; the .ai/ mirror docs record decisions that are not visible from a file alone.

apps/desktop/src-tauri/src/    Rust — window, tray, menus, deep links, updater
apps/desktop/src-tauri/        tauri.conf.json, capabilities/, Cargo.toml, icons
apps/desktop/ui/               Boot page (index.html + boot.js) shown while loading
apps/desktop/scripts/          Release preflight + update manifest
docs/                          Runbooks incl. desktop updates
.agents/skills/                Task guides for coding agents

Where a change belongs

Before editing, decide which side owns the change: anything a user sees as product UI belongs to the web app; only OS-level behavior belongs in Rust.

  • Window, tray, menu, shortcut or single-instance behavior → apps/desktop/src-tauri/src/lib.rs.
  • A new webview permission → apps/desktop/src-tauri/capabilities/default.json — widen only when a native feature needs it.
  • Bundle identifier, version, updater endpoint or plugin options → apps/desktop/src-tauri/tauri.conf.json.
  • Placeholder product icons → replace placeholder-icon.png and run the icons script.
  • Boot, loading or offline-overlay behavior → apps/desktop/ui/.
  • Any product screen, setting or data → the web app repository — the shell never forks product UI.

Implementation workflow

For a native change, edit lib.rs, run cargo check and the Rust tests, then exercise the window on each target OS — tray, shortcut and deep-link behavior differs per platform. The add-a-desktop-capability skill in .agents/skills/ walks this same order.

Verification and troubleshooting

cargo check catches compile errors and cargo test covers the pure logic. Real verification is the running window on Windows, macOS and Linux — tray, shortcut and deep links cannot be proven by tests alone.

corepack pnpm --filter @supastack/desktop test
corepack pnpm --filter @supastack/desktop typecheck