From a61ddb27ffa8db85047104dbc639b0f2ac94de66 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Fri, 12 Jun 2026 10:50:18 +0530 Subject: [PATCH] docs: add local setup notes --- CONTRIBUTING.md | 15 +++++++++++++++ README.md | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 77e0f42..62efb9f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -67,6 +67,21 @@ Preferred types are: Keep commit messages short and specific. Avoid vague messages like `updates`, `changes`, or `fix stuff`. +## Local Environment Setup + +PiperChat has separate frontend and backend environment files. Before running the app locally: + +1. Copy `server/.env.example` to `server/.env`. +2. Copy `frontend/.env.example` to `frontend/.env`. +3. Fill in the required values for `MONGO_URI`, `ACCESS_TOKEN`, `VITE_URL`, and `VITE_FRONT_END_URL`. + +Optional services: + +- **Email OTP**: set `MAIL_TRANSPORT`, `MAIL_USER`, and `MAIL_PASS` if you want real email delivery. For Gmail, use an App Password rather than your regular login password. +- **Avatar uploads**: set `VITE_SUPABASE_URL`, `VITE_SUPABASE_ANON_KEY`, and `VITE_SUPABASE_BUCKET` if you want profile image uploads to work. The app still runs without Supabase, but avatar uploads will be disabled. + +If these values are missing, you may see login, verification, or profile-image behavior fail locally even when the UI loads correctly. + ## Test Expectations Before requesting review, run the checks that apply to your change. diff --git a/README.md b/README.md index 82918b0..b415a3e 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,8 @@ PiperChat01/ - `server/` → Express + MongoDB + Socket.IO API (ESM) - `frontend/` → Vite + Tailwind UI +For contribution workflow and local setup notes, see [CONTRIBUTING.md](CONTRIBUTING.md). + ## System Architecture To help contributors understand the data flow, here is the technical visualization of how PiperChat components interact: @@ -239,4 +241,4 @@ npm run test:auth:unit - Set `NODE_ENV=production` - Use a production MongoDB connection string - Configure Logtail variables if production logging is needed -- Prefer `MAIL_TRANSPORT=gmail_api` for production deployments \ No newline at end of file +- Prefer `MAIL_TRANSPORT=gmail_api` for production deployments