Commit Graph

116 Commits

Author SHA1 Message Date
keyhan 96d24b50a1 Localize database-config, snapshots panel and new-service wizard.
Add components.dbConfig / components.snapshots and dashboard.servicesNew
dictionaries; move the managed-database config (engine, credentials, dump
upload, storage), the snapshots panel and the three-step new-service
wizard onto them. validateDbDumpStorage now takes a localized template.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 19:22:37 +03:30
keyhan 63e368f464 Localize workload-logs and external-access panels.
Add components.workloadLogs, components.deployStatus and
components.externalAccess dictionaries; move the workload logs panel and
the service external-access panel onto them (tabs, live-refresh hints,
access modes, countdown units, toasts) with RTL-aware spacing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 18:25:45 +03:30
keyhan f64d341c80 Localize shared resource-field components.
Add a components.res resource-label set and move the database workload
resources and optional-service resource-field components onto it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 17:37:26 +03:30
keyhan fcba1ed93c Localize admin cluster and billing-plan pages.
Move the cluster management page (resource panel, tools install/uninstall
flow, statuses/health) and the billing-plans page (pricing matrices,
deploy defaults, add-ons, data-retention settings) onto the dictionaries
with locale-aware dates and RTL-aware tables.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 17:05:43 +03:30
keyhan 6c1133f534 Localize shared modals/overlays, logs, users and cluster-pool pages.
Add a components dictionary (delete/deleting overlays, confirm-modal
defaults, build-progress phases, deployment bar, resource-upgrade modal)
and move the logs, admin users, and admin cluster-pools pages onto the
dictionaries — filters, tables, forms, statuses, toasts and confirm
dialogs — with locale-aware dates and RTL-aware layout.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 15:36:30 +03:30
keyhan e99ab789ba Localize shared modal, overlay and deployment-progress components.
Localize the confirm modal, delete button, deleting overlays/modal, the
build-progress modal, deployment progress bar/manager and the resource
upgrade modal via a shared components dictionary. Build-phase labels now
resolve from the dictionary; deleting overlays take name/kind and build
their own localized message (callers updated).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 13:23:44 +03:30
keyhan f8ee1ca168 Localize user and admin invoice pages.
Move both invoice views onto a shared invoices dictionary — statuses,
filters, payment/line-item/transaction labels, manual status controls and
toasts — with locale-aware Link, dates and RTL-aware table/search layout.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 13:00:15 +03:30
keyhan e99dccaff1 Localize wallet and ticket pages.
Move the wallet page and all four ticket views (user list, ticket detail,
staff queue, admin overview) onto the i18n dictionaries — statuses,
priorities, departments, forms, stats, toasts and empty states — using
locale-aware Link/router and locale-aware date formatting.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 12:54:19 +03:30
keyhan 2bc86c03b8 Localize applications and services list pages.
Move the apps and managed-services list pages onto the i18n dictionaries
(titles, table headers, lifecycle/expiry labels, delete confirmations,
toast messages) and the locale-aware Link, reusing the shared status and
lifecycle/expiry copy. Add RTL-aware table alignment and icon spacing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 12:28:59 +03:30
keyhan e0964e6528 Localize dashboard shell and home page.
Convert the dashboard layout (sidebar nav, header, role badges, wallet,
sign-out, language switcher) and the dashboard home page to the i18n
dictionaries, including a shared deployment-status label map. Switch their
links/router to the locale-aware helpers and add RTL-aware spacing.

Remaining dashboard page bodies and shared components still render English
copy and will be localized in follow-up commits.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 12:15:21 +03:30
keyhan 34993d417f Add i18n foundation (fa-IR/en-US) and localize landing + auth.
Introduce path-prefixed locale routing under app/[lang] with a middleware
that detects locale from cookie/Accept-Language (default fa-IR) and
redirects. Add fa-IR (source of truth) and en-US dictionaries, a server
getDictionary, a client I18nProvider/useT, locale-aware Link + router
helpers, and a language switcher. The root [lang] layout sets html
lang/dir and the per-locale font (Peyda for fa, Inter for en).

