Setup work
- [ ] Create a new Firebase project in the UI, from
[email protected]
- [ ] Create
thereomone
git branch
- [ ] Copy in Firebase credentials to
init.ts
- [ ] Send out a GitHub PR
- Deploy Firebase config
- [ ]
$ firebase functions:config:get > .runtimeconfig.json
to copy secrets (Stripe & Mailgun key) from main project
- Note: Don’t check this in!
- [ ]
$ firebase use theoremone-manifold
to select the new Firebase project
- [ ]
$ firebase functions:config:set mailgun.key="blah" stripe.webhooksecret="blah"...
to set secrets
- [ ]
$ firebase deploy
to deploy:
- Cloud functions
- Security rules
- Indexes
- Get it working locally
- [ ] Add a startup script to
package.json
; run it locally
- [ ] Set up subdomain
theoremone.manifold.markets
in Porkbun & Vercel
- [ ] Copy cname record from Vercel UI into Porkbun. Credentials are stored under
[email protected]
- [ ] Point to
theoremone
git branch
- [ ] Add an environment variable to the right database (key:
NEXT_PUBLIC_FIREBASE_ENV
; value: THEOREMONE
)
- [ ] Add subdomain to Google Auth
Customizations in code
- [ ] Whitelist
[email protected]
emails and admins in access.ts
- [ ] Deny reads while not authed
- [ ] Whitelist admin ids in Firestore security rules
- [ ]
$ firebase deploy
again
- [ ] Brand using TheoremOne logo
- [ ] Rename currency
Ongoing maintenance work
- Merge Git changes to
theoremone
git branch
- [ ] Switch to prod:
firebase use mantic-markets
- [ ] Pull in latest security rules & indexes:
firebase init firestore
- [ ] Revert unwanted changes to firestore.rules
- [ ] Switch back to private:
firebase use theoremone-manifold
- [ ] Deploy these all:
firebase deploy
Gotchas