Files
whsfund/FIREBASE_ENV.md
2026-06-03 16:59:15 -04:00

58 lines
1.4 KiB
Markdown

# Firebase Environments
The frontend Firebase project is selected by Vite mode.
## Production
`npm run build` uses `.env.production`.
The current production Firebase project is:
```text
whsfund-c5e40
```
## Development
`npm run dev` uses `.env.development`.
The development Firebase project is:
```text
whsfund-dev-c5e40
```
The local `.env.development` file should contain the web app config for this
project. If it needs to be recreated:
```bash
cp .env.development.example .env.development
npm run dev
```
The Shopdm Pay integration already uses the Vite mode too:
- development: `wesley-high-school` merchant at `https://pay-dm-dev.web.app/wesley-high-school`, pending donations marked `env: "dev"`
- production: production merchant, production payment URL, pending donations marked `env: "production"`
## Firebase CLI
The Firebase CLI has aliases for both projects:
```bash
firebase deploy --project development
firebase deploy --project production
```
Local development writes pending donations to the development Firebase project.
To test full Shopdm Pay confirmation, deploy the Cloud Function to the
development project, set `SHOPDM_MERCHANT_SECRET_DEV` in that project, and
configure the Shopdm dev merchant webhook to call that development function URL.
Firebase secrets require the development project to be on the Blaze plan.
Development webhook URL:
```text
https://us-central1-whsfund-dev-c5e40.cloudfunctions.net/shopdmPayWebhook
```