Commit Graph

6 Commits

Author SHA1 Message Date
Alejandro Gutiérrez
9b9226b954 Replace Puppeteer with Next.js ImageResponse for previews
- Remove puppeteer (2.9GB) in favor of built-in ImageResponse (0 deps)
- Preview endpoint generates styled deployment card as PNG
- Shows app name, status, branch, commit, duration, domain
- Rename route.ts to route.tsx for JSX support
- Simplify dashboard to use image URL directly
2026-02-06 19:41:40 +01:00
Alejandro Gutiérrez
91624fd6de Add S3/MinIO storage for deployment previews
- Add S3 client helper (src/lib/s3.ts) with upload/download functions
- Add /api/deployments/[uuid]/preview endpoint for presigned URLs
- Update DeploymentDashboard to fetch and display preview images
- Install @aws-sdk/client-s3 and @aws-sdk/s3-request-presigner

Storage: MinIO bucket nuc-portal-previews with dedicated service account

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 18:11:50 +01:00
Alejandro Gutiérrez
efc7a8392b Add Vercel-style deployment dashboard
- Add /deployments/[uuid] route with detailed deployment view
- Add DeploymentDashboard component with tabs (Deployment, Logs, Resources, Source)
- Add real-time health/stats via SWR with 10s polling
- Add Docker API helpers (health, stats, uptime) via SSH
- Add redeploy action endpoint and button
- Add expand button to table for inline log viewing
- Add loading skeleton, error, and empty states
- Handle edge cases (in_progress, error, cancelled, missing data)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 18:00:14 +01:00
Alejandro Gutiérrez
9e683eba22 Replace polling with real-time SSE stream and eliminate Python API dependency
- Add single /api/events SSE endpoint replacing 5 separate polling intervals
- Query Prometheus directly for system stats (replaces Python API on port 9876)
- Query Coolify PostgreSQL directly for deployments (replaces SSH/tinker approach)
- Add EventManager singleton for server-side polling + client broadcast
- Add useEventStream hook with exponential backoff reconnection
- Add live deployment log streaming via SSE for in-progress builds
- Add redeploy button and live duration counter in deployments table
- Add SSE connection indicator in header (green=live, red=offline)
- Externalize all hardcoded 192.168.1.3 references to env vars via config.ts
- Reduce API route code by ~400 lines through shared library modules

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 00:43:41 +01:00
Alejandro Gutiérrez
73ac2ddc21 Use HTTP API for production deployment data
- Production fetches from local coolify-api.py at port 9876
- Development continues using SSH to query Coolify database
- Avoids need for docker socket access in nuc-portal container

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 01:56:06 +00:00
Alejandro Gutiérrez
58308c9c62 Add global Deployments dashboard with expandable logs
- New Deployments tab showing all Coolify deployments
- TanStack Table with sorting, filtering, pagination
- Status badges (Ready/Building/Error/Queued/Cancelled)
- Application and status filter dropdowns
- Expandable rows showing build logs in real-time
- Auto-refresh every 10 seconds when tab is active
- Log polling every 2 seconds for in-progress deployments
- API routes that query Coolify database directly via docker exec

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 01:40:43 +00:00