From 44a1dcd869c14bfffb37d06ee3f24d61f47f5d78 Mon Sep 17 00:00:00 2001 From: Rehan959 Date: Sun, 9 Nov 2025 00:08:13 +0530 Subject: [PATCH 1/5] Add new feature --- apps/api/.env.example | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 apps/api/.env.example diff --git a/apps/api/.env.example b/apps/api/.env.example new file mode 100644 index 0000000..2f07a4f --- /dev/null +++ b/apps/api/.env.example @@ -0,0 +1,12 @@ +# Required +DATABASE_URL="postgresql://USER:PASSWORD@localhost:5432/your_database_name?schema=public" +JWT_SECRET="replace-with-a-strong-random-secret" + +# Optional (good defaults shown) +PORT=8080 +CORS_ORIGINS=http://localhost:3000 +NODE_ENV=development + +# Optional but needed for GitHub queries to work +# Generate a classic token with "public_repo" access at https://github.com/settings/tokens +GITHUB_PERSONAL_ACCESS_TOKEN=your_github_personal_access_token_here From 46ae0cda67d1fedc8ee0193c1e0c683b8aba83f3 Mon Sep 17 00:00:00 2001 From: Rehan959 Date: Sun, 9 Nov 2025 10:28:47 +0530 Subject: [PATCH 2/5] Changed the issues --- apps/api/.env.example | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/api/.env.example b/apps/api/.env.example index 2f07a4f..2fe9ef5 100644 --- a/apps/api/.env.example +++ b/apps/api/.env.example @@ -7,6 +7,7 @@ PORT=8080 CORS_ORIGINS=http://localhost:3000 NODE_ENV=development -# Optional but needed for GitHub queries to work +# Optional GitHub integration +# To enable GitHub queries, set GITHUB_PERSONAL_ACCESS_TOKEN in your local .env file # Generate a classic token with "public_repo" access at https://github.com/settings/tokens -GITHUB_PERSONAL_ACCESS_TOKEN=your_github_personal_access_token_here +# GITHUB_PERSONAL_ACCESS_TOKEN should NEVER be committed to version control From 521d0f9c2cc161209ab0c906a32f9ef834da0ba9 Mon Sep 17 00:00:00 2001 From: apsinghdev Date: Sun, 9 Nov 2025 20:12:06 +0530 Subject: [PATCH 3/5] chore: add missing env vars --- README.md | 11 +++++++++-- apps/api/.env.example | 31 +++++++++++++++++++++++-------- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index eceed50..d51d265 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,14 @@ Create environment files for both the backend and the frontend before running th ### Backend (`apps/api/.env`) -Create a file at `apps/api/.env` with: +Copy the example environment file and update it with your values: + +```bash +cd apps/api +cp .env.example .env +``` + +Then edit `apps/api/.env` and fill in the required values: ```bash # Required @@ -190,7 +197,7 @@ Alternatively, you can run the API server using Docker. A `Dockerfile` is provid ### Building and Running -1. Make sure you have your `.env` file set up in `apps/api/.env` (see [Backend environment variables](#backend-appsapienv) section above) +1. Make sure you have your `.env` file set up in `apps/api/.env`. You can copy from `.env.example` (see [Backend environment variables](#backend-appsapienv) section above) 2. From the root directory, build the Docker image: diff --git a/apps/api/.env.example b/apps/api/.env.example index 2fe9ef5..53309b2 100644 --- a/apps/api/.env.example +++ b/apps/api/.env.example @@ -1,13 +1,28 @@ # Required +CORS_ORIGINS=http://localhost:3000 +NODE_ENV=development +PORT=8080 + DATABASE_URL="postgresql://USER:PASSWORD@localhost:5432/your_database_name?schema=public" JWT_SECRET="replace-with-a-strong-random-secret" -# Optional (good defaults shown) -PORT=8080 -CORS_ORIGINS=http://localhost:3000 -NODE_ENV=development +# compulsory for the project search tool +# Get a PAT from here https://github.com/settings/developers +GITHUB_PERSONAL_ACCESS_TOKEN=token-from-your-github-account + +# for payments +RAZORPAY_KEY_ID=razorpay-key-id +RAZORPAY_KEY_SECRET=razorpay-key-secret +RAZORPAY_WEBHOOK_SECRET=razorpay-webhook-secret + +# to send slack invite. +# it'll be similar to : https://join.slack.com/t/name-of-ur-org/shared_invite/invite-id +SLACK_INVITE_URL=slack-invite-url + +# to send the email (transactional) +# get one from here: https://www.zoho.com/zeptomail/pricing.html?src=pd-menu +ZEPTOMAIL_TOKEN=zeptomail-token -# Optional GitHub integration -# To enable GitHub queries, set GITHUB_PERSONAL_ACCESS_TOKEN in your local .env file -# Generate a classic token with "public_repo" access at https://github.com/settings/tokens -# GITHUB_PERSONAL_ACCESS_TOKEN should NEVER be committed to version control +# key for the encryption +# can be created by running this : echo "$(openssl rand -hex 32)opensox$(openssl rand -hex 16) +ENCRYPTION_KEY=encryption-key From 991ceb486646501efb8cb72e0e62310ad15633c9 Mon Sep 17 00:00:00 2001 From: apsinghdev Date: Sun, 9 Nov 2025 20:16:18 +0530 Subject: [PATCH 4/5] chore: add a note for docker build --- apps/api/.env.example | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/api/.env.example b/apps/api/.env.example index 53309b2..1eb45bb 100644 --- a/apps/api/.env.example +++ b/apps/api/.env.example @@ -1,10 +1,14 @@ +# Note: pls don't use values as strings for the below variables, if you wanna run using docker becuase in this case, docker build fails. +# simply use a format like this: name-of-the-variable=variable-value +# for example: PORT=8080 + # Required CORS_ORIGINS=http://localhost:3000 NODE_ENV=development PORT=8080 -DATABASE_URL="postgresql://USER:PASSWORD@localhost:5432/your_database_name?schema=public" -JWT_SECRET="replace-with-a-strong-random-secret" +DATABASE_URL=postgresql://USER:PASSWORD@localhost:5432/your_database_name?schema=public +JWT_SECRET=replace-with-a-strong-random-secret # compulsory for the project search tool # Get a PAT from here https://github.com/settings/developers From 7c5afdab7b76a11b9018ddea4926316364d56f12 Mon Sep 17 00:00:00 2001 From: Ajeet Pratap Singh Date: Sun, 9 Nov 2025 20:19:02 +0530 Subject: [PATCH 5/5] Update apps/api/.env.example Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- apps/api/.env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/.env.example b/apps/api/.env.example index 1eb45bb..12e24a4 100644 --- a/apps/api/.env.example +++ b/apps/api/.env.example @@ -28,5 +28,5 @@ SLACK_INVITE_URL=slack-invite-url ZEPTOMAIL_TOKEN=zeptomail-token # key for the encryption -# can be created by running this : echo "$(openssl rand -hex 32)opensox$(openssl rand -hex 16) +# can be created by running this: echo "$(openssl rand -hex 32)opensox$(openssl rand -hex 16)" ENCRYPTION_KEY=encryption-key