RadioStore Admin (React)
Vite + React + TypeScript + React Router + React Bootstrap.
Setup
cd admin-web
cp .env.example .env
npm install
npm run dev
Dev server defaults to http://localhost:5173. Set VITE_ADMIN_API_BASE_URL in .env to your Vapor origin (no trailing slash). The backend must allow CORS for this origin.
Backend routes (expected)
The UI calls /admin/v1/... relative to that base URL:
| Method | Path | Notes |
|---|---|---|
| POST | /admin/v1/auth/login |
Body { email, password }; JSON { access_token } or { token } |
| GET | /admin/v1/taxonomy |
{ geos: [], countries: [], genres: [] } |
| GET | /admin/v1/stations |
Array of station objects (see src/types/admin.ts) |
| GET | /admin/v1/stations/:id |
Single station |
| POST | /admin/v1/stations |
Create |
| PUT | /admin/v1/stations/:id |
Update |
| GET | /admin/v1/users |
Read-only user list |
Until Vapor implements these, use “Already have a bearer token?” on the login screen if you only need to probe an API, or expect empty lists / warning banners.
Production build
npm run build
Output in dist/ — serve as static files (nginx, S3, etc.).
Docker (from monorepo root)
docker compose --profile compile run --rm admin-compile
Builds into admin-web/dist/ inside a Node container (see root docker-compose.yml). Optional repo-root .env can set VITE_ADMIN_API_BASE_URL for that build.