Skip to content

gvps-cloud/skypanelv2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

547 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SkyPanelV2

zread License: MIT TypeScript React Node.js Vite PostgreSQL

πŸš€ SkyPanelV2 - Cloud Service Billing Platform

SkyPanelV2 is an open-source, white-label cloud service billing panel that provides a complete control plane for cloud hosting businesses. It enables service providers to offer VPS hosting services through a unified interface with integrated billing, customer management, and comprehensive administrative tools.

⚠️ Important: This is a standalone billing and management platform, NOT a reseller panel. You must have your own infrastructure provider accounts (Linode, etc.) to use this system.

🎯 What Makes SkyPanelV2 Different?

Unlike traditional reseller panels, SkyPanelV2 gives you complete control over your cloud business:

  • White-label branding - Your company, your identity
  • Direct infrastructure access - Connect directly to providers like Linode
  • Custom pricing models - Set your own rates and margins
  • Automated billing - Hourly billing with wallet-based payments
  • Multi-tenant architecture - Serve multiple customers from one platform

πŸ“‹ Table of Contents


πŸ—οΈ Architecture Overview

πŸ“– What is SkyPanelV2?

SkyPanelV2 is a complete billing and management platform for cloud service providers. Think of it as your own "DigitalOcean" or "Linode dashboard" - but white-labeled and controlled by you.

Key Concept: You own the customer relationship, billing, and branding. We provide the platform to manage infrastructure, billing, and customer operations.

🎯 Business Model

How You Make Money:

Your Cost from Provider β†’ Your Markup β†’ Customer Price
Example: $5/month Linode β†’ +$5 Your Margin β†’ $10/month to Customer

Revenue Streams:

  • VPS Hosting: Resell cloud infrastructure with your pricing
  • Backup Services: Additional revenue from backup configurations
  • Wallet Prepayments: Customers preload wallets β†’ better cash flow
  • Value-Added Services: SSH access, monitoring, support

System Architecture Diagram

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        Frontend Layer                           β”‚
β”‚  React 18 + TypeScript + Vite + shadcn/ui + TanStack Query     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚  β”‚   Customer   β”‚  β”‚    Admin     β”‚  β”‚   Public     β”‚         β”‚
β”‚  β”‚   Portal     β”‚  β”‚   Dashboard  β”‚  β”‚    Pages     β”‚         β”‚
β”‚  β”‚              β”‚  β”‚              β”‚  β”‚              β”‚         β”‚
β”‚  β”‚ - VPS Mgmt   β”‚  β”‚ - User Mgmt  β”‚  β”‚ - Login      β”‚         β”‚
β”‚  β”‚ - Billing    β”‚  β”‚ - System     β”‚  β”‚ - Register   β”‚         β”‚
β”‚  β”‚ - Console    β”‚  β”‚   Config     β”‚  β”‚ - Pricing    β”‚         β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            ↓ HTTP/WebSocket
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      Backend API Layer                          β”‚
β”‚                  Express.js + TypeScript                        β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚  β”‚   Auth   β”‚  β”‚   VPS    β”‚  β”‚ Billing  β”‚  β”‚  Admin   β”‚      β”‚
β”‚  β”‚ Middlewareβ”‚  β”‚ Servicesβ”‚  β”‚ Services β”‚  β”‚ Routes   β”‚      β”‚
β”‚  β”‚          β”‚  β”‚          β”‚  β”‚          β”‚  β”‚          β”‚      β”‚
β”‚  β”‚ - JWT    β”‚  β”‚ - Create β”‚  β”‚ - Wallet β”‚  β”‚ - Users  β”‚      β”‚
β”‚  β”‚ - RBAC   β”‚  β”‚ - Monitorβ”‚  β”‚ - Hourly β”‚  β”‚ - Orgs   β”‚      β”‚
β”‚  β”‚ - Rate   β”‚  β”‚ - SSH    β”‚  β”‚ - Invoicesβ”‚  β”‚ - Plans  β”‚      β”‚
β”‚  β”‚   Limit  β”‚  β”‚   Bridge β”‚  β”‚          β”‚  β”‚          β”‚      β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Data & Services Layer                        β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”‚
β”‚  β”‚  PostgreSQL  β”‚  β”‚   WebSocket  β”‚  β”‚  External    β”‚        β”‚
β”‚  β”‚   Database   β”‚  β”‚   SSH Bridge β”‚  β”‚   APIs       β”‚        β”‚
β”‚  β”‚              β”‚  β”‚              β”‚  β”‚              β”‚        β”‚
β”‚  β”‚ - Users      β”‚  β”‚ - Real-time  β”‚  β”‚ - Linode     β”‚        β”‚
β”‚  β”‚ - VPS Inst.  β”‚  β”‚   Terminal  β”‚  β”‚ - PayPal     β”‚        β”‚
β”‚  β”‚ - Billing    β”‚  β”‚ - Activity   β”‚  β”‚ - SMTP2GO    β”‚        β”‚
β”‚  β”‚ - Wallets    β”‚  β”‚   Streams    β”‚  β”‚              β”‚        β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β”‚
β”‚                     (Your Infrastructure + Payment Providers)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ”§ Core Components Breakdown

