Skip to content

New Billing structure - #34

Closed
RizonFTW wants to merge 46 commits into
mainfrom
newbilling
Closed

RizonFTW wants to merge 46 commits into
mainfrom
newbilling

Conversation

@RizonFTW

@RizonFTW RizonFTW commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

New way on billing on GSM.

1st month full price then going forward you are charged for what you use!

Related Issues

Checklist

  • My code follows the code style of this project.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation, if necessary.
  • I have added tests that prove my fix is effective or my feature works.
  • New and existing tests pass locally with my changes.

Screenshots (if applicable)

Additional Notes

Summary by CodeRabbit

  • New Features
    • Approve server provisioning from a dedicated dashboard page with configurable game settings.
    • Power servers on or off directly from the dashboard.
    • Browse, edit, and save server files with syntax highlighting.
    • View live CPU, memory, disk, network, player, TPS, and uptime metrics.
    • Improved console with command history and copy controls.
    • Added hourly usage billing and automated billing processing.
  • Improvements
    • Added email notifications for provisioning, server readiness, failures, deletion, and member additions.
    • Provisioning statuses now provide clearer progress details and errors.
    • Shared-server members can view live metrics.

CodeMeAPixel and others added 30 commits May 18, 2026 13:53
Not needed to be tracked
feat(add): dashboard and agent improvements
@coderabbitai

coderabbitai Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: a127baff-1e46-4d06-85fd-1728a4a8626b

📥 Commits

Reviewing files that changed from the base of the PR and between 8140801 and 7f91e06.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (111)
  • .env.example
  • .gitignore
  • .vscode/settings.json
  • agent
  • app/admin/actions/create-server.ts
  • app/admin/components/admin-sidebar-enhanced.tsx
  • app/admin/components/admin-sidebar.tsx
  • app/admin/servers/actions/delete.ts
  • app/api/agent/heartbeat/route.ts
  • app/api/servers/[id]/files/content/route.ts
  • app/api/servers/[id]/members/route.ts
  • app/api/servers/[id]/metrics/live/route.ts
  • app/api/webhooks/stripe/route.ts
  • app/dashboard/[id]/actions/approve-provision.ts
  • app/dashboard/[id]/actions/power.ts
  • app/dashboard/[id]/actions/rcon.ts
  • app/dashboard/[id]/approve-provision/page.tsx
  • app/dashboard/[id]/components/backups-panel.tsx
  • app/dashboard/[id]/components/files-panel.tsx
  • app/dashboard/[id]/components/live-metrics-panel.tsx
  • app/dashboard/[id]/components/logs-stream.tsx
  • app/dashboard/[id]/components/provisioning-status.tsx
  • app/dashboard/[id]/components/server-context.tsx
  • app/dashboard/[id]/components/shell.tsx
  • app/dashboard/[id]/components/use-live-metrics.ts
  • app/dashboard/[id]/console/page.tsx
  • app/dashboard/[id]/layout.tsx
  • app/dashboard/account/backend/page.tsx
  • app/dashboard/components/app-sidebar.tsx
  • app/dashboard/components/server-card.tsx
  • app/dashboard/new/actions/create-server.ts
  • app/dashboard/new/components/form.tsx
  • app/layout.tsx
  • components/panel.tsx
  • components/ui/accordion.tsx
  • components/ui/alert-dialog.tsx
  • components/ui/alert.tsx
  • components/ui/aspect-ratio.tsx
  • components/ui/avatar.tsx
  • components/ui/badge.tsx
  • components/ui/breadcrumb.tsx
  • components/ui/button-group.tsx
  • components/ui/button.tsx
  • components/ui/calendar.tsx
  • components/ui/card.tsx
  • components/ui/carousel.tsx
  • components/ui/chart.tsx
  • components/ui/checkbox.tsx
  • components/ui/collapsible.tsx
  • components/ui/command.tsx
  • components/ui/context-menu.tsx
  • components/ui/dialog.tsx
  • components/ui/direction.tsx
  • components/ui/drawer.tsx
  • components/ui/dropdown-menu.tsx
  • components/ui/empty.tsx
  • components/ui/field.tsx
  • components/ui/form.tsx
  • components/ui/hover-card.tsx
  • components/ui/input-group.tsx
  • components/ui/input-otp.tsx
  • components/ui/input.tsx
  • components/ui/item.tsx
  • components/ui/kbd.tsx
  • components/ui/label.tsx
  • components/ui/menubar.tsx
  • components/ui/native-select.tsx
  • components/ui/navigation-menu.tsx
  • components/ui/pagination.tsx
  • components/ui/popover.tsx
  • components/ui/progress.tsx
  • components/ui/radio-group.tsx
  • components/ui/resizable.tsx
  • components/ui/scroll-area.tsx
  • components/ui/select.tsx
  • components/ui/separator.tsx
  • components/ui/shared-sidebar.tsx
  • components/ui/sheet.tsx
  • components/ui/sidebar.tsx
  • components/ui/skeleton.tsx
  • components/ui/slider.tsx
  • components/ui/sonner.tsx
  • components/ui/spinner.tsx
  • components/ui/switch.tsx
  • components/ui/table.tsx
  • components/ui/tabs.tsx
  • components/ui/textarea.tsx
  • components/ui/toggle-group.tsx
  • components/ui/toggle.tsx
  • components/ui/tooltip.tsx
  • games
  • hooks/use-mobile.ts
  • lib/mail.ts
  • lib/pricing.ts
  • lib/providers
  • lib/rbac.ts
  • lib/sandbox/compile-agent.ts
  • lib/utils.ts
  • lib/workflows/build-snapshot-cloud-init.ts
  • lib/workflows/provision-server.ts
  • lib/workflows/steps.ts
  • next-env.d.ts
  • package.json
  • prisma/migrations/20260519050228_add_agent_metrics/migration.sql
  • prisma/migrations/20260816120000_add_server_powered_off/migration.sql
  • prisma/migrations/20260820120000_usage_billing/migration.sql
  • prisma/schema.prisma
  • protocol/constants.ts
  • protocol/schemas.ts
  • test/hetzner-catalog.test.ts
  • vercel.json

