- Clone this project
git clone https://github.com/scottbenton/Iron-Fellowship.git
- Install dependencies
npm i
- Create an
.env.local
file (see.env.local
below) - Set up firebase (see Firebase Setup below, or contact Scott to get credentials to the dev instance)
- Run
npm run dev
and go to your browser to see the output.
Create a new file in the root of this repository, named .env.local
.
This file will hold environment variables representing credentials needed to connect your instance with firebase.
Copy the following into your project
VITE_IRON_FELLOWSHIP_FIREBASE_APIKEY=
VITE_IRON_FELLOWSHIP_FIREBASE_AUTHDOMAIN=
VITE_IRON_FELLOWSHIP_FIREBASE_PROJECTID=
VITE_IRON_FELLOWSHIP_FIREBASE_STORAGEBUCKET=
VITE_IRON_FELLOWSHIP_FIREBASE_MESSAGINGSENDERID=
VITE_IRON_FELLOWSHIP_FIREBASE_APPID=
VITE_CREW_LINK_FIREBASE_APIKEY=
VITE_CREW_LINK_FIREBASE_AUTHDOMAIN=
VITE_CREW_LINK_FIREBASE_PROJECTID=
VITE_CREW_LINK_FIREBASE_STORAGEBUCKET=
VITE_CREW_LINK_FIREBASE_MESSAGINGSENDERID=
VITE_CREW_LINK_FIREBASE_APPID=
# Default values for the environment.
VITE_TITLE="Starforged Crew Link"
VITE_FAVICON_PATH=/theme/eidolon.svg
VITE_OPENGRAPH_PATH=/assets/starforged/opengraph-default.png
As you create firebase projects, you will get values to fill these config values in.
You can also just ask me directly, and I will send you the values I use in development.
Copy those values from into your .env.local
file in the following properties:
Firebase provides authentication, database, and image storage to this application.
The first step is to create firebase projects for Ironsworn and Starforged. You can create a new project by going to the firebase console. Once you have created a project, you need to follow the following steps.
- From the homepage, under the
Get started
section, click</>
. - Give your app a nickname, and if you plan on hosting your own version (and not just contributing to the existing deployments), click "Also set up Firebase Hosting"
- Click next, and copy the apiKey, authDomain, projectId, storageBucket, messagingSenderId, and appId values into your
.env.local
file you created earlier - Complete your setup
- Under the
Build
tab on the left, selectAuthentication
- Click
Get Started
- Select and enable
Google
- Add a new provider, and enable
Email/Password
withEmail link
sign in
- Under the
Build
tab on the left, selectFirestore Database
- Create a new database, choosing the location of your choice.
- Once your database has been provisioned, click the
rules
tab, and copy the contents of thefirestore.rules
file into the tab
- Under the
Build
tab on the left, selectStorage
- Set up cloud storage, and wait for it to be created
- Once your storage has been created, click the
rules
tab, and copy the contents of thestorage.rules
file into the tab
Posthog gives us some light analytics (page views), and the ability to gate new features behind feature flags. If you need to set up posthog you can create a new project and then add the following to your .env.local
file
VITE_POSTHOG_KEY=
VITE_POSTHOG_HOST=
With that, you should be all set up and ready to develop locally!