1. Frontend Layer (User Interface)

What it does: Everything your users see and interact with

Key Components:

  • Customer Portal: Where users manage their VPS instances, view bills, access console
  • Admin Dashboard: Where you manage users, configure system, view analytics
  • Public Pages: Login, registration, pricing (can be white-labeled)

How it works:

User Action β†’ React Component β†’ API Call β†’ Show Response
     ↓              ↓                ↓           ↓
  Click Button  Update State  Backend Process  Update UI

2. Backend API Layer (Business Logic)

What it does: Processes requests, enforces rules, talks to external services

Key Services:

  • Authentication: Validates users, issues tokens, controls access
  • VPS Services: Creates/destroys VPS instances, manages operations
  • Billing Services: Calculates costs, processes payments, manages wallets
  • Admin Services: User management, system configuration, reporting

How it works:

API Request β†’ Middleware β†’ Route Handler β†’ Service Layer β†’ Response
     ↓            ↓            ↓               ↓           ↓
  User Action  Validate    Execute      Business Logic  Return Data
              Auth/Rules   Endpoint     + Database

3. Data & Services Layer (Storage & Integration)

What it does: Stores data and connects to external services

Key Components:

  • PostgreSQL Database: All persistent data (users, VPS instances, billing)
  • External APIs: Linode (VPS infrastructure), PayPal (payments), SMTP (email)
  • WebSocket Bridge: Real-time SSH terminal access to VPS instances

How it works:

Service Layer β†’ Database Query β†’ PostgreSQL β†’ Return Results
      ↓                ↓                ↓            ↓
  Need Data    SQL Query +       Execute      Process &
               Parameters        Query        Return

πŸ”„ How It Works: Complete Flow Examples

1. Customer Registration & First VPS Creation

Step 1: Registration
─────────────────────
User β†’ Sign Up Form β†’ POST /api/auth/register
                                  ↓
                          Create User Record
                                  ↓
                          Generate JWT Token
                                  ↓
                          Send Welcome Email
                                  ↓
                          Return Token + User Data

Step 2: Add Funds to Wallet
────────────────────────────
User β†’ Add Funds β†’ PayPal Payment β†’ POST /api/payments/create
                                            ↓
                                    Create PayPal Order
                                            ↓
                                    User Completes Payment
                                            ↓
                                    PayPal Webhook Confirmation
                                            ↓
                                    Update Wallet Balance
                                            ↓
                                    Send Confirmation Email

Step 3: Create VPS Instance
───────────────────────────
User β†’ Select Plan β†’ POST /api/vps/instances
                                  ↓
                          Validate Wallet Balance
                                  ↓
                          Call Linode API
                                  ↓
                          Create VPS Instance
                                  ↓
                          Save Instance Record
                                  ↓
                          Setup SSH Bridge
                                  ↓
                          Start Hourly Billing
                                  ↓
                          Send Provisioning Email

2. Hourly Billing Process

Every Hour:
───────────
Cron Job β†’ Active VPS Instances β†’ Calculate Hourly Cost
              ↓                            ↓
      For Each Instance              Plan Hourly Rate
              ↓                            ↓
      Deduct from Wallet        Γ—   Hours Since Last Billing
              ↓                            ↓
      Create Transaction Record
              ↓
      Update Instance Last Billing
              ↓
      Check Low Balance β†’ Send Warning if Needed
              ↓
      Generate Invoice (if billing period complete)

3. Real-Time SSH Terminal Access

User β†’ Open Console β†’ WebSocket Connection
                            ↓
                    Authenticate User + Instance
                            ↓
                    Establish SSH Connection to VPS
                            ↓
                    Bridge WebSocket ↔ SSH
                            ↓
                    Real-time Terminal in Browser
                            ↓
                    Handle Terminal Resize, Copy/Paste
                            ↓
                    Clean up Connection on Close

4. Admin User Management

Admin β†’ User Management β†’ GET /api/admin/users
                              ↓
                      Fetch Users with Pagination
                              ↓
                      Display in Data Table
                              ↓
Admin β†’ Click User β†’ GET /api/admin/users/:id
                              ↓
                      Fetch User Details + Resources
                              ↓
                      Show Impact Analysis (VPS, Billing, Orgs)
                              ↓
Admin β†’ Edit User β†’ PUT /api/admin/users/:id
                              ↓
                      Validate Changes
                              ↓
                      Update User Record
                              ↓
                      Audit Log Entry
                              ↓
                      Send Notification (if applicable)

🎨 Key Design Patterns

Service Layer Pattern

API Routes β†’ Services β†’ Database
     ↓          ↓          ↓
  Thin    Business Logic  Data Access
Layer     & Rules        & Queries

Benefits: Reusable logic, easy testing, clear separation

Repository Pattern

Service β†’ Repository β†’ Database
   ↓           ↓           ↓
Business  Data Access  SQL Queries
Logic     Abstraction   & Connection

Benefits: Database abstraction, easier migration, testable

Observer Pattern (Real-time Updates)

