Commit Graph

45 Commits

Author SHA1 Message Date
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
f7c57ca4f0 Use domain-based URLs for services instead of IP:port
- config.ts: Server uses localhost, client uses domain names (coolify.nuc.lan, etc.)
- Added serviceDomains mapping and getServiceUrl() helper
- services.ts: Updated getCoolifyUrl/getDozzleUrl to use domains
- fallbackServices now uses domain-based URLs where available

Works from anywhere via Tailscale (no subnet conflicts)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 17:01:11 +01:00
Alejandro Gutiérrez
396b2c3ecf Append real-time stats to CPU/RAM charts on each 15s tick
Zero extra Prometheus queries - reuses existing instant stats data
to grow chart series between 60s range query refreshes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 01:44:40 +01:00
Alejandro Gutiérrez
e4e5cc97d3 Deep-link Dozzle logs button to specific container
The discover API now fetches container names from Docker via the Python
API on port 9876 and matches them to services by UUID. The Dozzle logs
button builds a proper deep link using the Dozzle host ID and container
name, opening directly to that container's log stream.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 01:17:46 +01:00
Alejandro Gutiérrez
5aa7559d43 Fix SQL join type mismatch (application_id varchar vs id bigint) and add is_api field
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 01:14:46 +01:00
Alejandro Gutiérrez
68649b0073 Add Dozzle logs button to service card footer
Adds a scroll-text icon button between the web link and Coolify link
that opens Dozzle for viewing container logs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 01:01:19 +01:00
Alejandro Gutiérrez
af49497923 Fix Coolify DB connection URL parsing for special chars in password
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 01:00:21 +01:00
Alejandro Gutiérrez
1a5be27a17 Redesign ServiceCard: card body is informational, links in footer
The card body no longer wraps in an <a> tag. Instead, the footer has
explicit icon buttons: external-link for the web URL, settings gear for
Coolify management, with a divider before start/stop/restart controls.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 00:52:50 +01:00
Alejandro Gutiérrez
5fd10819e4 Add Coolify management links to service cards and overview chips
Each discovered service now shows a settings gear icon linking to its
Coolify management page alongside the existing web URL link.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 00:51:42 +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
d4053812cd Show running services as named chips with restart/stop on Overview
Replace anonymous green dots with named green chips, each with
restart and stop icon buttons. Now all services have visible
controls on the Overview regardless of state.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 00:43:16 +01:00
Alejandro Gutiérrez
eda6d956b2 Redesign ServiceCard: state-driven controls with visual indicators
- Color-coded left border: green=running, red=stopped, grey=unknown
- Status pill with icon: "Running" (green), "Stopped" (red), etc.
- Stopped cards appear muted (75% opacity), recover on hover
- Running: restart (↻) + stop (⏻) icon buttons, stop needs confirm
- Stopped: prominent green play (▶) button
- Loading state: spinner replaces controls with "Processing..."
- Added coolify.ts lib and config.ts for shared Coolify API access
- No pause support (Coolify API doesn't expose docker pause)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 00:37:05 +01:00
Alejandro Gutiérrez
14fc608754 Add restart/stop controls to every ServiceCard on Services tab
Running services show Restart and Stop buttons. Stopped/unknown show
Start button. Stop requires double-click confirmation (3s timeout).
Card restructured from <a> wrapper to <div> with nested <a> for the
link area, so buttons can coexist without nesting issues.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:58:17 +01:00
Alejandro Gutiérrez
93578904f4 Add service start/stop toggle buttons via Coolify API
New /api/control route proxies start/stop/restart actions to Coolify.
Stopped and unknown service chips now show a play button to start them.
After toggling, auto-refreshes service discovery after 3s.
Added play, power, stop-circle icons.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:16:45 +01:00
Alejandro Gutiérrez
4024005319 Improve overview: named chips for stopped services, view-all navigation
Services card: running services shown as green dots, stopped/unknown
services promoted to named chips with colored borders for visibility.
Section headers (Services, Deployments) get "View all >" links that
navigate to the corresponding tab.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:57:59 +01:00
Alejandro Gutiérrez
059d9037b3 Add CPU temperature chart to System Trends
Queries max core temperature from Prometheus (platform_coretemp_0)
and displays it as a fourth sparkline in red. Grid now 4-column.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:54:12 +01:00
Alejandro Gutiérrez
d81f39c28d Restructure Overview: project cards side by side, ready to scale
- Extract ProjectCard component with status dots per app
- Projects row uses responsive grid (2/3/4 cols) for side-by-side cards
- Added Knosia project alongside WhyRating
- Quick Links moved to full-width row with 6-col grid on desktop
- Switched outer layout from CSS Grid to space-y for cleaner stacking

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:51:01 +01:00
Alejandro Gutiérrez
2e0bf435fe Reorder Overview layout: charts hero, remove redundant health card
- System Trends promoted to full-width hero row (most important info first)
- Uptime and load average moved into Trends card header
- Removed separate System Health card (redundant with VitalsBar + Trends)
- Services + Deployments in row 2, Quick Links + WhyRating in row 3
- Taller charts (h-20), tighter gaps, cleaner visual hierarchy

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:47:50 +01:00
Alejandro Gutiérrez
43936fc601 Add System Trends sparkline charts using Recharts + Prometheus
- Add recharts dependency for area chart visualizations
- Add /api/metrics route querying Prometheus query_range (CPU, RAM, Network)
- Add SystemTrends component with 3 sparkline area charts (6h window, 2min steps)
- CPU (emerald), RAM (amber), Network I/O (indigo) with gradient fills
- Tooltips show exact values on hover, time axis with formatted labels
- Link to Grafana for deep-dive analysis
- Fetches every 60s, shimmer loading state

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:40:23 +01:00
Alejandro Gutiérrez
8583ae52c6 Add Overview tab with system vitals and replace WhyRating tab
- Add /stats Python API endpoint on NUC (CPU, RAM, Swap, Disk, uptime, load avg)
- Add VitalsBar component in header showing CPU/RAM/Disk mini bars
- Add Overview as new default landing tab with system health, service summary,
  recent deployments, quick links, and WhyRating project status
- Poll system stats every 30s, deployments every 30s on overview tab
- Remove standalone WhyRating tab (content moved to Overview)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:12:00 +01:00
Alejandro Gutiérrez
d70f7a902f Add auto-discovery services tab using Coolify API
Replace static services list with dynamic discovery from Coolify's
server resources API. Services are auto-categorized using a registry
of known service names mapped to icons and categories. Falls back to
static list with health checks when Coolify is unreachable.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 21:28:02 +01:00
Alejandro Gutiérrez
3a16df2581 Use Coolify logo icon for Coolify links
Added coolify icon to Icons component using official logo.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 19:41:17 +00:00
Alejandro Gutiérrez
da3753c47f Set default page size to 50 rows
- Default pagination: 50 rows
- Options: 25, 50, 100

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 18:21:10 +00:00
Alejandro Gutiérrez
a2519116d5 Extend deployments table to use more horizontal space
Deployments tab now uses max-w-[1600px] instead of max-w-6xl.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 18:17:55 +00:00
Alejandro Gutiérrez
2726d92f00 Fix table overflow and add website link to actions
- Added min-w-0 to deployments div and overflow-hidden to main
- Fixed application_fqdn not being passed through API transformation
- Globe icon now shows for all deployments with fqdn

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 18:07:08 +00:00
Alejandro Gutiérrez
da4b167567 Add deployed site link to deployments table
Shows globe icon linking to application_fqdn for finished deployments.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 17:52:16 +00:00
Alejandro Gutiérrez
d6aa5ecd11 Improve deployment logs with colors, formatting, and expand view
- Add syntax highlighting: errors (red), warnings (yellow), success (green)
- Add line numbers
- Add expand button for fullscreen modal view
- Fix horizontal overflow with overflow-x-hidden and break-words
- Dark terminal-style background for better readability

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 02:55:31 +00:00
Alejandro Gutiérrez
968ea60c60 Fix expanded logs horizontal overflow
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 02:18:24 +00:00
Alejandro Gutiérrez
d760638bf6 Fix page scroll on row expand - use container scrollTop instead of scrollIntoView
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 02:14:49 +00:00
Alejandro Gutiérrez
6739a53fa8 Fix table horizontal overflow - add scroll and min-width
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 02:13:03 +00:00
Alejandro Gutiérrez
887ebf0ab8 Fix light theme support and expand/collapse UX
- Add light/dark theme support to DeploymentsTable and DeploymentLogs
- Add stopPropagation to logs container and buttons to prevent accidental collapse
- Fix absolute positioning by adding relative parent

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 02:08:40 +00:00
Alejandro Gutiérrez
84d5633b36 Fix TypeScript error: cast unknown to string in deployment loop
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 01:57:48 +00: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
Alejandro Gutiérrez
299e7beb57 Use WhyRating brand logo for tab and hub link icons
- Add WhyRating logo icon to Icons component
- Replace 'star' icon with 'whyrating' logo for tab and hub link

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 01:14:36 +00:00
Alejandro Gutiérrez
78d2becab9 Simplify WhyRating tab to only show Hub link
Other resources are now accessible via the Hub itself.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 01:13:08 +00:00
Alejandro Gutiérrez
7d76891579 Add WhyRating Hub link to WhyRating tab
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 00:43:10 +00:00
Alejandro Gutiérrez
ad83449aac Add dedicated AI tab for quick access to AI tools
- Claude, ChatGPT, Perplexity, Phind, Cursor
- v0, Replicate, Hugging Face, Together AI
- Grid layout for easy browsing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 00:28:09 +00:00
Alejandro Gutiérrez
24bbcaecd6 Move WhyRating tab to first position
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 00:27:16 +00:00
Alejandro Gutiérrez
b115846021 Add WhyRating tab with project links
- Brand Site (brand.nuc.lan)
- Templates Site (templates.nuc.lan)
- Outline Docs for documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 00:26:27 +00:00
Alejandro Gutiérrez
331441b57e Add subtle shadow and reduce border intensity on cards
- Add shadow-sm to ServiceCard, BookmarkCard, and Settings card
- Reduce border opacity: slate-100 (light) / stone-700/50 (dark)
- Lighter hover states for a softer look

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 00:19:15 +00:00
nuc
a96c510dd6 Update tab styling to match whyrating-brand
Change from underline-style tabs to rounded-top pill tabs:
- Use bg-slate-100/dark:bg-stone-800 for active state
- Remove border-b-2 underline in favor of rounded-t-lg
- Match px-5 py-3 padding from brand site

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:53:55 +00:00
Alejandro Gutiérrez
fa2e7dd44a Add tab navigation (Services, Bookmarks, Settings)
- Services tab: shows all internal services with health status
- Bookmarks tab: shows all external bookmarks by category
- Settings tab: dark mode toggle and portal info
- Running services counter in header
- Consistent tab styling with underline indicator

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:02:37 +00:00
Alejandro Gutiérrez
1a7a0ed4d3 Initial NUC Portal dashboard
- 17 internal services with live health status
- 28 external bookmarks organized by category
- Dark/light mode toggle with persistence
- Cmd+K search filtering
- Health API polling every 30 seconds

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