Cesar Petrescu

Lab · Infrastructure

  • Production
  • Game Platform

PhotonSpark Game Hosting Platform

A production game-server control plane, community bridge, and four-server fleet

The production platform behind PhotonSpark’s public game community: a customized Pterodactyl control plane with Keycloak SSO and an approval-gated AI operator, a secure Discord-to-game event bridge, and four branded Unturned and Minecraft servers. I run the fleet both as a practical advertisement for PhotonSpark hosting and because I genuinely enjoy maintaining a place where a community can play, talk, and return.

  • Pterodactyl
  • PHP
  • React
  • TypeScript
  • Go
  • PostgreSQL
  • Java
  • C#
  • Docker
  • WebSocket
  • Keycloak
  • Discord

How it works

From a player action to a visible community event

Follow the shared path connecting the Pterodactyl control plane, four game servers, Discord, and controlled automation without exposing shell or arbitrary command execution.

Step 1 of 4 · Wings · RocketMod · Paper

Players join an isolated PhotonSpark game runtime

Wings runs each Unturned or Minecraft server in its own managed container. Game-specific C# RocketMod and Java Paper plugins observe chat, joins, leaves, and player state while preserving each community’s native identity.

What moves forward A bounded game event with authenticated server context.

Step 2 of 4 · Go · WebSocket · PostgreSQL

The relay validates identity and carries bounded events

The Go WebSocket relay authenticates one-time server tokens by digest, binds identity from PostgreSQL, strips unsafe controls, and enforces limits for frames, batches, queues, retries, and reconnect work.

What moves forward A sanitized event associated with a known production server.

Step 3 of 4 · TypeScript · discord.js

Discord renders status and conversation safely

The TypeScript bot turns events into game-aware messages, lifecycle notifications, player snapshots, and four persistent status cards. Replies can travel back to the linked game channel with mass mentions disabled.

What moves forward One continuous community surface across Discord and both games.

Step 4 of 4 · Pterodactyl · PhotonAssist

Panel actions remain observable and reversible

Operators inspect logs, files, versions, queries, and health through the PhotonSpark panel. PhotonAssist can investigate broadly, but console or power changes require approval, backups, staged rollout, and production read-back.

What moves forward Safer operation of four branded production communities.

System map

  • Request
  • Engines
  • Data
ClientsClientsEdgeEdgeCoreCoreEnginesEnginesDataDataPlayersUnturned + MinecraftPlayers — Unturned + MinecraftDiscord communitychat + status + eventsDiscord community — chat + status + eventsOperatorpanel + audited actionsOperator — panel + audited actionsPhotonSpark PanelPterodactyl forkPhotonSpark Panel — Pterodactyl forkDiscord botTypeScript / discord.jsDiscord bot — TypeScript / discord.jsPhotonAssistapproval-gated operationsPhotonAssist — approval-gated operationsGame relayGo / authenticated WSGame relay — Go / authenticated WSRocket pluginC# / 3 Unturned serversRocket plugin — C# / 3 Unturned serversPaper pluginJava / Minecraft PhotonPaper plugin — Java / Minecraft PhotonWings nodesisolated game containersWings nodes — isolated game containersPostgreSQLlinks + token digestsPostgreSQL — links + token digestsServer stateworlds + config + backupsServer state — worlds + config + backups

Tap a service to see what it calls and what calls it.

Clients

Edge

Core

Engines

Data

Production servers
4
Supported games
2
Runtime languages
4
Community presence
24/7

Why it exists

Public servers give PhotonSpark a working demonstration of its game-hosting infrastructure instead of a marketing-only promise. Players encounter the brand through reliable servers, Discord activity, and a consistent community experience.

The project is also personal: I like operating game communities. The goal is not only acquisition; it is to maintain a place where people can play together while I improve the platform behind it.

Use cases

  • Operate branded game servers as a real production workload and an honest advertisement for PhotonSpark hosting.
  • Keep players connected across Discord, Unturned, and Minecraft without requiring them to stay inside one game client.
  • Give operators safe panel automation, live diagnostics, controlled actions, backups, and repeatable recovery paths.
  • Use one shared platform while preserving game-specific plugins, status information, maps, worlds, and player identities.

Capabilities

Community continuity
Discord and game chat remain connected while each game keeps its native presentation.
Live observability
server availability, players, maps/worlds, versions, and lifecycle events are visible from one status surface.
Controlled automation
PhotonAssist can investigate freely, but mutating console or power actions pass through an approval boundary.
Game-aware protocol
server identity is bound to authenticated database records rather than trusted from client-supplied names.
Failure containment
bounded queues, payloads, retries, timeouts, batches, caches, and reconnect work prevent a noisy server from exhausting the bridge.
Operational recovery
backups, digest verification, rollback artifacts, and sequential deployment keep production changes reversible.

Subsystems

Control plane

Pterodactyl, adapted for PhotonSpark operations

The customer/operator surface manages isolated game containers across Wings nodes. Keycloak-first SSO, a guided mobile UI, egg validation, and PhotonAssist turn the upstream panel into a PhotonSpark control plane.

  • Keycloak SSO
  • Wings orchestration
  • guided server UI
  • egg install/runtime validation

Community bridge

One event path across Discord and two games

A TypeScript Discord bot and Go relay connect authenticated C# RocketMod and Java Paper plugins. Chat, joins, leaves, health, and player snapshots become bounded events with no arbitrary game-command execution.

  • Discord Gateway
  • authenticated WebSocket
  • bounded event batches
  • four live status cards

Server fleet

Four branded communities, one operational model

California 2, Escalation, Russia, and Minecraft Photon retain their own gameplay identity while sharing status, Discord presence, branding, backups, and operator workflows.

  • 3× Unturned
  • 1× Minecraft
  • 108 total slots
  • production backups + rollback

Hermes delivery

Agent-assisted implementation with human-controlled production changes

I used Hermes Agent to inventory the live systems, implement and review the Go/TypeScript/Java/C# paths, run cross-language tests, prepare backups, stage deployments, and verify production. Destructive or credential-sensitive changes stayed scoped, reviewable, and explicitly controlled.

  • live inventory
  • parallel code review
  • cross-language tests
  • production read-back

Production servers

ServerGameRuntimeExperienceCapacity
California 2UnturnedRocketModProgression PvP32 slots
EscalationUnturnedRocketMod10X community PvP32 slots
RussiaUnturnedRocketMod2X semi-vanilla PvP24 slots
Minecraft PhotonMinecraftPaper 26.2Survival community20 slots

Components

PhotonSpark panel fork

  • Pterodactyl server lifecycle and file/console management
  • Keycloak-first SSO and PhotonSpark branding
  • Guided mobile controls and tested game templates
  • Multi-node Wings operations

PhotonAssist operator

  • Reads logs, files, configuration, and live server state
  • Tool-calling loop with bounded iterations and context
  • Console and power writes wait for explicit approval
  • Observes command output before claiming success

Discord community layer

  • Persistent four-card server status and /servers command
  • Bidirectional global chat with game-specific identity
  • Join, leave, online, and offline activity events
  • Mention-safe, bounded Discord rendering

Game bridge and plugins

  • Go WebSocket relay with authenticated server sessions
  • C# RocketMod plugin for three Unturned servers
  • Java Paper plugin for Minecraft Photon
  • No RCON, shell access, or arbitrary command dispatch

Production operations

  • Read-only inspection mounts and sanitized inventory
  • Panel-audited uploads, restarts, and console actions
  • Pre-change backups with hash manifests
  • One-server-at-a-time rollout and public-query verification

A chat message crosses worlds

  1. A player speaks in Unturned or Minecraft; the game plugin emits a bounded, authenticated event.
  2. The Go relay validates the server session, sanitizes controls, batches events, and forwards them to the internal bot API.
  3. The TypeScript bot renders safe Discord messages with trusted game-specific avatars and disabled mass mentions.
  4. A human Discord reply is flattened and relayed back only to the linked game channel as a labelled system message.

Agent-assisted delivery

  1. Hermes Agent inventories repositories, live sessions, panel state, versions, and deployment boundaries without printing secrets.
  2. Changes are implemented across TypeScript, Go, Java, and C# with focused tests and independent blocking/high-severity review.
  3. Before production, world/configuration and database rollback artifacts are created and verified with cryptographic hashes.
  4. Services roll out in dependency order; existing Unturned clients reconnect before Minecraft or presentation changes proceed.
  5. Acceptance reads back public game queries, authenticated bridge sessions, Discord messages, status cards, logs, and deployed artifact hashes.

Security boundaries

  • Server credentials are one-time high-entropy tokens stored as SHA-256 digests; unknown-token and database-failure responses are intentionally indistinguishable.
  • Discord mentions are disabled and game/Discord text is control-stripped, length-limited, escaped once, and partitioned under aggregate embed limits.
  • The Minecraft plugin performs no RCON, shell execution, signed-player impersonation, or arbitrary command dispatch.
  • Containers run unprivileged with read-only roots, dropped capabilities, no-new-privileges, and internal-only bot APIs.
  • All queues, WebSocket frames, status bodies, lookups, retries, reconnects, and shutdown paths are bounded or deadline-controlled.

Outcome

The result is a real customer-facing infrastructure story: four live PhotonSpark communities, one coherent Discord presence, safer operator automation, and a repeatable delivery workflow. The servers advertise the hosting platform by demonstrating it under actual community use rather than through screenshots alone.