Database Event β†’ PostgreSQL LISTEN/NOTIFY β†’ Server-Sent Events β†’ Client Update

Benefits: Real-time UI updates, efficient, scalable

Middleware Pattern (Request Processing)

Request β†’ Auth Middleware β†’ Rate Limit β†’ Validation β†’ Route Handler β†’ Response

Benefits: Reusable request processing, security, validation

Technology Stack

Frontend

  • React 18 - Modern component-based UI framework
  • TypeScript - Type-safe development
  • Vite - Lightning-fast build tool and dev server
  • TanStack Query - Powerful server state management
  • Zustand - Lightweight client state management
  • React Router v7 - Client-side routing with protection
  • shadcn/ui - Beautiful, accessible component library
  • Tailwind CSS - Utility-first styling
  • React Hook Form + Zod - Form handling and validation

Backend

  • Node.js 20+ - JavaScript runtime
  • Express.js - Fast, minimalist web framework
  • TypeScript - End-to-end type safety
  • PostgreSQL - Robust relational database
  • JWT - Secure authentication
  • WebSocket - Real-time SSH terminal access
  • SSH2 - SSH protocol implementation

Integrations

  • Linode/Akamai API - VPS infrastructure management
  • PayPal REST SDK - Payment processing
  • SMTP2GO - Email notifications
  • PostgreSQL LISTEN/NOTIFY - Real-time database events

✨ Key Features

πŸ–₯️ VPS Management

  • Provider Integration: Direct Linode/Akamai API integration with normalized operations
  • SSH Console Access: Browser-based terminal with WebSocket bridge for real-time VPS access
  • Automated Provisioning: One-click VPS deployment with configurable specifications
  • Backup Management: Flexible backup options (daily/weekly/none) with custom pricing
  • Real-time Monitoring: Live status updates and resource usage tracking
  • Plan Management: Customizable VPS plans with provider-specific configurations

πŸ’° Billing & Payments

  • Wallet System: Prepaid wallet with automatic balance deduction
  • Hourly Billing: Automated hourly billing with detailed usage tracking
  • PayPal Integration: Seamless payment processing with PayPal REST API
  • Invoice Generation: Automatic invoice creation with PDF downloads
  • Payment History: Complete transaction history with detailed breakdowns
  • Usage Analytics: Resource usage monitoring and cost analysis

πŸ‘₯ User & Organization Management

  • Multi-tenant Architecture: Organization-based data separation and access control
  • Role-based Permissions: Admin, owner, and member roles with granular permissions
  • Advanced User Management: Comprehensive admin interface with enhanced error handling
  • Organization Workflows: Complete CRUD operations with validation and safety checks
  • Member Management: Add, edit, and remove organization members with role controls
  • Impersonation: Admin capability to impersonate users for support

πŸ” Security & Authentication

  • JWT Authentication: Secure token-based authentication with configurable expiration
  • Rate Limiting: Tiered API rate limits (anonymous/authenticated/admin)
  • Password Security: Bcrypt hashing with secure reset workflows
  • Access Control: Role-based access control throughout the application
  • Audit Logging: Comprehensive activity tracking for security and compliance

🎨 White-Label & Branding

  • Complete Customization: Environment-driven branding configuration
  • Theme System: Multiple theme presets with custom color schemes
  • Provider Abstraction: Hide upstream provider names from end users
  • Custom Domain Support: Full white-label experience for your brand

⚑ Real-Time Features

  • Live Notifications: PostgreSQL LISTEN/NOTIFY with Server-Sent Events
  • SSH Terminal: Real-time terminal access with WebSocket bridge
  • Activity Feeds: Live activity streams for all system events
  • Status Updates: Real-time VPS status and resource monitoring

πŸ› οΈ Admin Features

  • Dashboard: System overview with key metrics and quick actions
  • User Management: Enhanced user CRUD with resource impact analysis
  • Organization Management: Advanced modal-based UI with comprehensive validation
  • Provider Configuration: Multi-provider setup with API token management
  • Platform Settings: System configuration, themes, and branding options
  • Support System: Ticket management and customer support tools
  • FAQ Management: Help documentation and knowledge base

πŸ“± Modern UI/UX

  • Responsive Design: Mobile-first approach with adaptive layouts
  • Accessibility: ARIA-compliant components with keyboard navigation
  • Dark/Light Themes: Multiple theme presets with system preference detection
  • Modal-based Interactions: Enhanced dialogs with proper validation feedback
  • Drag & Drop: Intuitive interfaces for configuration management
  • Loading States: Proper loading indicators and error handling

πŸ‘¨β€πŸ’» Developer Experience

  • TypeScript: End-to-end type safety across frontend and backend
  • Hot Reload: Fast development with Vite HMR and Nodemon
  • API Documentation: Comprehensive API reference with examples
  • Testing Suite: Vitest, React Testing Library, and Supertest
  • Code Quality: ESLint, TypeScript strict mode, and automated formatting
  • Database Migrations: Versioned schema management with rollback support

🎯 Use Cases & Scenarios

Who Should Use SkyPanelV2?

