Spaces:
Runtime error
Runtime error
| # rexpro-ai Frontend Template | |
| Standalone SvelteKit frontend extracted from the rexpro-ai monorepo. | |
| Can be run without the backend (UI-only) or connected to a real backend. | |
| ## Quick Start | |
| ```bash | |
| cd frontend | |
| npm install | |
| npm run dev | |
| ``` | |
| Open http://localhost:5173 | |
| ## Environment | |
| | Variable | Default | Description | | |
| |----------------------|---------|-------------------------------------------| | |
| | `VITE_API_URL` | `""` | Backend base URL (leave empty for relative) | | |
| Example `.env`: | |
| ```env | |
| VITE_API_URL=http://localhost:7860 | |
| ``` | |
| ## Scripts | |
| - `npm run dev` β Start dev server (port 5173) | |
| - `npm run build` β Production build β `build/` | |
| - `npm run preview` β Preview production build | |
| - `npm run check` β Type-check with svelte-check | |
| ## Structure | |
| - `src/` β SvelteKit app source | |
| - `static/` β Static assets (favicons, fonts, images, splash) | |
| - `scripts/` β Helper scripts (pyodide fetch) | |
| ## Notes for Next.js Migration | |
| This template uses **SvelteKit + Vite + Tailwind CSS v4**. | |
| When migrating to Next.js, focus on: | |
| 1. **Pages** β `app/` directory (App Router) | |
| 2. ** Stores** (`src/lib/stores/`) β React context / Zustand | |
| 3. **API clients** (`src/lib/apis/`) β `fetch` in Server Actions or API routes | |
| 4. **Workers** (`src/lib/workers/`) β use-workers or similar | |
| 5. **Tailwind config** (`tailwind.config.js`) β `tailwind.config.ts` | |
| 6. **i18n** (`src/lib/i18n/`) β next-intl or similar | |
| 7. **Components** (`src/lib/components/`) β `.tsx` files | |