- A static web server for the generated `dist/` directory
- A Tryton backend that exposes the `kitchen` user application and kitchen endpoints
### Build for production
1. Install dependencies:
```bash
npm install
```
2. Create the production build:
```bash
npm run build
```
3. Deploy the generated `dist/` directory to your web server.
### Serve the built app
Lonc is a static frontend. In production you do not run a Node.js application server for it. You build the app once and serve the files from `dist/` with a normal static web server such as:
- Nginx
- Apache
- Caddy
- a CDN/static hosting platform
The frontend uses hash-based routing, so no special SPA history fallback is required for route handling.
### Example deployment flow
```bash
npm install
npm run build
rsync -av dist/ /var/www/lonc/
```
Then configure your web server to serve `/var/www/lonc` as a static site.
### Runtime configuration
The application does not require build-time environment variables for the Tryton connection. Users configure the following in the login screen:
If Lonc is served by the same nginx origin as the API, leave the server URL empty in the app settings so requests stay same-origin and avoid unnecessary browser CORS checks.
Project-specific operating conventions for future contributors and coding agents are documented in [AGENTS.md](/Users/blaz/PycharmProjects/lonc/AGENTS.md).
- Login/configuration screen for Tryton server URL and database
- Session restore and logout shell
- Active kitchen selection and switching
- Dashboard with quick actions
- Label creation flow with item lookup, location loading, preview, and stock entry creation
- Stock list with search and filters
- Stock detail page with stock adjustment workflow
- PWA manifest, icons, service worker, and offline fallback
## Tryton integration assumptions
The frontend is intentionally organized around adapter-style API modules so the exact backend contract can be finalized without rewriting screens.
Default endpoint placeholders live in [`src/app/config.js`](/Users/blaz/PycharmProjects/lonc/src/app/config.js), and the canonical URL builder lives in [`src/api/client.js`](/Users/blaz/PycharmProjects/lonc/src/api/client.js).