Where the project came from
MistyCloud is a commercial platform for selling hosting services: game servers, web hosting, and VPS. The backend is the central hub of the entire system — it handles authentication and authorization (three roles: client, support, admin), a multi-currency wallet system (PLN, USD, EUR), automatic game server provisioning via Pelican Panel API, payment processing via Stripe with webhook handling, real-time WebSocket communication (server console), and transactional emails via Nodemailer.
What was hard
A hosting platform requires many complex integrations running reliably simultaneously: automatic server creation and configuration via external API, payment processing with Stripe webhooks, a multi-currency wallet with automatic service suspension and termination after non-payment (7-day grace period), a real-time server console — all of it must work consistently, securely, and resiliently.
How I solved it
Modular NestJS architecture with clearly separated domain modules (Auth, Wallet, Servers, Products, Billing, Pelican, Email, Console, etc.). Prisma as ORM provides type-safe PostgreSQL access and clear schema migrations. Socket.IO handles the real-time server console. Stripe webhooks synchronize payment status. better-auth provides session-based authentication without JWT pitfalls. Sentry monitors production errors.
Result
A complete, production-running backend serving three types of hosting services, automatic provisioning via Pelican API, a Stripe payment system with subscription and webhook handling, a multi-currency wallet with automatic service suspension, and a real-time server console accessible from the browser.