An open source online character sheet service for tabletop roleplaying games.
Go to file
jeff 92c402e254 Switch all existing API requests to use new CharacterIdentifier stuff. 2021-01-12 22:01:17 +00:00
envoy Add readme instructions, run proxy command. 2021-01-03 21:24:52 +00:00
proto Switch all existing API requests to use new CharacterIdentifier stuff. 2021-01-12 22:01:17 +00:00
src Switch all existing API requests to use new CharacterIdentifier stuff. 2021-01-12 22:01:17 +00:00
.env Move migrations to refinery + barrel, enable 'offline' sqlx query checking 2020-12-31 14:11:28 +00:00
.gitignore Rename static directory to generated 2021-01-09 13:03:07 +00:00
COPYING Add license. 2020-12-03 19:21:09 +00:00
Cargo.lock Successful (but very manual) grpc-web requests. 2021-01-03 20:42:54 +00:00
Cargo.toml Add readme instructions, run proxy command. 2021-01-03 21:24:52 +00:00
LICENSE Add license. 2020-12-03 19:21:09 +00:00
README.md Add readme instructions, run proxy command. 2021-01-03 21:24:52 +00:00
Rocket.toml Rename static directory to generated 2021-01-09 13:03:07 +00:00
build.rs Return semi-proper values from the protobuf HTTP API 2021-01-05 21:19:47 +00:00
diesel.toml Switch character data type to an enum, including schema patch. 2020-12-08 22:28:27 +00:00
envoy.yaml Add readme instructions, run proxy command. 2021-01-03 21:24:52 +00:00
package-lock.json Serve templated templates with webpack-compiled JS injected. 2021-01-03 13:36:53 +00:00
package.json Update license in package.json to AGPL 2021-01-09 19:29:47 +00:00
rust-toolchain Migrate to Rocket 0.5. 2020-12-13 21:58:39 +00:00
sqlx-data.json Move migrations to refinery + barrel, enable 'offline' sqlx query checking 2020-12-31 14:11:28 +00:00
tsconfig.json Move typescript into source tree. 2021-01-09 12:57:13 +00:00
webpack.config.js Fix webpack publicPath to match server route. 2021-01-09 19:41:57 +00:00

README.md

Tenebrous Sheets

An open source character sheet service for tabletop roleplaying games.

Currently under heavy development.

The Stack

This project makes use of these technologies:

  • Rust
  • Rocket Web Framework
  • Tonic gRPC Framework
  • Typescript

Building is backed by: cargo, npm, and webpack.

Build Instructions

These are very basic build instructions. They assume you already have cargo set up and installed.

Initial Setup

Quick initial setup instructions that will set up a development environment.

First, install dependencies by either using the command below (Void Linux), or reading the "Dependencies Required" section:

xbps-install sqlite sqlite-devel protobuf nodejs docker

Then run the required cargo commands to install management tools and create a development database:


cargo install --version=0.2.0 sqlx-cli
cargo install cargo-run-script
cargo run --bin tenebrous-migrate

Dependencies Required

Dependencies required to build the project. The exact installation method depends on your OS.

  • sqlite3 and development headers (Void Linux: xbps-install sqlite sqlite-devel, Ubuntu: apt install sqlite3 libsqlite3-dev).
  • protoc: protocol buffers compiler. Needed to compile protobuf files for both the server and web frontends (Void Linux: xbps-install protobuf).
  • Node and npm: Needed to run webpack for compiling and injecting Typescript into various web pages (Void Linux: xbps-install nodejs).
  • Docker: Needed to run the grpc proxy (Void Linux xbps-install docker).

Run Application

Command line "instructions" to build and run the application:

cargo run-script grpc-proxy # only required if proxy not already running
cargo run

The sqlite database is created in the directory cargo run was invoked from by default. You can also pass a path to a different location as a single argument to the program.

Development

Development instructions.

To set up a local database, or run migrations, run:

cargo run --bin tenebrous-migrate

Database Queries and Migrations

When adding/updating a compile-checked query or a migration, you need to update the SQLx data JSON file:

cargo sqlx prepare -- --bin tenebrous

gRPC-Web Proxy

The frontend web application makes use of the gRPC-Web protocol to call gPRC endpoints from the browser. This requires a proxy to translate the calls from the browser to HTTP2 calls gRPC understands. For development, executing the cargo run-script grpc-proxy command will start the envoy proxy recommended by Google's gRPC-Web project.

The envoy configuration assumes you are on Linux. If you are using Mac OS or Windows, see the note in the envoy configuration.