From 253ac63fe98940a55640be5bfc7a9645a926f742 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 21 Dec 2025 19:28:13 +0000 Subject: [PATCH 1/5] Refactor: Improve README setup instructions Co-authored-by: mathieumoran1 --- README.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 429591f..9889e5f 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,16 @@ Little nodejs + mongodb app that I hack together with ChatGPT and Cursor to keep - Version endpoint backed by latest GitHub commit (cached) ## Setup -Config those in your .env file: +Create a `.env` file at the project root (same folder as `package.json`). It’s not committed to git—each machine needs its own values. + +Minimal steps: + +```bash +npm install +node index.js +``` + +Configure these in your `.env` file (**required**: `MONGO_URI`, `JWT_SECRET`): **DOG_NAMES=**`woof, WOOF, Woof`     (for "verification")
**GITHUB_OWNER=**`quoije`     (for version history)
@@ -27,6 +36,17 @@ Config those in your .env file: **MONGO_URI=**`mongodb+srv://USER:PASS@cluster0.XXXX.mongodb.net/?retryWrites=true&w=majority&appName=Cluster69`
**OMDB_API=**`1234567`     (for movie info) +Example `.env`: + +```bash +MONGO_URI=mongodb://127.0.0.1:27017/oscars-pool +JWT_SECRET=change-me +DOG_NAMES=woof,WOOF,Woof +OMDB_API=your_omdb_key +GITHUB_OWNER=quoije +GITHUB_REPO=oscars-pool +``` + ## Database (MongoDB) This app uses **MongoDB** via Mongoose. Provide a connection string in `MONGO_URI`. @@ -35,5 +55,3 @@ This app uses **MongoDB** via Mongoose. Provide a connection string in `MONGO_UR - Atlas: `mongodb+srv://USER:PASS@cluster0.XXXX.mongodb.net/?retryWrites=true&w=majority` - Local: `mongodb://127.0.0.1:27017/` - Collections are created/managed automatically from the models in `models/` (e.g. `User`, `Movie`, `Setting`, `PlaybackProgress`). - -run with **node .\index.js** From afb158becac39870dd4bd9028f03023c729a5c88 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 21 Dec 2025 19:29:36 +0000 Subject: [PATCH 2/5] Fix: Remove redundant env file instruction Co-authored-by: mathieumoran1 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9889e5f..406f39d 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Little nodejs + mongodb app that I hack together with ChatGPT and Cursor to keep - Version endpoint backed by latest GitHub commit (cached) ## Setup -Create a `.env` file at the project root (same folder as `package.json`). It’s not committed to git—each machine needs its own values. +Create a `.env` file at the project root (same folder as `package.json`). Minimal steps: From 1f98a1a24ae9360d5d4f5de617815e3eb97f812e Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 21 Dec 2025 19:30:42 +0000 Subject: [PATCH 3/5] Refactor: Improve README env variable documentation Co-authored-by: mathieumoran1 --- README.md | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 406f39d..a95caea 100644 --- a/README.md +++ b/README.md @@ -27,20 +27,14 @@ npm install node index.js ``` -Configure these in your `.env` file (**required**: `MONGO_URI`, `JWT_SECRET`): - -**DOG_NAMES=**`woof, WOOF, Woof`     (for "verification")
-**GITHUB_OWNER=**`quoije`     (for version history)
-**GITHUB_REPO=**`oscars-pool`     (for version history)
-**JWT_SECRET=**`RANDOM STRING`     (for authentication token)
-**MONGO_URI=**`mongodb+srv://USER:PASS@cluster0.XXXX.mongodb.net/?retryWrites=true&w=majority&appName=Cluster69`
-**OMDB_API=**`1234567`     (for movie info) - -Example `.env`: +Add this to your `.env` (**required**: `MONGO_URI`, `JWT_SECRET`): ```bash +# required MONGO_URI=mongodb://127.0.0.1:27017/oscars-pool JWT_SECRET=change-me + +# optional DOG_NAMES=woof,WOOF,Woof OMDB_API=your_omdb_key GITHUB_OWNER=quoije From 4fe8ad84abe32b82702213a542f120b43ed192dc Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 21 Dec 2025 19:31:54 +0000 Subject: [PATCH 4/5] Refactor: Improve JWT secret generation instructions Co-authored-by: mathieumoran1 --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a95caea..a651c2b 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this to your `.env` (**required**: `MONGO_URI`, `JWT_SECRET`): ```bash # required MONGO_URI=mongodb://127.0.0.1:27017/oscars-pool -JWT_SECRET=change-me +JWT_SECRET=replace-with-a-random-string # optional DOG_NAMES=woof,WOOF,Woof @@ -41,6 +41,12 @@ GITHUB_OWNER=quoije GITHUB_REPO=oscars-pool ``` +Generate a good `JWT_SECRET`: + +```bash +openssl rand -hex 32 +``` + ## Database (MongoDB) This app uses **MongoDB** via Mongoose. Provide a connection string in `MONGO_URI`. From 12ea9ef160dbf7bb6be58355f221c0958b52d359 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 21 Dec 2025 19:32:59 +0000 Subject: [PATCH 5/5] Add comments to .env file for clarity Co-authored-by: mathieumoran1 --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a651c2b..cb6c829 100644 --- a/README.md +++ b/README.md @@ -31,14 +31,14 @@ Add this to your `.env` (**required**: `MONGO_URI`, `JWT_SECRET`): ```bash # required -MONGO_URI=mongodb://127.0.0.1:27017/oscars-pool -JWT_SECRET=replace-with-a-random-string +MONGO_URI=mongodb://127.0.0.1:27017/oscars-pool # MongoDB connection string +JWT_SECRET=replace-with-a-random-string # JWT signing secret (auth) # optional -DOG_NAMES=woof,WOOF,Woof -OMDB_API=your_omdb_key -GITHUB_OWNER=quoije -GITHUB_REPO=oscars-pool +DOG_NAMES=woof,WOOF,Woof # simple registration "verification" +OMDB_API=your_omdb_key # OMDb API key (movie info) +GITHUB_OWNER=quoije # version history +GITHUB_REPO=oscars-pool # version history ``` Generate a good `JWT_SECRET`: