Skip to content

SpectreRevival/PragmaBackend

Repository files navigation

Spectre Divide's Custom Metagame Backend Server

made by @OhmV-IR and @AstroVal0

Status: on pause for now. PRs welcome.

Check out the Wiki!

What this repo contains

  • HTTP handlers (some static, some dynamic)
  • WebSocket RPC handlers (static + a few dynamic processors)
  • SQLiteCpp
  • Protobuf models
  • vcpkg manifest dependencies (repo includes vcpkg as a submodule)

Requirements

This is currently set up primarily for Windows (can build for linux, check prod branch):

Dependency management is via vcpkg (manifest mode). You need to build with the vcpkg toolchain file enabled.

You can follow this tutorial if you want (make sure to read about the configuration first) NOTE: as of 7th May 2026 you no longer need a steam api key or an auth.json. you only need an auth.json if you wish to use vivox voice and chat backend. https://youtu.be/j1DOWg2PbLA

Clone

git clone https://github.com/astroval0/pragmabackend cd pragmabackend git submodule update --init --recursive

Vivox-Voice Configuration

If you'd like to set up Vivox-Voice chat server (Spectre's text and voice chat backend)

You'll need to make an auth.json at the repo root and fill it out with the respective values.

https://unity.com/products/vivox

{
  "vivox": {
    "server": "",
    "domain": "",
    "issuer": "",
    "key": ""
  }
}

Do not commit auth.json lol.

Build

Recommended: JetBrains CLion (Windows)

In Settings -> Build, Execution, Deployment -> CMake, set:

  • Generator: Ninja (default is fine)
  • CMake options: set the vcpkg toolchain file, e.g.
    • if your absolute path is E:\dev\spectre\srv\pragmabackend then your toolchain file path is
    • E:\dev\spectre\srv\pragmabackend\vcpkg\scripts\buildsystems\vcpkg.cmake
-DCMAKE_TOOLCHAIN_FILE="<path>"

Run

Logs are written to logs/app.log.

Default ports

By default the server starts three listeners:

  • Game HTTP: http://127.0.0.1:8081
  • Social HTTP: http://127.0.0.1:8082
  • WebSocket: ws://127.0.0.1:80

Client / launcher

Any client needs to point at the backend address:

  • http://127.0.0.1:8081 (game)
  • http://127.0.0.1:8082 (social)

This project is meant for local, but you can forward it publicly.

Contributing

PRs welcome. If you contribute:

  • keep changes focused (one feature/fix per PR)
  • don't commit secrets (auth.json, tokens, private keys)
  • include a quick note on how to test the change locally

Troubleshooting

CMake can't find packages

  • You probably forgot the vcpkg toolchain file. Set -DCMAKE_TOOLCHAIN_FILE="<your absolute path plus \vcpkg\scripts\buildsystems\vcpkg.cmake > ".
    • if your absolute path is E:\dev\spectre\srv\pragmabackend then your toolchain file path is E:\dev\spectre\srv\pragmabackend\vcpkg\scripts\buildsystems\vcpkg.cmake

failed to open InventoryStore file

  • you didn't follow the instructions properly so it couldn't build fully.

Port already in use

  • Change the port defines and rebuild. Make sure whatever client you use is updated too.

failed to read PlayerConfigData in SavePlayerDataProcessor

  • Press WIN+R -> type in %localappdata% -> press enter -> delete the Spectre folder.

Using a published release

You may download a public build of the backend from the latest release. This will contain a build for windows, linux and a docker container image. For windows or linux, simply extract the .zip and run the executable named pragmabackend inside. For the docker container, run docker image load -i pragmabackend-docker.tar and then docker run -d -p 80:80 -p 8081:8081 -p 8082:8082 pragmabackend:latest

About

Spectre Revival project's metagame backend server repository.

Resources

License

Stars

Watchers

Forks

Contributors

Languages