> For the complete documentation index, see [llms.txt](https://docs.giize.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.giize.com/ticket-dashboard-en/getting-started/build-and-distribution.md).

# Build And Distribution

## Current state

`npm run build` produces the static frontend only. It does not package the local API runtime, Playwright, Chromium, writable config/data, or session management.

The C1 extraction is complete at the module level: the former large Vite middleware now lives under `server/`, while Vite remains the host adapter. The next deployment milestone is not another domain extraction; it is a standalone server and runtime-path layer.

## Clean build verification

```bash
npm run setup
npm run verify
```

CI performs the equivalent deterministic installation from both lockfiles on Node 22.

## Remaining standalone-server work

1. add a runtime path abstraction for writable config/data/log/session files
2. add a standalone Node entrypoint that mounts the same route registry and background jobs
3. serve `frontend/dist` from that process
4. add config migration and structured backup before schema changes
5. smoke-test session, Settings, logs, SDP, OpenVPN, Ticket Tools, and IT Portal parity

The Vite adapter and standalone server must share the same route/domain modules; do not create a second backend implementation.

## Distribution options

### Internal backend service

Best for an always-on controlled environment. It requires multi-user/session isolation before team-wide deployment because the current runtime is designed around one local operator session.

### Desktop wrapper

Best for single-user distribution. Electron remains a practical fit because the application requires Node, child processes, local HTTP, Playwright, and writable user data.

Before packaging:

* move writable paths outside the installed application bundle
* make Playwright and Chromium runtime dependencies/resources
* add installed-app smoke tests for each supported OS
* add signing/checksum/release CI only after the runtime is stable

See the detailed implementation plan in `document/build-app.md`.
