> 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/product-docs/getting-started/build-and-distribution.md).

# Build And Distribution

## Current State

`npm run build` only produces the static frontend.

It does not package the local automation runtime that powers:

* Playwright scripts
* session management
* local JSON outputs
* middleware-backed `/api/*` flows

## Recommended Deployment Direction

The safest path is:

1. extract middleware from `frontend/vite.config.js`
2. move it into a standalone Node backend
3. serve `frontend/dist` from that backend
4. only then consider wrapping it as a desktop app

## Why This Is Feasible

* many handlers already follow connect-style middleware patterns
* Playwright scripts are already independent Node processes
* frontend calls use relative paths, so same-origin serving can be preserved

## Packaging Strategy

### Option A: Backend Service

Best for:

* always-on internal deployment
* team usage
* controlled environment

### Option B: Desktop Wrapper

Best for:

* single-user distribution
* local operation with embedded runtime

Desktop packaging should be done after backend extraction, not before.
