From 579a2262bf6c9439a97322e40eab3c6513915343 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Mon, 21 Jul 2025 00:23:51 -0600
Subject: [PATCH] feat(billing): add support for Hetzner and Hostinger server
providers with updated pricing and specifications
---
.../settings/billing/show-billing.tsx | 279 ++++++------
.../billing/show-hetzner-providers.tsx | 406 +++++++++++++++++
.../billing/show-hostinger-servers.tsx | 428 ++++++++++++++++++
.../settings/billing/show-providers.tsx | 47 ++
apps/dokploy/server/api/root.ts | 4 +
apps/dokploy/server/api/routers/hetzner.ts | 144 ++++++
apps/dokploy/server/api/routers/hostinger.ts | 299 ++++++++++++
7 files changed, 1468 insertions(+), 139 deletions(-)
create mode 100644 apps/dokploy/components/dashboard/settings/billing/show-hetzner-providers.tsx
create mode 100644 apps/dokploy/components/dashboard/settings/billing/show-hostinger-servers.tsx
create mode 100644 apps/dokploy/components/dashboard/settings/billing/show-providers.tsx
create mode 100644 apps/dokploy/server/api/routers/hetzner.ts
create mode 100644 apps/dokploy/server/api/routers/hostinger.ts
diff --git a/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx b/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx
index 1e0e5d3df..117e980ef 100644
--- a/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx
+++ b/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx
@@ -24,6 +24,7 @@ import {
} from "lucide-react";
import Link from "next/link";
import { useState } from "react";
+import { ShowProviders } from "./show-providers";
const stripePromise = loadStripe(
process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!,
@@ -151,44 +152,25 @@ export const ShowBilling = () => {
- ${" "} - {calculatePrice( - serverQuantity, - isAnnual, - ).toFixed(2)}{" "} - USD -
- | -- ${" "} - {( - calculatePrice(serverQuantity, isAnnual) / 12 - ).toFixed(2)}{" "} - / Month USD -
-${" "} {calculatePrice(serverQuantity, isAnnual).toFixed( @@ -196,127 +178,146 @@ export const ShowBilling = () => { )}{" "} USD
- )} -- {product.description} + | +
+ ${" "} + {( + calculatePrice(serverQuantity, isAnnual) / 12 + ).toFixed(2)}{" "} + / Month USD +
++ ${" "} + {calculatePrice(serverQuantity, isAnnual).toFixed( + 2, + )}{" "} + USD
+ )} ++ {product.description} +
-+ {category.description} +
+ ++ {currentLocation.description} • Zone:{" "} + {currentLocation.network_zone} +
+