Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tariqdev.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Game Hosting

Game hosting is one of Sonata’s core product areas.
Game hosting pages combine product data, checkout parameters, locations, software options, and optional live stock.
Main files:
app/game-host/
lib/data/game-hosting.ts

What Game Hosting Supports

  • Multiple games.
  • Game-specific pages.
  • Hero images.
  • Theme accents.
  • Plan tiers.
  • Monthly and yearly pricing.
  • Location selection.
  • Software selection.
  • Billing URL parameters.
  • Badges.
  • Stock availability.

Adding a New Game

  1. Open lib/data/game-hosting.ts.
  2. Copy an existing game entry.
  3. Change slug, label, shortLabel, and href.
  4. Update hero copy and SEO metadata.
  5. Set images.
  6. Configure locations.
  7. Configure software options.
  8. Add tiers and plans.
  9. Test the page route.

Billing Config

Game checkout links can append selected options. Typical fields:
cycleParam
promoParam
locationParam
softwareParam
Match these names to your billing system. Examples:
  • WHMCS may use billingcycle and config[...].
  • Paymenter may use cycle and options[...].
  • Custom billing can use any query names your app expects.

Location Options

Locations should match the real regions you can provide. Check each location against:
  • Public product copy.
  • Billing configurable options.
  • Pterodactyl location or node mapping.
  • Stock availability.
If the billing panel expects numeric IDs, map friendly location labels to the required billing parameter values.

Software Options

Software options can represent:
  • Vanilla.
  • Paper.
  • Purpur.
  • Forge.
  • Fabric.
  • BungeeCord.
  • Velocity.
  • Game-specific versions or loaders.
Only show software options that your deployment flow supports.

Plans

Game plans are created using the plan helper in game-hosting.ts. Plan fields commonly include:
  • ID.
  • Billing path.
  • Name.
  • Tagline.
  • Monthly price.
  • Yearly price.
  • RAM.
  • CPU.
  • Storage.
  • Bandwidth.
  • Location.
  • Backup.
  • Slots.
  • Recommended usage.
  • Badges.

Plan Writing Tips

  • Keep RAM, CPU, storage, and slots consistent across plans.
  • Use plan names that are easy to compare.
  • Put the best value badge on one plan only.
  • Avoid long plan descriptions inside cards.
  • Keep recommended usage realistic.

Stock Badges

Stock badge UI:
app/game-host/StockBadge.tsx
Plan card UI:
app/game-host/ProductCard.tsx
Stock API:
app/api/stock/route.ts

Pterodactyl Requirements

Set:
PTERODACTYL_PANEL_URL=https://panel.example.com
PTERODACTYL_APP_KEY=ptla_xxxxxxxxxxxxxxxxx
Use an Application API key with read access.

Testing Game Pages

After changing game data:
  1. Open the game listing page.
  2. Open every game detail page.
  3. Switch billing cycles.
  4. Change locations.
  5. Change software options.
  6. Click checkout links.
  7. Check stock badges.
  8. Run pnpm build.

Common Mistakes

  • Wrong Pterodactyl location IDs.
  • Billing parameter names do not match the billing panel.
  • Software options are enabled but no softwareParam exists.
  • Plan card text is too long for mobile.
  • Hero image path is wrong.