From 4d128700c1793685360b464058644f645e728b55 Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Thu, 5 Mar 2026 16:40:05 +0100 Subject: [PATCH] Added UI readme --- lib/SvelteUi/app/README.md | 59 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 lib/SvelteUi/app/README.md diff --git a/lib/SvelteUi/app/README.md b/lib/SvelteUi/app/README.md new file mode 100644 index 00000000..f6964208 --- /dev/null +++ b/lib/SvelteUi/app/README.md @@ -0,0 +1,59 @@ +# SvelteUi App + +Web interface for AMS Reader firmware built with Svelte 5 and Vite 6. + +## Development Setup + +### Prerequisites +- Node.js 20.x or 22.x LTS (required for Vite 6) +- npm + +### Local Development Configuration + +To develop against your AMS reader device, you need to configure the proxy target: + +1. Copy the example config file: + ```bash + cp vite.config.local.example.js vite.config.local.js + ``` + +2. Edit `vite.config.local.js` and update the IP address to match your device: + ```javascript + export default { + proxyTarget: "http://192.168.1.100" // Your device's IP + } + ``` + +3. The `vite.config.local.js` file is gitignored, so your personal settings won't be committed. + +### Running Development Server + +```bash +npm install +npm run dev +``` + +The dev server will proxy API requests to your configured device IP. + +### Building for Production + +```bash +npm run build +``` + +The build output will be in the `dist/` directory. + +## Project Structure + +- `src/` - Application source code + - `routes/` - Page components using svelte-spa-router + - `lib/` - Shared components and utilities +- `public/` - Static assets (favicon, etc.) +- `dist/` - Build output (not committed to git) + +## Key Technologies + +- **Svelte 5.17.0** - UI framework +- **Vite 6.0.7** - Build tool +- **svelte-spa-router 4.0.1** - Hash-based routing +- **Tailwind CSS** - Styling