1. IT Service Providers

  • Scenario: You manage IT infrastructure for small businesses
  • Use Case: Offer branded VPS hosting services to your clients
  • Benefit: Additional revenue stream, better client retention

2. Web Agencies & Developers

  • Scenario: You build websites and need hosting for clients
  • Use Case: Provide managed hosting as part of your service packages
  • Benefit: Complete control over client environments, recurring revenue

3. MSPs (Managed Service Providers)

  • Scenario: You provide comprehensive IT services
  • Use Case: Bundle VPS hosting with your existing services
  • Benefit: One platform for all client services, simplified billing

4. Hosting Resellers

  • Scenario: You want to start a hosting business
  • Use Case: Launch your own branded hosting service
  • Benefit: No infrastructure costs, focus on sales and support

5. Startups & SaaS Companies

  • Scenario: You need hosting for your application clients
  • Use Case: Offer hosting as part of your platform
  • Benefit: Additional revenue, better customer experience

Real-World Scenarios

Scenario 1: Freelancer Hosting Clients

Before SkyPanelV2:
- Client asks for hosting β†’ You buy VPS from Linode β†’ Client pays you manually
- No proper billing, no dashboard, manual everything

After SkyPanelV2:
- Client signs up on your branded portal
- Client selects plan and pays via PayPal
- VPS automatically provisioned
- Hourly billing deducts from wallet
- Client manages their own VPS
- You focus on support, not administration

Scenario 2: Agency Client Onboarding

New Website Project:
1. Create client organization in admin panel
2. Add client team members with appropriate roles
3. Create VPS instance for staging environment
4. Client tests staging site
5. Create production VPS instance
6. Client funds wallet for monthly billing
7. Automated billing handles everything
8. Client has self-service portal

Scenario 3: Scaling Your Hosting Business

Growth Phases:

Phase 1 (Startup):
- 10-20 clients
- Manual onboarding
- Basic VPS plans
- PayPal payments only

Phase 2 (Growth):
- 50-100 clients
- Automated onboarding
- Multiple plan tiers
- Advanced billing features
- Client self-service

Phase 3 (Scale):
- 100+ clients
- Multiple payment gateways
- Advanced features
- White-label mobile app
- API integrations

πŸ“Š Data Flow & State Management

Frontend State Management

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Client State (Zustand)                   β”‚
β”‚  - User authentication status                              β”‚
β”‚  - Theme preferences                                       β”‚
β”‚  - UI states (modals, sidebars)                            β”‚
β”‚  - Temporary form data                                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                 Server State (TanStack Query)              β”‚
β”‚  - VPS instances and status                                β”‚
β”‚  - Wallet balance and transactions                         β”‚
β”‚  - User profiles and organizations                         β”‚
β”‚  - System configuration and settings                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      Backend API                            β”‚
β”‚  - Express.js routes                                       β”‚
β”‚  - Service layer business logic                            β”‚
β”‚  - Database queries                                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    PostgreSQL Database                      β”‚
β”‚  - Persistent data storage                                 β”‚
β”‚  - ACID transactions                                       β”‚
β”‚  - Real-time events (LISTEN/NOTIFY)                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Real-Time Data Sync

Database Change β†’ PostgreSQL NOTIFY β†’ Server-Sent Events β†’ Client Update
     ↓                  ↓                    ↓                 ↓
User Creates VPS   Trigger fires      SSE sends event    UI updates
Record            Notification        to connected       automatically
                  to channel          clients

πŸ” Security Architecture

Authentication & Authorization

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Authentication Flow                       β”‚
β”‚                                                             β”‚
β”‚  1. User Login β†’ POST /api/auth/login                      β”‚
β”‚  2. Validate credentials β†’ Users table                     β”‚
β”‚  3. Generate JWT token β†’ Contains user ID, role, org ID    β”‚
β”‚  4. Return token to client                                 β”‚
β”‚  5. Client stores token β†’ localStorage/cookie              β”‚
β”‚  6. All subsequent requests β†’ Include JWT in headers       β”‚
β”‚                                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Authorization Flow                        β”‚
β”‚                                                             β”‚
β”‚  Protected Request β†’ JWT Middleware β†’ Extract User Context β”‚
β”‚                           ↓                                β”‚
β”‚                    Role-Based Access Control               β”‚
β”‚                           ↓                                β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚  β”‚ Role Permissions:                              β”‚      β”‚
β”‚  β”‚ - Admin: Full system access                    β”‚      β”‚
β”‚  β”‚ - Owner: Organization management               β”‚      β”‚
β”‚  β”‚ - Member: Limited access within organization   β”‚      β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β”‚                           ↓                                β”‚
β”‚              Allow/Deny Request β†’ 403 if unauthorized      β”‚
β”‚                                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Rate Limiting Strategy

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Tiered Rate Limiting                      β”‚
β”‚                                                             β”‚
β”‚  Anonymous Users:    200 requests / 15 minutes              β”‚
β”‚  Authenticated:      500 requests / 15 minutes              β”‚
β”‚  Admin Users:       1000 requests / 15 minutes              β”‚
β”‚                                                             β”‚
β”‚  Implementation:                                             β”‚
β”‚  - Redis-backed counters (in production)                    β”‚
β”‚  - IP-based identification for anonymous                   β”‚
β”‚  - User-based for authenticated                             β”‚
β”‚  - Sliding window algorithm                                 β”‚
β”‚  - Custom limits per endpoint type                          β”‚
β”‚                                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Protection

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Encryption Layers                         β”‚
β”‚                                                             β”‚
β”‚  1. Data at Rest:                                           β”‚
β”‚     - SSH credentials: AES-256 encryption                   β”‚
β”‚     - API tokens: AES-256 encryption                        β”‚
β”‚     - Environment variables: Encrypted storage              β”‚
β”‚                                                             β”‚
β”‚  2. Data in Transit:                                        β”‚
β”‚     - HTTPS/TLS for all communications                      β”‚
β”‚     - WebSocket over secure connection (WSS)                β”‚
β”‚     - Database connection over SSL                          β”‚
β”‚                                                             β”‚
β”‚  3. Authentication:                                         β”‚
β”‚     - Passwords: Bcrypt hashing                             β”‚
β”‚     - JWT tokens: Signed with secret key                    β”‚
β”‚     - Session management: Secure cookies                   β”‚
β”‚                                                             β”‚
β”‚  4. Audit Trail:                                            β”‚
β”‚     - All admin actions logged                              β”‚
β”‚     - User activity tracking                                β”‚
β”‚     - Failed authentication attempts                        β”‚
β”‚                                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Project Structure

