File size: 1,533 Bytes
9e93b10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# 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