Monorepo managed with Yarn Workspaces. Web application written in TypeScript and built with React, Emotion, and Next.js. UI components developed in and documented using Storybook. Authentication and database handled by Firebase and application deployed to Vercel.
Please first make sure you have Yarn Classic installed. To set up the project, run the following commands below:
git clone https://github.com/Coral-Music/coral-monorepo.git
cd coral-monorepo
yarn install
npm i -g firebase-tools
# please make sure you've been added to the firebase project before proceeding with this step
firebase login
Next, go to the Firebase Console and go to Project Settings as below:
Inside of Project Settings, navigate to the Service Accounts tab, and click the Generate new private key.
Take the JSON data from this file and add it to .local.env
in the app workspace.
NOTE: Please DO NOT save this file anywhere inside the coral-monorepo
directory.
Please also go the General tab in the same view on the Firebase dashboard and copy the values under SDK setup and configuration in the Your apps section, convert it to JSON
and add it to .local.env
in the app workspace.
You can find more instructions & details regarding environment variable details in the app
Workspace README.
To test mobile devices locally, please install ngrok from https://ngrok.com/download.
Then add a ngrok.yaml
file with the configuration below:
authtoken: <YOUR_NGROK_AUTH_TOKEN>
tunnels:
web:
addr: 3000
proto: http
hostname: coral.ngrok.io
version: 2
region: us
Please note that any values surrounded by <
>
and are placeholder values, and must be filled in with the actual value.
you can get your authtoken
from https://dashboard.ngrok.com/get-started/your-authtoken.
In the project directory, you can run:
Which is shorthand for yarn workspace <WORKSPACE_NAME>
.
Using this script, you can run arbitrary scripts for each respective workspace:
yarn <WORKSPACE_NAME> start
Starts a tunnel from your local development environment to coral.ngrok.io.
NOTE: Please run yarn app start
before running this script.