skypanelv2/
β”œβ”€β”€ api/                          # Backend API (Express.js)
β”‚   β”œβ”€β”€ routes/                   # API route definitions
β”‚   β”‚   β”œβ”€β”€ admin/               # Admin-only endpoints
β”‚   β”‚   β”œβ”€β”€ auth.ts              # Authentication routes
β”‚   β”‚   β”œβ”€β”€ vps.ts               # VPS management
β”‚   β”‚   β”œβ”€β”€ payments.ts          # Payment processing
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ services/                # Business logic layer
β”‚   β”‚   β”œβ”€β”€ vpsService.ts        # VPS operations
β”‚   β”‚   β”œβ”€β”€ billingService.ts    # Billing logic
β”‚   β”‚   β”œβ”€β”€ emailService.ts      # Email notifications
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ middleware/              # Express middleware
β”‚   β”‚   β”œβ”€β”€ auth.ts              # JWT authentication
β”‚   β”‚   β”œβ”€β”€ rateLimiting.ts      # API rate limiting
β”‚   β”‚   └── security.ts          # Security headers
β”‚   β”œβ”€β”€ lib/                     # Utility libraries
β”‚   β”‚   β”œβ”€β”€ database.ts          # Database helper
β”‚   β”‚   β”œβ”€β”€ crypto.ts            # Encryption utilities
β”‚   β”‚   └── validation.ts        # Input validation
β”‚   └── server.ts                # Server entry point
β”œβ”€β”€ src/                          # Frontend (React)
β”‚   β”œβ”€β”€ components/              # React components
β”‚   β”‚   β”œβ”€β”€ ui/                 # shadcn/ui base components
β”‚   β”‚   β”œβ”€β”€ admin/              # Admin-specific components
β”‚   β”‚   β”œβ”€β”€ layouts/            # Layout components
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ pages/                   # Page components
β”‚   β”œβ”€β”€ contexts/                # React contexts (Auth, Theme)
β”‚   β”œβ”€β”€ services/                # API client services
β”‚   β”œβ”€β”€ lib/                     # Frontend utilities
β”‚   β”‚   β”œβ”€β”€ api.ts              # API client
β”‚   β”‚   β”œβ”€β”€ validation.ts       # Form validation schemas
β”‚   β”‚   └── ...
β”‚   └── main.tsx                 # React entry point
β”œβ”€β”€ migrations/                   # Database migrations
β”‚   β”œβ”€β”€ 001_initial_schema.sql
β”‚   β”œβ”€β”€ 002_*.sql
β”‚   └── ...
β”œβ”€β”€ scripts/                     # Utility scripts
β”‚   β”œβ”€β”€ generate-ssh-secret.js   # Generate encryption keys
β”‚   β”œβ”€β”€ run-migration.js         # Apply migrations
β”‚   β”œβ”€β”€ create-test-admin.js     # Create admin users
β”‚   └── test-smtp.js             # Test email configuration
β”œβ”€β”€ public/                      # Static assets
└── package.json                 # Dependencies and scripts

πŸš€ Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

Required Accounts & API Keys

You'll need accounts with:

  • Linode/Akamai - For VPS infrastructure (get API token from account settings)
  • PayPal - For payment processing (create REST API credentials in developer dashboard)
  • SMTP2GO (optional) - For email notifications

Quick Start (5 Minutes)

1. Clone and Install

# Clone the repository
git clone https://github.com/skyvps360/skypanelv2.git
cd skypanelv2

# Install dependencies
npm install

2. Configure Environment

# Copy environment template
cp .env.example .env

