Update setup instructions and .env template for clarity

Enhanced README.md with detailed setup steps for Firebase, Supabase, and Mailgun, ensuring better guidance for new users. Standardized the .env.local.TEMPLATE format by removing spaces around equal signs for consistency.
This commit is contained in:
Chris Jackett
2024-08-04 10:19:06 +10:00
parent db2462da4b
commit c3933cc552
2 changed files with 51 additions and 16 deletions

View File

@@ -32,7 +32,41 @@ See the [SIV Public License](/LICENSE) for further details.
### Initial set up
1. Duplicate the file `.env.local.TEMPLATE` into `.env.local`
2. Create (free) accounts with the providers listed in that file, adding your new API keys
2. Create (free) accounts with the providers listed in the `.env.local` file and add your new API keys as described below:
**Firebase**:
1. Visit [Firebase](https://firebase.google.com/) and sign in with your Google account
2. Click on "Get Started" and create a new project
3. Navigate to the project settings (cog icon) and go to "Project setting" -> "Service accounts"
4. Generate a new private key for the Firebase Admin SDK and download the JSON file
5. Extract the following values from the JSON file and add them to your `.env.local`:
* `FIREBASE_CLIENT_EMAIL`: Found in the "client_email" field
* `FIREBASE_PRIVATE_KEY`: Found in the "private_key" field
* Note: Ensure this key is enclosed in double quotes
* `FIREBASE_PROJECT_ID`: Found in the "project_id" field
**Supabase**:
1. Visit [Supabase](https://supabase.com/) and sign up for an account
2. Create a new project and note down the project URL and the public API key
3. Go to the project settings and add the following values to your `.env.local`:
* `SUPABASE_ADMIN_KEY`: Found in "API" -> "Project API keys" under "anon public"
* `SUPABASE_DB_URL`: Found in "Database" -> "Connection parameters" under "Host"
* `SUPABASE_JWT_SECRET`: Found in "API" -> "JWT Settings" under "JWT Secret"
**Mailgun**:
1. Visit [Mailgun](https://mailgun.com/) and sign up for a free account
2. Use the default sandbox domain provided by Mailgun for testing purposes.
3. Click on your account menu (top-right)
* Go to "Mailgun API keys" and hit "Add new key"
* Give the key a description such as "SIV"
* Copy the new API key and add it to `.env.local` under `MAILGUN_API_KEY`
4. Go back to the Dashboard and click on the sandbox account under "Sending domains"
* Note: the domain will look like `sandbox<XXXX>.mailgun.org`
* Copy this domain and add it to `.env.local` under `MAILGUN_DOMAIN`
5. Add "Authorized Recipients" email addresses on the right that you will test with
6. Now test that everything is set up correctly using the appropriate command provided in the API panel
3. Install local dependencies:
```bash