Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ This Project serves the backend APIs required for [Real Dev Squad](https://reald
## Prerequisites

- The application uses [node-config](https://github.com/lorenwest/node-config)([documentation](https://github.com/lorenwest/node-config/wiki/Configuration-Files)) for managing config.
- Create a new file: `config/local.js`. Override the required config values from `config/development.js` and `config/default.js` into `config/local.js`.
-Create a new file: `config/local.js`.

To make setup easier, you can simply copy all the contents from `config/development.js` into `config/local.js`.
Then, update only the GitHub OAuth credentials with your own values:

```js
clientId: "<YOUR_GITHUB_CLIENT_ID>",
clientSecret: "<YOUR_GITHUB_CLIENT_SECRET>
"
Comment on lines +29 to +32
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix syntax error in the code snippet.

The closing quote for clientSecret is malformed. Line 31 ends without a closing quote, and line 32 contains a stray " character. This provides broken code to users attempting to follow the setup guide.

Apply this diff to correct the syntax error:

 ```js
 clientId: "<YOUR_GITHUB_CLIENT_ID>",
-clientSecret: "<YOUR_GITHUB_CLIENT_SECRET>
-"
+clientSecret: "<YOUR_GITHUB_CLIENT_SECRET>"

<details>
<summary>🤖 Prompt for AI Agents</summary>

In README.md around lines 29 to 32, the clientSecret string is broken across
lines leaving a missing closing quote and a stray quote on the next line; fix by
putting the entire clientSecret value on one line with matching opening and
closing quotes so it reads clientSecret: "<YOUR_GITHUB_CLIENT_SECRET>" (remove
the stray newline and extra quote).


</details>

<!-- This is an auto-generated comment by CodeRabbit -->

- Register the application for [GitHub OAuth](https://docs.github.com/en/developers/apps/creating-an-oauth-app) to get the `clientId` and `clientSecret`. Add the callback URL as `http://<HOSTNAME>:<PORT>/auth/github/callback`
- Create an application on [FireStore](https://firebase.google.com/docs/firestore) and [generate a service file](https://cloud.google.com/iam/docs/creating-managing-service-account-keys). Add the service file credentials in the local config (or your env variables) as a string. Make sure you convert all the escape sequence (newline) - `\n` with `\\n` in private_key field.
- For running the project locally, [Firebase Local Emulator Suite](https://firebase.google.com/docs/emulator-suite) can also be used instead of using the remote DB. Steps for setting it up: [CONTRIBUTING.md - Using Firebase Emulator Locally](https://github.com/Real-Dev-Squad/website-backend/blob/develop/CONTRIBUTING.md#using-firebase-emulator-locally)
Expand Down