# Generate encryption secret
node scripts/generate-ssh-secret.js

Edit .env and configure these essential variables:

# Database
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/skypanelv2

# Security
JWT_SECRET=your-super-secret-jwt-key-min-32-chars
SSH_CRED_SECRET=generated-by-script-above
ENCRYPTION_KEY=your-32-character-encryption-key

# PayPal (get from PayPal Developer Dashboard)
PAYPAL_CLIENT_ID=your-paypal-client-id
PAYPAL_CLIENT_SECRET=your-paypal-client-secret
PAYPAL_MODE=sandbox

# Linode (get from Linode Account Settings)
LINODE_API_TOKEN=your-linode-api-token

# Branding (optional)
VITE_COMPANY_NAME=Your Company Name
COMPANY_NAME=Your Company Name

3. Setup Database

# Reset database and apply migrations
npm run db:fresh

# Create admin user
npm run seed:admin

Default Admin Credentials:

  • Email: admin@skypanelv2.com
  • Password: admin123
  • ⚠️ Change these immediately in production!

4. Start Development Servers

# Start both frontend and backend
npm run dev

This starts:

5. Access Your Panel

  1. Open http://localhost:5173 in your browser
  2. Login with admin credentials
  3. Configure your Linode provider in Admin β†’ Providers
  4. Create VPS plans in Admin β†’ VPS Plans
  5. Start creating VPS instances!

Detailed Setup Guide

Database Configuration

PostgreSQL Setup:

# Create database
createdb skypanelv2

# Test connection
node scripts/test-connection.js

Apply Migrations:

# Apply all pending migrations
node scripts/run-migration.js

# Or use npm script
npm run db:fresh

PayPal Configuration

  1. Go to PayPal Developer Dashboard
  2. Create a new REST API app
  3. Copy Client ID and Secret to .env
  4. Set PAYPAL_MODE=sandbox for testing, live for production
  5. Configure webhook URL: https://your-domain.com/api/payments/webhook

Linode Configuration

  1. Go to Linode Account Settings
  2. Create a personal access token with these permissions:
    • Read/Write access to Linodes
    • Read access to Account, Networking, and Support
  3. Add token to .env as LINODE_API_TOKEN

Email Configuration (Optional)

# SMTP2GO Configuration
SMTP2GO_API_KEY=your-api-key
SMTP2GO_USERNAME=your-username
SMTP2GO_PASSWORD=your-password

# Test email configuration
node scripts/test-smtp.js

πŸ› οΈ Development Guide

Development Workflow

Starting Development Environment

# Start both frontend and backend (recommended)
npm run dev

# Or start individually
npm run client:dev    # Frontend only on port 5173
npm run server:dev    # Backend only on port 3001

What happens when you run npm run dev:

  • Vite dev server starts with hot module replacement
  • Express API server starts with auto-restart on file changes
  • Both servers watch for changes and reload automatically

Database Operations

# Reset database completely (with confirmation)
npm run db:reset

# Reset without confirmation prompt
npm run db:reset:confirm

# Fresh start: reset + apply all migrations
npm run db:fresh

# Create admin user
npm run seed:admin

Testing

# Run all tests once
npm run test

# Run tests in watch mode (during development)
npm run test:watch

# Type checking only
npm run check

# Lint code
npm run lint

Building

# Production build with TypeScript check
npm run build

# Preview production build locally
npm run preview

Development Tips

Frontend Development:

  • Use React DevTools for component debugging
  • Check Network tab for API calls and responses
  • TanStack Query DevTools for server state inspection
  • Browser console for client-side errors

Backend Development:

  • Use console.log for debugging (removed in production)
  • Check API responses in Postman or curl
  • Monitor database queries during development
  • Test API endpoints with proper authentication

Database Development:

  • Always use parameterized queries (no SQL injection)
  • Test migrations in development before production
  • Use transactions for multi-step operations
  • Backup database before major changes

Common Development Tasks

Adding a New API Endpoint:

  1. Create route in api/routes/
  2. Add business logic in api/services/
  3. Add authentication middleware if needed
  4. Update API documentation

Adding a New Frontend Page:

  1. Create page component in src/pages/
  2. Add route in src/App.tsx
  3. Add navigation link if needed
  4. Test authentication/authorization

Database Schema Changes:

  1. Create new migration file in migrations/
  2. Write SQL for schema changes
  3. Test migration in development
  4. Update TypeScript types if needed

Adding Environment Variables:

  1. Add to .env.example with documentation
  2. Add to .env with your values
  3. Reference in code via process.env.VAR_NAME
  4. Document in repo-docs/ENVIRONMENT_VARIABLES.md

Useful Scripts

Database Scripts:

node scripts/test-connection.js          # Test database connection
node scripts/run-migration.js            # Apply pending migrations
node scripts/generate-ssh-secret.js      # Generate encryption keys

Admin Scripts:

node scripts/create-test-admin.js        # Create admin user
node scripts/promote-to-admin.js         # Promote user to admin
node scripts/update-admin-password.js    # Change admin password

Testing Scripts:

