Skip to content

halimath/fate-core-remote-table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fate-core-remote-table

CI Status CD Status

A virtual remote table for playing Fate Core role playing games.

About

This repo contains a web application that supports people playing any kind of Fate Core based role playing game remotely using whatever video conferencing tool they like. This app adds support for

  • rolling fate dice - in case you don't have physical ones
  • manage fate points
  • share aspects with all players

Architecture

This application is build from two parts:

  1. a backend service managing data and distributing data update among players
  2. a web frontend consiting of a single page application that can be used with different devices

The parts communicate using a REST API and communication utilizes the CQRS paradigm. The communication protocol is documented in docs/api.yaml which is an OpenAPI spec.

The frontend application uses an internal architecture modeled after the well known model, view, control pattern. A controller receives messages that describe updates to the model and executes them, returning a new model value to be rendered by the view functions. The weccoframework provides excellent support for implementing this kind of architectures.

The backend applies an onion architecture style with domain entities in the center, surrounded by use case functions and persistence and RESTful API placed around that. Currently, persistence is only implemented in-memory.

Development

The backend is implemented using Golang 1.22. The frontend is implemented using TypeScript and the wecco framework. Almost all CSS is coming from Tailwind with minimal CSS being written to embed the Fate Core font for displaying dice results.

Local Environment

For being able to develop the app, you should have a local install of

  • Golang >= 1.22
  • Node v20
  • NPM (>=10.5)

You should also have an IDE which supports Golang and TypeScript. VSCode works perfectly, IntelliJ IDEA works, too. I haven't tried other IDEs, but the should work the same.

To get working locally, you should open two terminal windows (or tabs or whatever you use). In the first, run

backend$ go run .

This will start the backend on localhost:8080.

In the second terminal, run

$ cd app
app$ npm i
app$ npm start

(You need to install dependencies with npm i only once or when the package.json file changes). This will start the webpack dev server to bring up the frontend on localhost:9999.

Now point your browser to http://localhost:3000 and you can use the app.

Running Tests

Currently, we use three different test stages:

  • unit tests (currently only implemented for the backend) test components in isolation
  • API tests test the backend API
  • end-to-end-tests test the full application with multiple browser sessions to simulate multiple session participants

The first two stages are implemented as plain Golang tests.

The last stage is implemented as Python Playwright tests.

CI/CD

Both parts of the application are wrapped in a single OCI container build with podman (but you can use Docker as well). The container build uses multiple stages and builds the whole app as part of the container build. The final container will only contain the compiled application, though.

We use Github Actions to build the application, run the tests, build the container image and publish it to https://ghcr.io.

License

Copyright 2021 - 2024 Alexander Metzner.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Remote table for Fate Core roleplaying games

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published