Landing sections and the login/register/auth shell now read all copy from
the dictionaries; dashboard localization follows in a later commit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 12:05:03 +03:30
keyhan 2b16846f67 Replace Vazirmatn with a locally-served Peyda font for Persian text.
Vendor the Peyda woff weights (Thin–Black) under public/fonts/peyda and
load them via next/font/local in a shared fonts module, exposed through
the --font-peyda CSS variable and the font-peyda Tailwind utility. Drops
the runtime Google Fonts fetch on the landing and auth pages.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 10:33:33 +03:30
keyhan 25b81e4277 Ignore local Claude Code config directory.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 10:23:32 +03:30
keyhan 0f99524b0e Vendor the landing cloud texture locally instead of fetching a CDN.
drei's volumetric clouds fetch their puff sprite from a GitHub CDN at runtime.
Save that exact image to frontend/public/cloud.png and point <Clouds> at it, so
the landing page never reaches out to any external site while keeping the
original cloud look.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-09 17:04:44 +03:30
keyhan c8f079dbc1 Redesign the login and register pages to match the Abrban landing.
Wrap both auth pages in a shared cinematic sky shell (calm blue sky, drifting
clouds, sun glow, frosted dark-glass panel) in Persian/RTL with the Abrban
brand, while leaving the existing auth store logic and dashboard routing intact.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-09 16:31:42 +03:30
keyhan dfacfdc6cf Add an interactive 3D weather-journey landing page for Abrban at the site root.
Replace the root redirect with a scroll-driven three.js scene that flies from
overcast clouds through rain and a thunderstorm into a clear blue sunny sky,
fronted by Persian/RTL marketing sections. The dashboard at /dashboard is
untouched.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-09 00:10:33 +03:30
keyhan dd1e70d80f chore: sync npm lockfile peer flags and frontend build cache.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 16:29:24 +03:30
keyhan 6df11b738f Restore the preview host and its SSL when a custom domain is removed.
Removing a custom domain left the Ingress with a stale custom-domain rule
and no preview host, so the platform preview URL 404'd. updateIngress now
resolves the app's stable preview number from its latest deployment and
re-emits the preview host (with cert-manager TLS) whenever no verified
custom domain is set, and removeCustomDomain re-applies the Ingress.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 16:25:43 +03:30
keyhan 0b08b995f0 Issue SSL for custom domains and show a public CNAME target.
Derive the CNAME target shown to users from the site's public root
domain (PREVIEW_BASE_DOMAIN, e.g. 3fase.ir) instead of the internal
platform domain, which is not a valid public suffix and cannot get a
Let's Encrypt cert. On DNS verification, re-apply the Ingress so Traefik
routes the custom domain and cert-manager issues a cert via HTTP-01,
mirroring the preview-domain flow.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 16:19:53 +03:30
keyhan 4301277b48 Serve preview URLs over Traefik+TLS, stabilize them, and speed up builds.
Ingress / preview URLs:
- Default the app Ingress class and ACME HTTP-01 solver to Traefik
  (k3s default) via a new INGRESS_CLASS env, instead of hardcoding nginx —
  fixes 404s on clusters without ingress-nginx.
- Only put public, real-TLD hosts (custom domain + preview) in the TLS
  block; the internal *.apps.cloudhost.local host no longer poisons the
  Let's Encrypt order, so certs actually issue.
- Make the per-app preview number stable across redeploys so URLs stop
  breaking, and let PREVIEW_BASE_DOMAIN configure the base domain.

Registry pulls:
- Point the k3s registries.yaml mirror endpoint at the registry NodePort on
  loopback so node containerd never depends on cluster DNS (image pulls
  survive node restarts).

Builds:
- Pin the Kaniko image, use IfNotPresent pull policy, drop the dead build
  queue/processor, and retry transient Kubernetes API errors while polling
  build jobs.