node scripts/test-hourly-billing.js      # Test billing workflow
node scripts/test-smtp.js                # Test email configuration

File Structure Best Practices

Where to put things:

  • UI Components: src/components/
  • Page Components: src/pages/
  • API Routes: api/routes/
  • Business Logic: api/services/
  • Shared Types: Create shared types file
  • Utility Functions: src/lib/ or api/lib/
  • Database Queries: api/services/ or api/lib/

Naming Conventions:

  • Components: PascalCase (UserProfile.tsx)
  • Utilities: camelCase (formatCurrency.ts)
  • Services: camelCase with Service suffix (vpsService.ts)
  • API Routes: kebab-case (/vps-instances)

πŸš€ Deployment

Production Checklist

Before deploying to production, ensure you've completed these steps:

Security Setup

  • Strong JWT Secret - Use a 32+ character random string
  • Secure Database Password - Don't use default passwords
  • HTTPS/SSL - Configure valid TLS certificate
  • PayPal Live Credentials - Switch from sandbox to production
  • Environment Variables - Set NODE_ENV=production
  • Rate Limiting - Configure appropriate limits for your traffic
  • Database Backups - Set up automated backups

Configuration

  • Provider API Tokens - Use production tokens with proper permissions
  • Email Service - Configure production SMTP credentials
  • Domain Configuration - Set CLIENT_URL to your production domain
  • CORS Settings - Configure allowed origins
  • Trust Proxy - Set TRUST_PROXY=1 behind reverse proxy

Testing

  • Test Payment Flow - Verify PayPal integration works
  • Test VPS Creation - Ensure provider integration works
  • Test Email Delivery - Verify notifications are sent
  • Test Admin Panel - Check all admin functionality
  • Load Testing - Test with expected user load

Deployment Options

Option 1: PM2 on VPS (Recommended)

Prerequisites:

  • VPS with Ubuntu 20.04+ or similar
  • Node.js 20+ and PostgreSQL 12+
  • Domain name with DNS configured

Steps:

  1. Clone and Setup:
# Clone repository
git clone https://github.com/skyvps360/skypanelv2.git
cd skypanelv2

# Install dependencies
npm install

# Build production assets
npm run build
  1. Configure Environment:
# Copy and edit environment file
cp .env.example .env
nano .env

# Set production values
NODE_ENV=production
CLIENT_URL=https://your-domain.com
  1. Setup Database:
# Apply migrations
npm run db:fresh

# Create admin user
npm run seed:admin
  1. Start with PM2:
# Install PM2 globally
npm install -g pm2

# Start application
npm run pm2:start

# Monitor processes
pm2 monit
pm2 logs skypanelv2
  1. Configure SSL with Caddy:
# Setup Caddy reverse proxy
sudo bash scripts/setup-caddy-ssl.sh \
  --domain panel.yourdomain.com \
  --email admin@yourdomain.com \
  --install-caddy

Option 2: Docker Deployment

# Dockerfile example
FROM node:20-alpine

WORKDIR /app

# Install dependencies
COPY package*.json ./
RUN npm ci --only=production

# Build application
COPY . .
RUN npm run build

# Expose ports
EXPOSE 3001 5173

# Start application
CMD ["npm", "start"]
# Build and run
docker build -t skypanelv2 .
docker run -p 3001:3001 -p 5173:5173 --env-file .env skypanelv2

Option 3: Cloud Platforms

Vercel (Frontend) + Separate Backend:

# Deploy frontend to Vercel
vercel --prod

# Deploy backend to your preferred VPS provider

DigitalOcean App Platform:

  1. Connect your GitHub repository
  2. Configure build settings
  3. Set environment variables
  4. Deploy

Monitoring & Maintenance

Health Checks:

# Check application health
curl https://your-domain.com/api/health

# Check PM2 status
pm2 list
pm2 logs

Database Backups:

# Manual backup
pg_dump skypanelv2 > backup_$(date +%Y%m%d).sql

# Automated backup (add to crontab)
0 2 * * * pg_dump skypanelv2 > /backups/db_$(date +\%Y\%m\%d).sql

Log Management:

# View logs
pm2 logs skypanelv2

# Clear logs
pm2 flush

# Log rotation (configure in PM2 ecosystem)

Updates:

# Pull latest changes
git pull origin main

# Install new dependencies
npm install

# Rebuild
npm run build

# Restart PM2
npm run pm2:reload

Troubleshooting Production Issues

Application Won't Start:

  • Check environment variables are set correctly
  • Verify database connection is accessible
  • Check ports are not already in use
  • Review PM2 logs: pm2 logs

Database Connection Issues:

  • Verify PostgreSQL is running
  • Check database credentials in .env
  • Ensure database exists and migrations are applied
  • Test connection: node scripts/test-connection.js

Payment Processing Issues:

  • Verify PayPal credentials are correct for production
  • Check webhook URLs are accessible
  • Ensure IPN/ webhook notifications are reaching your server
  • Test PayPal connection in provider settings

VPS Provisioning Issues:

  • Verify Linode API token has correct permissions
  • Check provider configuration in admin panel
  • Test API connection in provider settings
  • Review Linode account limits and quotas

