Skip to content

Latest commit

 

History

History
111 lines (100 loc) · 3.33 KB

README.md

File metadata and controls

111 lines (100 loc) · 3.33 KB

Handsfree Rummy

Repository code size Respository count of issues open Repository count of stars

Installation

Before installng make sure you have the following

  • Docker
  • Node v21.6.1, we use nvm to get correct verison

Setup

Clone the repository

git clone https://github.com/maxkopitz/handsfreerummy

Setup .env

  1. Copy .env.example
cp ./.env.example .env
  1. Get a key from azure Speach Services
  2. Populate .env with key
NODE_ENV=development
AZURE_TRANSCRIBE_SUBSCRIPTION_KEY=xxxxxxx
AZURE_TRANSCRIBE_REGION=useast

Start the flask API via Docker

  1. Build the backend & frontend containers, this step is only needed the first time installing and when package.json or requirements.txt changes.
docker compose build
  1. Run docker compose
docker compose up
  • The UI should be running at http://localhost:3000/
  • The API should be running at http://localhost:4000/api/v1/
  • Redis Insight should be running at http://localhost:8001/

Use CTRL-C to stop docker compose or docker compose down


Project layout

├── backend/               Python Flask Backend
│   ├── bin/               Scripts
│   ├── handsfree/         Flask API
│   │   ├── api/           Flask Routes & Sockets
│   │   ├── cli/           Flask CLI
│   │   └── game/          Logic for managing games
│   └── tests/
├── frontend               React UI
│   ├── src
│   │   ├── api            API Services
│   │   ├── components     Components
│   │   │   ├── game       Game Components
│   │   │   ├── joingame   Displaying lobby game Components
│   │   │   ├── settings   Settings Components
│   │   │   ├── tutorial   Tutorial Compoents
│   │   │   └── ui         Reusable UI Components
│   │   ├── hooks          Hook/Reducers
│   │   └── lib            Utility
└─────────────────────────

Notes

  1. If you get stuck on a page, go to Redis Insight http://localhost:8001.
  2. Open the CLI
  3. Flush the DB by entering FLUSHDB in the CLI

Trouble Shooting

Installing a package via npm

Issue: Installed package is not installed after running docker compose build and docker compose up Solution:

  1. Make sure compose stack is not running
docker compose down
  1. Remove the UI container and its volumes
docker container rm handsfreerummy-client-1 --volumes
  1. Start containers
docker compose up --build