From 55d6c8586d3c24a280e9f7b791ea2fc723959cd1 Mon Sep 17 00:00:00 2001 From: TheRealToxicDev Date: Mon, 18 May 2026 12:59:06 -0600 Subject: [PATCH 1/4] fix some stuff!! --- .env.example | 54 +- agent | 2 +- app/(marketing)/layout.tsx | 2 +- app/admin/analytics/page.tsx | 433 ++++++++ app/admin/audit/audit-log-table.tsx | 233 +++-- app/admin/components/admin-container.tsx | 2 +- app/admin/components/admin-section.tsx | 48 + .../components/admin-sidebar-enhanced.tsx | 139 +++ app/admin/components/analytics.tsx | 202 ++++ app/admin/components/charts.tsx | 174 ++++ app/admin/components/index.ts | 17 + app/admin/components/metric-card.tsx | 159 +++ app/admin/config/nav.ts | 40 + app/admin/email/email-panel.tsx | 366 ++++--- app/admin/layout.tsx | 8 +- app/admin/page.tsx | 486 +++++++-- app/admin/servers/actions/delete.ts | 81 ++ app/admin/servers/servers-table.tsx | 258 +++-- app/admin/sessions/sessions-table.tsx | 252 +++-- app/admin/subscriptions/page.tsx | 125 +-- app/admin/users/users-table.tsx | 314 +++--- app/api/admin/analytics/route.ts | 204 ++++ app/api/agent/errors/route.ts | 109 ++ .../servers/[id]/backups/limit-check/route.ts | 80 ++ app/api/servers/[id]/backups/route.ts | 10 + app/api/servers/[id]/metrics/live/route.ts | 76 ++ app/api/webhooks/stripe/route.ts | 141 ++- app/dashboard/[id]/actions/rcon.ts | 70 ++ .../[id]/components/console-panel.tsx | 242 +++++ .../[id]/components/live-metrics-panel.tsx | 174 ++++ app/dashboard/[id]/components/shell.tsx | 246 +++-- app/dashboard/[id]/components/team-panel.tsx | 59 +- .../[id]/components/use-live-metrics.ts | 97 ++ app/dashboard/[id]/console/page.tsx | 156 ++- app/dashboard/account/billing/page.tsx | 348 ++++--- .../account/components/passkeys-panel.tsx | 7 +- .../account/components/password-panel.tsx | 81 +- .../account/components/profile-panel.tsx | 133 +-- app/dashboard/components/activity-feed.tsx | 272 +++++ app/dashboard/components/app-container.tsx | 2 +- app/dashboard/components/app-sidebar.tsx | 342 ++++--- app/dashboard/components/bulk-actions.tsx | 185 ++++ app/dashboard/components/index.ts | 67 ++ .../components/mobile-bottom-sheet.tsx | 104 ++ app/dashboard/components/mobile-drawer.tsx | 78 ++ app/dashboard/components/page-header.tsx | 51 +- app/dashboard/components/quick-stats.tsx | 107 ++ app/dashboard/components/responsive-table.tsx | 152 +++ .../components/responsive-typography.tsx | 73 ++ .../components/sensitive-data-revealer.tsx | 65 ++ .../components/server-card-skeleton.tsx | 39 + app/dashboard/components/server-card.tsx | 421 ++++++++ app/dashboard/components/server-filter.tsx | 209 ++++ app/dashboard/components/server-grid.tsx | 72 ++ .../components/server-health-indicator.tsx | 200 ++++ app/dashboard/components/touch-controls.tsx | 67 ++ app/dashboard/components/view-toggle.tsx | 48 + app/dashboard/layout.tsx | 2 +- app/dashboard/new/actions/create-server.ts | 93 +- app/dashboard/new/components/form.tsx | 966 ++++++++++-------- app/dashboard/new/page.tsx | 2 +- app/dashboard/new/success/page.tsx | 43 + app/dashboard/page.tsx | 97 +- app/layout.tsx | 2 +- app/styles.css | 124 +-- components/dashboard/stat-card.tsx | 82 ++ components/panel.tsx | 2 +- components/ui/shared-sidebar.tsx | 204 ++++ lib/billing/subscription-check.ts | 97 ++ lib/ui-constants.ts | 70 ++ .../20260518041312_add/migration.sql | 29 + prisma/schema.prisma | 33 +- 72 files changed, 8155 insertions(+), 1873 deletions(-) create mode 100644 app/admin/analytics/page.tsx create mode 100644 app/admin/components/admin-section.tsx create mode 100644 app/admin/components/admin-sidebar-enhanced.tsx create mode 100644 app/admin/components/analytics.tsx create mode 100644 app/admin/components/charts.tsx create mode 100644 app/admin/components/index.ts create mode 100644 app/admin/components/metric-card.tsx create mode 100644 app/admin/config/nav.ts create mode 100644 app/admin/servers/actions/delete.ts create mode 100644 app/api/admin/analytics/route.ts create mode 100644 app/api/agent/errors/route.ts create mode 100644 app/api/servers/[id]/backups/limit-check/route.ts create mode 100644 app/api/servers/[id]/metrics/live/route.ts create mode 100644 app/dashboard/[id]/actions/rcon.ts create mode 100644 app/dashboard/[id]/components/console-panel.tsx create mode 100644 app/dashboard/[id]/components/live-metrics-panel.tsx create mode 100644 app/dashboard/[id]/components/use-live-metrics.ts create mode 100644 app/dashboard/components/activity-feed.tsx create mode 100644 app/dashboard/components/bulk-actions.tsx create mode 100644 app/dashboard/components/index.ts create mode 100644 app/dashboard/components/mobile-bottom-sheet.tsx create mode 100644 app/dashboard/components/mobile-drawer.tsx create mode 100644 app/dashboard/components/quick-stats.tsx create mode 100644 app/dashboard/components/responsive-table.tsx create mode 100644 app/dashboard/components/responsive-typography.tsx create mode 100644 app/dashboard/components/sensitive-data-revealer.tsx create mode 100644 app/dashboard/components/server-card-skeleton.tsx create mode 100644 app/dashboard/components/server-card.tsx create mode 100644 app/dashboard/components/server-filter.tsx create mode 100644 app/dashboard/components/server-grid.tsx create mode 100644 app/dashboard/components/server-health-indicator.tsx create mode 100644 app/dashboard/components/touch-controls.tsx create mode 100644 app/dashboard/components/view-toggle.tsx create mode 100644 app/dashboard/new/success/page.tsx create mode 100644 components/dashboard/stat-card.tsx create mode 100644 components/ui/shared-sidebar.tsx create mode 100644 lib/billing/subscription-check.ts create mode 100644 lib/ui-constants.ts create mode 100644 prisma/migrations/20260518041312_add/migration.sql diff --git a/.env.example b/.env.example index 96fa2d1..97094f3 100644 --- a/.env.example +++ b/.env.example @@ -7,23 +7,57 @@ KV_REST_API_TOKEN= # Vercel Blob (snapshot agent binary) BLOB_READ_WRITE_TOKEN= -# Hetzner credentials are now per-user — set them in /dashboard/account. -# The build-snapshot.sh script still reads HETZNER_TOKEN/IMAGE_ID/LOCATION/ -# SERVER_TYPE/SSH_KEY directly from .env.local for the admin gold-image build. +# System-level Hetzner provider token used by GSM. +HETZNER_API_TOKEN= +# Optional: pin a golden image ID. If empty, GSM auto-manages snapshots. +HETZNER_SNAPSHOT_IMAGE_ID= + +# Optional builder defaults used by provider profile. +HETZNER_BUILDER_BASE_IMAGE=ubuntu-24.04 +HETZNER_BUILDER_SERVER_TYPE=cx23 +HETZNER_BUILDER_LOCATION=nbg1 BOOTSTRAP_JWT_SECRET= BETTER_AUTH_SECRET= BETTER_AUTH_URL=http://localhost:3000 -# On Vercel, SEO_URL and API_URL are derived from VERCEL_PROJECT_PRODUCTION_URL -# and VERCEL_BRANCH_URL automatically. Locally, both fall back to -# http://localhost:3000. -# -# VERCEL_AUTOMATION_BYPASS_SECRET is required on Vercel preview deployments so -# Hetzner agents can punch through deployment protection on callbacks. It's not -# needed locally or in production. +# Optional public URL override for local snapshot bakes. Use ngrok/tunnel URL. +NODEBYTE_PUBLIC_URL= + VERCEL_AUTOMATION_BYPASS_SECRET= +# Stripe (optional unless billing/webhooks are in use) +STRIPE_SECRET_KEY= +STRIPE_WEBHOOK_SECRET= +NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY= + +# SMTP (optional; when unset, email sending is skipped) +SMTP_HOST= +SMTP_PORT=587 +SMTP_USER= +SMTP_PASS= +SMTP_FROM= + +# Optional analytics +NEXT_PUBLIC_GA_MEASUREMENT_ID= +NEXT_PUBLIC_POSTHOG_HOST= +NEXT_PUBLIC_POSTHOG_KEY= + +# Sentry (optional) NEXT_PUBLIC_SENTRY_DSN= SENTRY_ORG= SENTRY_PROJECT= + +# Optional local snapshot build tuning +SNAPSHOT_SKIP_FULL_UPGRADE=0 +SNAPSHOT_BUILDER_MAX_WAIT_SECONDS= +SNAPSHOT_BUILDER_POLL_SECONDS= +SNAPSHOT_IMAGE_MAX_WAIT_SECONDS= +SNAPSHOT_IMAGE_POLL_SECONDS= + +# Optional local git source override for snapshot compilation +NBP_GIT_REVISION= +NBP_GIT_REPO_URL= + +# Optional token for private submodule access / sandbox git fetch +GIT_AUTH_TOKEN= diff --git a/agent b/agent index 8682176..b8715dc 160000 --- a/agent +++ b/agent @@ -1 +1 @@ -Subproject commit 86821760f444e6f86f342a0be7ce5021065c7242 +Subproject commit b8715dc29793f9eddcac88717ffb2ecf5b152efb diff --git a/app/(marketing)/layout.tsx b/app/(marketing)/layout.tsx index 0962b10..d1cc099 100644 --- a/app/(marketing)/layout.tsx +++ b/app/(marketing)/layout.tsx @@ -9,7 +9,7 @@ const MarketingLayout = async ({ children }: { children: ReactNode }) => { const isAuthenticated = Boolean(session?.user); return ( -
+
{children}