Files
SEEN/frontend/README.md
T
2026-04-10 12:06:24 +02:00

97 lines
1.7 KiB
Markdown

# Seen Frontend (Phase 1)
UI-first implementation for `/seen/`, a self-hosted media control center.
## Stack
- SolidJS + TypeScript + Vite
- TailwindCSS
- Vitest (unit)
- Playwright (smoke e2e)
- Docker + Nginx runtime
## Implemented in this phase
- App shell with sidebar + top bar
- Theme system (`dark`, `light`, `system`) with persistent storage
- Full route contract scaffolded:
- `/app/dashboard`
- `/app/discover`
- `/app/movies`
- `/app/shows`
- `/app/games`
- `/app/watch-later`
- `/app/watched`
- `/app/downloads`
- `/app/calendar`
- `/app/recommendations`
- `/app/library`
- `/app/collections`
- `/app/settings`
- `/app/admin`
- Polished `Dashboard`, `Discover`, `Games`, and `Queue` pages
- Unified media cards and search flows for movies, shows, and games
- Typed mock service layer compatible with future API replacement
## Environment
Copy `.env.example` to `.env` if you want to customize defaults.
```bash
cp .env.example .env
```
Required variables:
- `VITE_APP_NAME`
- `VITE_ENABLE_MOCK_API` (`true` for mock mode, `false` for backend mode)
Optional mock controls:
- `VITE_MOCK_API_LATENCY_MS`
- `VITE_MOCK_FORCE_ERROR`
Optional backend base URL:
- `VITE_API_BASE_URL` (leave empty to use same-origin `/api` with proxying)
## Run locally
```bash
npm install
npm run dev
```
## Tests
Unit tests:
```bash
npm run test:unit
```
`test:unit` forces mock API mode so local `.env` files do not accidentally switch the suite into live API mode.
Playwright smoke tests:
```bash
npm run test:e2e
```
## Build
```bash
npm run build
npm run preview
```
## Docker runtime (frontend)
Build and run from repository root:
```bash
docker compose up --build
```
App will be served at `http://localhost:8080`.