frontend.md
Frontend
Current Frontend Targets
https://mino.ink(production client)https://test.mino.ink(test client)- built-in server UI (
http://<SERVER_IP>:3000) - local prototype reference in this repo (
prototype/) - local Next.js dev app (
apps/web, default port5173)
Client-To-Server Contract
Clients connect to a Mino server URL and use:
- setup endpoint:
GET /api/v1/system/setup - auth header:
X-Mino-Key
Dedicated Route: /link
/link is implemented in apps/web and must remain available on each web client (mino.ink, test.mino.ink, built-in UI, and local dev) so setup URLs work without manual typing.
Required flow:
- Read direct params (
serverUrl,apiKey) or relay params (relayCode, optionalrelayUrl). - If relay mode, exchange code at relay to resolve
serverUrl+apiKey. - Call
POST {serverUrl}/api/v1/auth/verifywithX-Mino-Key. - Call
POST {serverUrl}/api/v1/auth/linkwithX-Mino-Key. - Persist server connection locally.
- Remove sensitive params from URL and redirect to workspace.
Implementation spec:
./reference/link-handler-spec.md
Local Development (Prototype)
cd prototype
python3 -m http.server 5173
Open http://localhost:5173.
Local Development (Next.js App)
pnpm --filter @mino-ink/web dev
Open http://localhost:5173/link.
Local Server Integration
- Run server on
http://localhost:3000. - Get setup payload from
http://localhost:3000/api/v1/system/setup. - Use
links.connect.localUior manually configure the client with:serverUrlapiKey
Current state:
- route is implemented and active
- URL prefill + verify/link + localStorage persistence + workspace redirect are in place