Skip to content

vigetlabs/storyboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f409b1f · Mar 26, 2024
Oct 21, 2022
Dec 13, 2022
Feb 7, 2024
Nov 9, 2018
Feb 7, 2024
Jul 14, 2022
Aug 6, 2020
Nov 9, 2018
Nov 9, 2018
May 19, 2022
Nov 9, 2018
Nov 9, 2018
Nov 9, 2018
Oct 21, 2022
Nov 9, 2018
May 14, 2020
Nov 9, 2018
Oct 21, 2022
Nov 9, 2018
May 19, 2022
May 19, 2022
Oct 21, 2022
Nov 9, 2018
Jun 25, 2019
Nov 9, 2018
Oct 21, 2022
Feb 24, 2022
Jun 25, 2019
May 7, 2019
Mar 26, 2024

Repository files navigation

Storyboard

An app for creating Choose Your Own Adventure stories

Local Development

With Docker
cp config/database.yml.example-docker config/database.yml

touch config/master.key
# This is a gitignored file which acts as the key to the encrypted/commited `config/credentials.yml` file.
# Copy/paste the password into the new config file:
# https://viget.1password.com/vaults/all/allitems/546kllhiv5ehtdsn2rhvt4q56y

Build / Run

If you're building the docker containers for the first time, or if you know a dependency has been added (eg: ruby gem / node package), run this:

docker compose build

Once the containers have been built, starting the app is just:

docker compose up

# And a shortcut for rebuilding containers while spinning them up at the same time:
docker compose up --build

Seeding the database

docker compose run --rm app bundle exec rake db:migrate
docker compose run --rm app bundle exec rake db:seed

Running tests

# Set up the test database
docker compose run --rm -e RAILS_ENV=test app rake db:create db:migrate

# Run specs
docker-compose run --rm app rspec
Running Locally

Tooling and Dependencies

  • If you have asdf installed, .tool-versions is set up for Ruby, Node, and Yarn versions.
  • PostgreSQL
    • version 11.x
    • can be installed with homebrew

Configuration

cp config/database.yml.example config/database.yml

touch config/master.key
# This is a gitignored file which acts as the key to the encrypted/commited `config/credentials.yml` file.
# Copy/paste the password into the new config file:
# https://viget.1password.com/vaults/all/allitems/546kllhiv5ehtdsn2rhvt4q56y

Application Dependencies

If you don't have Bundler installed for Ruby:

gem install bundler -v 1.17.3

Install dependencies:

# Install Ruby gems:
bundle install

# Install JS packages:
yarn install

Set up database

rake db:create db:migrate db:seed

Run the application

./bin/rails s

If you're updating CSS or JS, start webpacker to enable hot reloading:

./bin/webpack-dev-server

Then open http://localhost:3000 with your favorite internet browser.

Run the test suite

rspec

Deployment

To deploy:

bundle exec cap production deploy

Contributing

  • We're using a "rebase and merge" workflow for a linear commit history.