An open source online character sheet service for tabletop roleplaying games.
Go to file
projectmoon 0ca23b46c6 Switch to oneof field for game-specific information and values.
Having specific protobuf types for different game systems using the
same rule set (e.g. all the Chronicles of Darkness games) is untenable
because protobuf does not have inheritance or mixins.

Instead, we have one generic character sheet type, with a oneof field
for the game specifics. This will be used in conjunction with the
character's game system (stored in db) to render different stuff on
the character templates.

Without this, we'd wind up having duplicate templates, a lot more code
for handling specifics of each game system, and so on.
2021-01-01 23:34:50 +00:00
proto Switch to oneof field for game-specific information and values. 2021-01-01 23:34:50 +00:00
src Switch to oneof field for game-specific information and values. 2021-01-01 23:34:50 +00:00
static/scripts Implement editing of attributes. 2020-12-27 21:49:08 +00:00
templates Switch to oneof field for game-specific information and values. 2021-01-01 23:34:50 +00:00
.env Move migrations to refinery + barrel, enable 'offline' sqlx query checking 2020-12-31 14:11:28 +00:00
.gitignore Add ability to pass in custom database path. 2020-12-31 14:11:28 +00:00
COPYING Add license. 2020-12-03 19:21:09 +00:00
Cargo.lock Update cargo dependencies. 2020-12-31 22:32:32 +00:00
Cargo.toml Add ability to pass in custom database path. 2020-12-31 14:11:28 +00:00
LICENSE Add license. 2020-12-03 19:21:09 +00:00
README.md Update readme for SQLx. 2020-12-31 14:11:28 +00:00
Rocket.toml Change global databases to debug (for development) 2020-12-14 19:06:21 +00:00
build.rs Add skills to the character editor. 2020-12-31 22:21:05 +00:00
diesel.toml Switch character data type to an enum, including schema patch. 2020-12-08 22:28:27 +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

README.md

Tenebrous Sheets

An open source character sheet service for tabletop roleplaying games.

Currently under heavy development.

Build Instructions

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

Install Dependencies

Install dependencies. The exact 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. There is one baked into the build, so you should not need this unless you are not using Linux/Mac/Windows.

Initial Setup

Follow these instructions from the root of the repository.

Set up database:

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

Run Application

If you are using rustup, then it should automatically switch to the stable version of Rust in this repository. This is because of the rust-toolchain file.

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

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