Emulates the backend service made by Pragma for the game spectre divide.
- Visual Studio (either 2022 or 2026)
- pgAdmin 4
- Docker desktop
- our internal representation of the backend's data structures
- has embedded json unpacked
- has stuff like port numbers being doubles fixed
- most classes are designed to be SQL tables with player ids as primary key
- these are the structures that we will be passing around in the backend
- spectre's representation of the backend data structures
- basically just the protobuf classes we had before
- contains constructors to convert from Model classes to Packet classes
- what actually gets sent / serialized to JSON
- Also has functions to go from packet to model classes for receiving update packets
- Pushing model classes to the database
- Receiving model classes from the database
- Might make this an interface class so we can support multiple backends (ie SQLite for testing / ease of use and Postgres for prod)
- Packet processors
- Commands (eg making one user friends with another)
- Responds to requests
- With your ide of choice open the solution and get it to build. You can also rename env.example.json to env.json if you want to use the json configuration secrets file.
cd Docker- On windows,
copy .env.example .envor on linuxcp .env.example .env docker build -t pragmabackend:latest -f Backend.dockerfile ..docker build -t pragmabackend-pgdb:latest -f Postgres.dockerfile .docker compose upNote that you can add the -d flag to this command if you would like your terminal to detach from the console view.- When finished,
docker compose downwill stop the application while preserving data whiledocker compose down -vwill stop the application and remove all data. If you want to only start the database, usedocker compose up backend-pgdbanddocker compose down backend-pgdb