Codebase for the Sparkle platform, brought to you by Sparkle, a platform for the most immersive & interactive virtual events.
What you will need:
First, clone the repo and cd
into it:
git clone https://github.com/sparkletown/sparkle
cd sparkle
Note: Before you run the next steps, you will need to ensure you have access to the Firebase project you want to use. This access can be set up through the Firebase web UI. The following variables are required to be set up:
REACT_APP_PROJECT_ID=
REACT_APP_API_KEY=
REACT_APP_APP_ID=
REACT_APP_MEASUREMENT_ID=
Install the platform dependencies with npm
:
(Important npm
v7+ is not supported, it will cause issues with our package-lock.json
, and you may end up with the wrong dependency versions. Check your current npm version with npm -v
.
npm install
Now you're ready to start the server! ✨
npm start
Once the server is started, your web browser will be opened at http://localhost:3000 (and then it'll be immediately redirected to https://sparklespaces.com/). You can opt out of this by adding the following line to your .env.local
:
BROWSER=none
To start using the app, navigate to a URL such as http://localhost:3000/v/{venueName} - replacing {venueName}
with the existing venue you'd like to use.
While you generally won't need to do this while developing locally, you can manually build the platform assets as follows:
npm run build
Note: You might need to emulate the firebase functions locally before the server can properly start. If you have issues using/editing your actual deployed environment functions, try that.
In a new terminal, from the directory you cloned the code to, enter the following commands:
npm install
If you haven't followed through these steps before then you're going to need to set up a new Firebase environment and configure it. That process is a little longer than would fit comfortably in this README, so we split it out for you:
See Firebase setup
First, you need to install the Stripe CLI.
If you use Homebrew, you can install it as follows:
brew install stripe/stripe-cli/stripe
Otherwise, follow the installation instructions at https://stripe.com/docs/stripe-cli#install
Make sure that you have a Stripe account setup and know the login credentials, then run the following commands (replacing TODO-PROJECTID
with your actual Firebase project ID:
stripe login
stripe listen --forward-to http://localhost:5001/TODO-PROJECTID/us-central1/payment-webhooks
If you're new to Git / GitHub flows, then you may find these guides helpful:
To contribute to the code base, please follow these steps:
staging
staging
staging
, which will trigger the CI to deploy the staging
environmentThen, to deploy to production
, a Sparkle team member will:
master
with a name such as deploy staging -> master
🚀 deployment
label#1234
PR they were made in) and paste it into the PR description after Deploys:
(see example)master
, this will trigger the CI system to deploy to the 'OG production
' environmentmaster
branch to any other environment branches (eg. env/foo
) to trigger the CI system to deploy those environments as wellWhen adding a quick fix to production:
- create a branch from master
- code
- create a pull request on master
- create a branch from staging
- cherry-pick the commit
- create a pull request on staging
Deploys are handled by CircleCI.
staging
will deploy to stagingmaster
will deploy to productionmaster
branch to any of our other configured production branches will deploy to that environmentSparkle is using Bugsnag! We are proud to be part of Bugsnag's open source program and are glad that Bugsnag supports open source.