Logs & apps list:
- fluent-bit reads log files from head so startup output reaches
  Elasticsearch.
- Order joined deployments newest-first so the apps list shows the latest
  deployment status.

Allocation:
- Reserve in-flight (pending/building) capacity and stop globally degrading
  the cluster on a single allocation failure, so concurrent deploys don't
  starve or wrongly report "no healthy cluster".

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 15:44:08 +03:30
keyhan 786689e0fd Add per-cluster Tools Management and stop auto-installing side tools.
Introduce a catalog-driven Tools Management section under Clusters so
admins can install/uninstall infrastructure tools per cluster: cert-manager
(Helm/jetstack), ClusterIssuer (email + HTTP01 form, depends on cert-manager),
and central Elasticsearch. Cluster creation no longer auto-installs Elastic
or the cloudhost-node-cluster-dns DaemonSet; build bootstrap stays automatic.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 16:55:51 +03:30
keyhan be2587dcf5 Use per-deploy preview hosts under the site root domain.
Build hosts as <userPrefix>-<deploymentNumber>-preview.<rootDomain> from FRONTEND_URL, wire them through ingress/TLS, and open them from the preview API.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-27 12:48:22 +03:30
keyhan 44ad1d63a0 Fix backend Elasticsearch connectivity for local dev and app logs.
Auto port-forward using the registered cluster kubeconfig, default to loopback outside Kubernetes, route log APIs by app cluster, and document platform env settings.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-27 11:51:51 +03:30
keyhan 3435eff256 Fix kubelet registry pulls via node cluster DNS and in-cluster mirrors.
Bootstrap configures systemd-resolved for *.cluster.local, installs k3s registries.yaml for the internal registry only, removes the legacy external-registry DaemonSet, and aligns Helm REGISTRY_PULL_URL with the in-cluster registry URL.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-27 11:36:07 +03:30
keyhan 20c4184cde Generate random platform subdomains for apps without custom domains.
Assign unpredictable subdomains on create when no custom domain is set, and update deploy UI CNAME hints to reference the app Platform Domain after creation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-26 19:55:44 +03:30
keyhan d7594df9a0 Use in-cluster registry for builds and deploys; improve logging and cluster ops.
Remove external registry Ingress (repo.3fase.ir) and route Kaniko push and app pulls through the internal ClusterIP registry. Add RegistryService, ensure StorageClass and pull secrets on deploy, make Elasticsearch install/repair more resilient, and add per-cluster Deploy Elastic controls in admin UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-26 19:15:06 +03:30
keyhan 1ade52825c Open deploy progress immediately and improve delete row glass overlay.
Track in-progress deploys in the client store so the progress modal opens on click without waiting for the applications list refetch. Show deleting state as a blurred glass overlay on table rows and service cards instead of replacing row content.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 23:34:24 +03:30
keyhan dc9830383b Improve logging recovery, resource scaling, and app deploy logging.
Auto-reconnect Elasticsearch port-forward after cluster or API restarts, poll log status in the UI, and apply storage changes through billing upgrade for all workloads. Add Redis/RabbitMQ PVC resize, Helm ES credentials for Fluent Bit, and fix deploy progress overlay behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 21:41:00 +03:30
keyhan bf9e827f85 Add cloudhost-platform Helm chart and registry ingress manifests.
Deploy backend, frontend, PostgreSQL, and Redis on Kubernetes with optional Ingress/TLS, SQL migration hooks, and public registry exposure at repo.3fase.ir.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-24 19:01:05 +03:30
keyhan abbe821d91 Improve delete UX and prepaid credit time display.
Show minutes and local expiry for resource credits; add shared delete hook with row/card loading overlays, detail-page deleting modal, and disabled controls to prevent double-delete.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-24 00:33:16 +03:30
keyhan 695e05f948 Add managed databases and services with billing-aligned upgrades.
Introduce product types for managed PostgreSQL, Redis, and RabbitMQ with a dedicated dashboard, Helm-only deploy pipeline, external access, snapshots with progress, and prorated resource or storage upgrades matching application billing rules. PVCs use an expandable StorageClass with automatic migration when legacy disks cannot resize in place.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-23 19:00:09 +03:30
keyhan 736509708b Add persistent deployment progress bar with minimize support.
Deployments can continue in the background via a dashboard progress bar; tables use truncation and admin migration status for cleaner layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-19 22:41:31 +03:30
keyhan 18c6abd0e8 Add service credential visibility.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-19 00:35:01 +03:30
keyhan 41a276d16d Add application migration workflow.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-19 00:31:29 +03:30
keyhan fda8384a5c Improve cluster allocation strategy.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-18 23:18:50 +03:30
keyhan 72a1519ea0 Add automatic cluster pool allocation.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-18 23:08:06 +03:30
keyhan 97e4c865b6 Require paid access before redeploy.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-18 22:37:13 +03:30
keyhan e4fe8f63cb Hide stop action for failed apps.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-18 22:31:21 +03:30
keyhan 68d1ccb196 Track cancelled deployments separately.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-18 22:15:43 +03:30
keyhan d5e6ab0f68 Add invoice PDF download and unified payment.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-18 22:01:44 +03:30
keyhan 8b197e69bc Add invoice payment management.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-18 21:34:47 +03:30
keyhan 880521c576 Wait for all app workloads before marking deployments running.
Deployment success now reflects readiness across the application, database, and enabled add-on workloads so scheduling or resource failures do not appear as a running app.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-18 19:46:20 +03:30
keyhan a7293973d5 Add staff password reset, raise code upload limit, and guard restore sizing.
Admins and technical staff can reset passwords via PATCH /users/:id/password with scoped permissions for technical users; deploy/source uploads allow up to 10GiB and block deploy when allocated storage is smaller than uploaded archive or DB dump, with an inline error modal.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-16 01:03:07 +03:30
keyhan 67b41ae311 Align admin optional-services billing UI with runtimes and bill RAM proportionally.
Split optional pricing vs deploy defaults and move custom domain to its own card; parse Mi as decimal GB so fractional memory scales linearly with per-GB rates. Deploy wizard hides env and optional services for WordPress and sanitizes create payloads.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-16 00:39:37 +03:30
keyhan 3a4fffcec4 Reorder deploy wizard: env vars on step 1, app storage on step 3.
Move Environment Variables to Basic Info and Application Data Storage to Resources so users configure them earlier and later in the flow.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-15 19:30:30 +03:30
keyhan 055e7a7c8d Add optional service pricing matrix and fix admin catalog save.
Users pick per-service CPU/memory/storage at deploy; admins manage unit rates and deploy defaults. PATCH sends only fields accepted by the pricing-catalog DTO.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-15 19:16:20 +03:30
keyhan bb27c90ae4 Make billing catalog dynamic for all runtimes and bill optional service resources.
Derive admin tabs and addon rows from enums, and add Redis/RabbitMQ/ES CPU/RAM/disk to deploy cost using the app runtime unit rates.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-15 18:22:35 +03:30
keyhan 35235fe0fc Replace billing plans with per-runtime usage pricing catalog.
Store explicit hourly/monthly/yearly rates in pricing_rates and addon_rates, compute deploy costs without cycle conversion, and simplify admin UI and wallet payment to cycle-only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-15 18:10:54 +03:30
keyhan 5239e8aa94 Add prepaid resource credits with prorated deploy billing.
When users delete an app before plan expiry, remaining resources become credits for a new deploy. The deploy calculator shows covered vs additional charges, prices optional services correctly, and prorates extras to days left on the credit.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-15 17:37:44 +03:30
keyhan 35dd771f63 Add unified logs platform with Helm-managed central Elasticsearch.
Deploy cloudhost-logging on cluster registration, ship app and optional service logs to ES with owner isolation, and fix Kibana 8.12 auth via kibana_system.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-15 15:56:33 +03:30