Content editor for Beyond Ys.
-
Clone the repository:
git clone https://github.com/franz-dc/beyond-ys.git
-
Install dependencies:
npm i # or yarn
-
Create
.env.local
by copying.env
and replace the values with your own:cp .env .env.local
-
Set up your Firebase project or Firebase Local Emulator Suite.
a. Firebase Project
-
Make sure that
NEXT_PUBLIC_USE_FIREBASE_EMULATOR
is set tofalse
in.env.local
. -
Optional: Set
USE_EMPTY_STATIC_PATHS
totrue
in.env.local
. This is recommended if you're using a free Firebase plan to avoid exceeding the free quota. -
Create a service account key and download the generated JSON file.
-
Update the values of
FIREBASE_ADMIN_PRIVATE_KEY
andFIREBASE_ADMIN_CLIENT_EMAIL
in.env.local
with the values from the JSON file. -
Make your storage bucket publicly readable. For more information, see this.
b. Firebase Local Emulator Suite
-
Make sure that
NEXT_PUBLIC_USE_FIREBASE_EMULATOR
is set totrue
in.env.local
. -
Enable the following services in your Firebase project:
- Authentication
- Firestore
- Storage
-
Update Firestore emulator variables in
.env.local
if necessary. This is only needed if you're using a different host or port. -
Run the following commands on your local Firebase directory to start the emulators:
First time:
firebase emulators:start --export-on-exit=./emulator-data
Subsequent times:
firebase emulators:start --import=./emulator-data --export-on-exit=./emulator-data
This is needed to persist the data in the emulator and avoid having to reseed the database every time you restart the emulator.
-
-
Run this command to seed the database with sample data*:
npm run seed # or yarn seed
-
Run the development server:
npm run dev # or yarn dev
-
Open localhost:9001 on your browser.
* Only canon Ys games are seeded (with some of their characters, music, and staff).
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and ensure they're properly tested.
- Commit your changes and push them to your forked repository.
- Submit a pull request, explaining the changes you've made.
This project is licensed under the MIT License.