desriix / fishbowl

Play the Fishbowl Game online! (aka Salad Bowl, Monikers, Celebrities)

Home Page:https://fishbowl-game.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Play the Fishbowl game online! Also known as Salad bowl, The Hat Game, The Bucket Game, Monikers, or Celebrities...

It's a free, virtual version of a fun (and mostly hilarious) guessing game, designed for any group of all ages! You'll need at least 4 to play, but it only gets more fun with more players. Hop on a video call, and play through rounds of Taboo, Charades, and Password.

Technology

Fishbowl is built with Material UI, Typescript, React, Apollo GraphQL, Hasura, and Postgres.

CI/CD via Github Actions. Hosted on Render.

build

Roadmap

Public Trello

Local Development

Installing

  1. Clone the repo:

    git clone git@github.com:avimoondra/fishbowl.git
  2. Install Homebrew, and:

    brew bundle
  3. Install Node.js via Node Version Manager:

    nvm install
  4. Install Docker

    Download and install Docker via Docker for Mac. Further documentation can be found here.

  5. Install Hasura CLI

    Hasura is a GraphQL server that gives you instant, realtime GraphQL APIs over Postgres, with webhook triggers on database events, and remote schemas for business logic.

    curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash

    See more detailed instructions here

Running w/Docker

The local environment is configured with Docker Compose.

Running the application with:

docker-compose up

will build and start these services which are all accessible on the host:

service description host connection
app React front-end localhost:3000
graphql-engine Hasura GraphQL Engine localhost:8080
actions-server Hasura actions server localhost:3001
postgres Postgres database localhost:5432

Migrations

Open Hasura console on localhost:9695 to track migrations:

cd graphql-server
hasura console --admin-secret=myadminsecretkey

Migrations and metadata will automatically apply on start up. But to revert or apply migrations manually,

cd graphql-server
hasura migrate apply --admin-secret=myadminsecretkey
hasura metadata apply --admin-secret=myadminsecretkey

GraphQL Code Generation

Repeatedly generate GraphQL Apollo React hooks and TypeScript operations:

cd app
yarn gql-gen --watch
docker-compose exec actions-server yarn gql-gen --watch

Adding or updating dependencies in app or actions-server

docker-compose exec [actions-server|app] yarn [add|remove|etc.] xyz-package

FAQ

Update allowed queries/mutations on prod?

There's a gql operations white list on production. Any operation that's not in this list is disallowed (on prod only). If merging a PR that updates any *.graphql file, the order of operations is...

  1. Before merging code, set HASURA_GRAPHQL_ENABLE_ALLOWLIST to false, in Render
  2. Deploy the code + update the query/mutation(s) from the new code in the production gql operations white list.
  3. After the FE is deployed w/the new code + white list updated, set HASURA_GRAPHQL_ENABLE_ALLOWLIST back to true, in Render.

Reset my local DB?

Stop your docker containers, then:

docker rm postgres
docker volume prune
docker-compose up

Connect to my local DB w/psql?

Install psql or Postico, or your favorite postgres client.

psql postgres://postgres:postgrespassword@localhost:5432/postgres

You can also find a SQL runner in Hasura itself, here.

Contribute w/code

Open a new pull request or issue! Be sure to check out the Public Trello which defines a loose roadmap, and has many features, bugs, or chores already logged!

Suggest a change or report a bug

If you don't know if a bug is actually an issue or just want to suggest a feature - just create an issue!

Make a change or fix a bug

If you're already ready to contribute...

  1. Fork this repo
  2. Create a branch w/your changes
  3. Create a pull request by comparing branches across forks
  4. Start a discussion from there!

Contact

If you're not sure about either or want to hack on Fishbowl on a recurring basis, feel free to contact me at avimoondra@gmail.com or join our Slack group.

Support w/$

Buy Me A Coffee

About

Play the Fishbowl Game online! (aka Salad Bowl, Monikers, Celebrities)

https://fishbowl-game.com

License:MIT License


Languages

Language:TypeScript 90.5%Language:HTML 3.7%Language:PLpgSQL 2.8%Language:CSS 1.3%Language:JavaScript 0.9%Language:Dockerfile 0.4%Language:Shell 0.3%Language:Ruby 0.2%