Performance Issues:

  • Check database query performance
  • Verify rate limiting is configured properly
  • Monitor resource usage with PM2
  • Consider upgrading server resources

πŸ“š Documentation

API Documentation

Core API References:

Feature Documentation:

Configuration Guides

Architecture Documentation

Additional Resources


πŸ§ͺ Testing & Quality Assurance

Test Overview

SkyPanelV2 includes comprehensive testing at multiple levels:

Unit Tests:

  • Component logic and utilities
  • Validation schemas and rules
  • Service layer business logic
  • API endpoint testing

Integration Tests:

  • Database operations and migrations
  • API authentication and authorization
  • Payment processing workflows
  • VPS provisioning operations

Component Tests:

  • UI component behavior and interactions
  • Form validation and error handling
  • User workflows and navigation
  • Accessibility testing

Running Tests

# Run all tests once
npm run test

# Run tests in watch mode (development)
npm run test:watch

# Run specific test file
npm test -- vps.test.ts

# Run tests with coverage
npm test -- --coverage

Test Structure

tests/
β”œβ”€β”€ unit/              # Unit tests
β”‚   β”œβ”€β”€ components/   # Component logic tests
β”‚   β”œβ”€β”€ services/     # Service layer tests
β”‚   └── utils/        # Utility function tests
β”œβ”€β”€ integration/       # Integration tests
β”‚   β”œβ”€β”€ api/          # API endpoint tests
β”‚   └── database/     # Database operation tests
└── e2e/              # End-to-end tests
    └── scenarios/    # User workflow tests

Quality Checks

# Type checking
npm run check

# Linting
npm run lint

# Fix linting issues
npm run lint -- --fix

# Build verification
npm run build

🀝 Contributing

How to Contribute

We welcome contributions from the community! Here's how you can help:

  1. Fork the Repository

    # Fork on GitHub and clone your fork
    git clone https://github.com/your-username/skypanelv2.git
    cd skypanelv2
  2. Set Up Development Environment

    # Install dependencies
    npm install
    
    # Setup environment
    cp .env.example .env
    # Configure your .env file
    
    # Setup database
    npm run db:fresh
    npm run seed:admin
  3. Create Your Feature Branch

    git checkout -b feature/your-feature-name
  4. Make Your Changes

    • Write clean, documented code
    • Follow existing code patterns
    • Add tests for new functionality
    • Update documentation as needed
  5. Test Your Changes

    # Run tests
    npm run test
    
    # Type checking
    npm run check
    
    # Linting
    npm run lint
  6. Commit Your Changes

    git add .
    git commit -m "feat: add your feature description"
  7. Push and Create Pull Request

    git push origin feature/your-feature-name
    # Create PR on GitHub

Contribution Guidelines

Code Style:

  • Follow TypeScript best practices
  • Use meaningful variable and function names
  • Add comments for complex logic
  • Maintain consistent formatting

Testing:

  • Write tests for new features
  • Ensure all tests pass before submitting
  • Test across different browsers and devices
  • Verify accessibility compliance

Documentation:

  • Update README for user-facing changes
  • Add API documentation for new endpoints
  • Document complex business logic
  • Update configuration guides

Pull Request Best Practices:

  • Provide clear description of changes
  • Link related issues
  • Include screenshots for UI changes
  • Ensure CI/CD checks pass

Areas Where We Need Help

High Priority:

  • Additional cloud provider integrations (DigitalOcean, AWS, etc.)
  • Enhanced monitoring and analytics
  • Performance optimization
  • Security enhancements
  • Documentation improvements

Medium Priority:

  • Additional payment gateways (Stripe, etc.)
  • Enhanced reporting and dashboards
  • Mobile app development
  • API integrations and webhooks
  • Automation features

Low Priority:

  • UI/UX improvements
  • Accessibility enhancements
  • Translation and internationalization
  • Community plugins and extensions

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ’– Support

Getting Help

Documentation:

Community:

  • Open an issue on GitHub
  • Join our discussions
  • Check existing issues and PRs

Professional Support:

  • Contact us for enterprise support
  • Custom development services
  • Integration assistance

🌟 Acknowledgments

Built by skyvps360 for the open-source community.

Special Thanks To:

  • All contributors who have helped make SkyPanelV2 better
  • The open-source community for amazing tools and libraries
  • Early adopters who provide valuable feedback
  • Cloud providers who make VPS hosting accessible

Built With:

  • React and the amazing React community
  • The Vite team for the incredible build tool
  • shadcn for the beautiful component library
  • TanStack for the powerful state management
  • All other open-source maintainers and contributors

πŸ“ž Contact


⭐ Star us on GitHub if you find this project helpful!

Made with ❀️ by the SkyPanelV2 team


πŸ’– Donate

If you find this project useful, consider supporting its development:

PayPal

Your support helps us:

  • Maintain and improve the project
  • Add new features and integrations
  • Provide better documentation
  • Support the community

Thank you for your support! πŸ™

About

This application is designed to link with linode currently to personal cloud setup to sell servers and services via linodes api.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors