ai / frontend /README.md
fdrah
initial-commit
9e93b10
|
Raw
History Blame Contribute Delete
1.53 kB

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

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:

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