📝 Walkthrough

Walkthrough

The change adds approval-based provisioning, server power controls, live agent telemetry, authenticated file editing, lifecycle email notifications, usage-billing persistence, Stripe customer mapping, build-source resolution, dashboard updates, and broad formatting changes.

Changes

Server platform changes

Layer / File(s) Summary
Provisioning approval and lifecycle notifications
app/admin/actions/create-server.ts, app/dashboard/[id]/actions/approve-provision.ts, app/dashboard/[id]/approve-provision/page.tsx, lib/mail.ts, lib/workflows/*, app/admin/servers/actions/delete.ts, app/api/servers/[id]/members/route.ts
Server creation now waits for approval. Approval validates ownership and settings before starting provisioning. Lifecycle and membership events send email notifications.
Telemetry, file access, and power controls
protocol/*, prisma/*, app/api/agent/heartbeat/route.ts, app/api/servers/[id]/files/content/route.ts, app/api/servers/[id]/metrics/live/route.ts, app/dashboard/[id]/actions/power.ts, app/dashboard/[id]/components/*
Agent telemetry is persisted and exposed through live metrics. File reads and writes use validated agent commands. Dashboard pages support file editing, live metrics, and power state transitions.
Billing and build integration
app/api/webhooks/stripe/route.ts, app/dashboard/new/actions/create-server.ts, lib/pricing.ts, lib/sandbox/compile-agent.ts, vercel.json
Stripe subscriptions store internal billing-customer IDs. Checkout creates introductory and usage-base prices. Hourly pricing and usage-invoice storage are added. Git source resolution now supports asynchronous revision lookup.
Project and interface updates
package.json, app/layout.tsx, app/*/components/*, .env.example, .gitignore, agent, games, lib/providers, components/ui/*
Prettier, Monaco, and Speed Insights are wired in. Navigation and layout details are updated. Submodule references and broad UI formatting are changed.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Admin
  participant Dashboard
  participant ServerAction
  participant Workflow
  participant Agent
  participant Mailer
  Admin->>Dashboard: open pending server approval
  Dashboard->>ServerAction: submit approval and settings
  ServerAction->>Workflow: start provisioning
  Workflow->>Agent: poll installation phase
  Agent-->>Workflow: return phase and error message
  Workflow->>Mailer: send ready or failure email
Loading
sequenceDiagram
  participant Dashboard
  participant MetricsRoute
  participant Database
  participant Agent
  Dashboard->>MetricsRoute: request live metrics
  MetricsRoute->>Database: load server and agent telemetry
  MetricsRoute->>Agent: use heartbeat freshness state
  MetricsRoute-->>Dashboard: return metrics or null
Loading

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/settings/billing.

Comment @coderabbitai help to get the list of available commands.

@RizonFTW

Copy link
Copy Markdown
Contributor Author

Fucking wrong branch

@RizonFTW RizonFTW closed this Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants