Seed Database

This step requires a Service Account in place

Check out Firebase Emulators if you want to populate the emulators instead of production database.

From the app root run these commands in order

  1. pnpm run seed:users
  2. pnpm run seed:groups
  3. pnpm run seed:messages
  • Check email+password of created users at scripts/seed/users.json
  • Messages seed may take a while to complete in production since it adds 1 year worth of data for heavy load testing purposes. If you want to tweak the number of days to add, add a second param to the command, like pnpm run seed:messages 30 to add only 30 days of messages.
  • Check Firebase console to see data added on Cloud Firestore.
  • Once it's completed you should be all set to run the app.

Other useful commands

  • add a single user

replace the values with your own

pnpm run add:user [email@user.com] [password] [name]

  • delete an user from auth and firestore

replace the values with your own

pnpm run del:user [email@user.com]
  • clean up auth users
This will delete all users from your Firebase Authentication, proceed with caution.
🚨🚨🚨 node ./scripts/cleanUpAuth.js
Edit this page on GitHub Updated at Thu, Mar 9, 2023