UX Labs — Frontend & API
The main Next.js application that serves the web UI, public REST API, MCP server for AI assistants, and the real-time SSE event bridge. Everything starts here.
tinyfish-io/ux-labsTech Stack
Entry Points
Four ways into the platform — all converge through UX Labs into the same job pipeline.
Playground · Dashboard
Sync / Async / SSE / Batch
OAuth 2.1 · JSON-RPC
httpx client
UX Labs (Next.js 16)
Clerk Auth → Zod Validation → MySQL → SQS Dispatch → Redis Pub/Sub
Key Responsibilities
Web UI
Dashboard, playground, projects, batches, and job detail pages. Users submit URLs + goals and watch the AI browser in real-time via an embedded iframe.
REST API v1
Public API with X-API-Key auth. Supports sync, async, SSE streaming, and batch run modes. Auto-generated OpenAPI spec at /v1/openapi.json.
MCP Server
JSON-RPC 2.0 over HTTP at /mcp, authenticated via OAuth 2.1 (Clerk as provider). Lets AI assistants invoke Mino programmatically.
SSE Event Bridge
Subscribes to Redis Pub/Sub and streams run events to clients. Falls back to 2-second DB polling if SSE connection stalls > 3s.
API Endpoints
| Method | Endpoint | Purpose |
|---|---|---|
| POST | /v1/automation/run | Synchronous run — blocks until complete |
| POST | /v1/automation/run-async | Async run — returns runId immediately |
| POST | /v1/automation/run-sse | SSE streaming run |
| POST | /v1/automation/run-batch | Batch create (up to 100 runs) |
| GET | /v1/runs | List runs with cursor pagination |
| GET | /v1/runs/:id | Get single run details |
| POST | /v1/runs/:id/cancel | Cancel a running job |
Real-Time Streaming
Three-layer SSE pipeline delivers live browser events to clients: