Skip to content

A Fifth Edition Dungeons & Dragons Campaign Management Tool

License

Notifications You must be signed in to change notification settings

DanielOliver/BardView5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BardView5

A self-hosted Fifth Edition Dungeons & Dragons Campaign Management Tool.

WARNING: No stable release candidate is available yet. Work-in-progress

Screenshots

Landing Page

Landing page

New user registered

Registered

Roadmap

  1. Start with basic user management
  2. Become a compendium of settings and monsters.
  3. Become a campaign/session/encounter tracker for the game master.
  4. Create a display window for tv so that DM can share information with players.
  5. Explore player data management.

Roadmap Details

  • User
    • Login
    • Registration
    • Authenticate
    • Email verification
    • Password reset
  • D&D 5e
    • Setting: A general setting to play in. Almost equivalent to a "world"
      • Read
      • Create
      • Update
      • Delete
      • Query
      • Assigning user permissions
      • Notes
        • Supports markdown in description
    • Monster: A single monster with statblocks and info
      • Read
      • Create
      • Update
      • Delete
      • Query
      • Associating with settings
    • Data pack: An entire collection of settings, monsters, and associated information. Meant to be imported or exported and shared.
      • Export
      • Import
    • Player tv display:
      • Display encounter information on secondary webpage with a sharable link.
    • Campaign: A collection of players and game masters associated with sessions and encounters
      • Read
      • Create
      • Update
      • Delete
      • Query
      • Associating with players
    • Session: zero or more encounters
      • Read
      • Create
      • Update
      • Delete
      • Query
      • Associating with Campaign
    • Encounter
      • Read
      • Create
      • Update
      • Delete
      • Query
      • Associating with Session
  • Instrumentation
    • Prometheus
  • Configuration
    • Local development
    • Production

Development

Prerequisites

  • Go 1.17
  • Mage
  • Docker
  • Docker Compose
  • Node 17
  • NPM 8

I use JetBrains products but I'd expect VSCode or another to work as well.

Operating system: I alternate development on openSUSE Tumbleweed and Windows 10 professional. GitHub Actions runs Ubuntu-latest.

Dependent services

  • PostgreSQL
  • Ory Kratos
  • Nginx

Running locally

  1. Add "proxy.local" to point to localhost on your machine.
  2. Confirm docker is running.
  3. Open server folder in root of this repository.
    cd server
  4. Start dependencies to open docker-compose and run database migrations
    mage up
    Creating network "server_default" with the default driver
    Creating server_mailslurper_1    ... done
    Creating server_db_1             ... done
    Creating server_kratos-migrate_1 ... done
    Creating server_kratos_1         ... done
    Creating server_nginx_1          ... done
    {"level":"info","role":"bardview5","host":"PeanutButter","type":"Migration","migration_version":0,"migration_dirty":false,"time":"2022-01-21T18:49:14-05:00","message":"Migrating bardview5"}
    {"level":"info","role":"bardview5","host":"PeanutButter","type":"Migration","migration_dirty":false,"migration_version":0,"time":"2022-01-21T18:49:15-05:00","message":"Migrated bardview5"}
    {"level":"info","role":"bardview5","host":"PeanutButter","type":"Migration","migration_dirty":false,"migration_version":1,"time":"2022-01-21T18:49:15-05:00","message":"bardview5 database version"}
    Run: DumpSchema
    
  5. Go mod download to install
    go mod download
  6. Go run server
    $env:bardview5_connection = "postgresql://postgres:mysecretpassword@localhost/bardview5?sslmode=disable"
    go run . serve
  7. Open bv-app folder in root of this repository.
    cd bv5-app
  8. Node run server
    npm run start-linux
    or
    npm run start-windows
  9. Open "http://proxy.local/"

Changing OpenAPI surface.

OpenAPI shows the API surface and schema definitions for the API.

  1. Edit schema.
  2. Generate Go files
    cd server
    go generate ./...
  3. Generate TypeScript files
    cd bv5-app
    npm run generate
  4. Implement API endpoints in Go.

Changing Database

Migrations shows the database migrations.

  1. Add database migration
  2. Add queries to be translated to Go using sqlc to query.sql
  3. Generate Go files
    cd server
    mage -v InternalMigrate
    

Deployment

TODO: Not ready

Methodology and philosophy

Development proceeds as I have time, usually a couple lines very late at night or very early in the morning. Neither am I optimizing for "web-scale" As such, the development habits here generally reflect my mood of what I want to explore at the time. Further, this isn't my job, so please don't judge me too harshly on what I write here and shortcuts taken since my free time is valuable. If you would, consider this an example microcosm of tradeoffs and compromise in order to make progress forward.

The things I value here are:

  • Automating as much boilerplate as possible.
  • Using stable technologies in order to smooth out difficulties. The adventure here is in building a complete application instead of bleeding edge technology.
  • Speed of development.
  • Simple user flows and logical interactions.
  • Freedom of data. I don't want your data. Self-host for yourself and your friends and do whatever.
  • No data entry. I hate typing more than required. Accurate importing and exporting of data is important.
  • A very deliberate and thoughtful acceptance of any new capabilities with the goal of a successful long-term maintenance thereof.

Releases

No releases published

Packages

No packages published