Skip to content

Backend High‐level Architecture

Kristoff edited this page Sep 1, 2024 · 1 revision

Overview

The backend architecture relies on a couple of key components to make the front# end happy. Below is a picture of how I envision this structure looking like. Boxes under other boxes are dependencies; so in this example, the world relies on the ingestion, and the database generation relies on the components and world; components only relies on the world.

VTT_dependecy_graph

Ingestion

Ingestion is responsible for transforming arbitrary data (JSON, TOML, etc.) into Rust friendly data containers.

World

The world is the collection of rust friendly data containers generated from ingestion, all under one umbrella.

Components

Components are the meat and potatoes of VTT. This is how we will swiftly integrate multiple RPGs, query data quickly, and find commonality between different systems. Components rely on the world; if the world has new information not expressed by an existing component, we'll have to add that component. The idea is that we will create a repository of components to span multiple RPG systems over time.

Database Generation

Database generation converts the world data into entities with components and then stores this information in a database.

Queries

Queries are search parameters to abide by. They describe a collection of components as a query and request data that fits that query. They interact with the generated database to get information.

Client -> Server

The client will ask the backend for something and the backend will create a query that asks the database; the queried data will then be returned to the frontend.