From 405111842a9203a3d0ef4f9c2d9c0d3b5acd998a Mon Sep 17 00:00:00 2001 From: Sunil Baghel Date: Mon, 17 Nov 2025 20:41:09 +0530 Subject: [PATCH 1/2] Update README.md --- README.md | 145 +++++++++++++++++++++++++++++------------------------- 1 file changed, 77 insertions(+), 68 deletions(-) diff --git a/README.md b/README.md index 07d283d..e27e090 100644 --- a/README.md +++ b/README.md @@ -73,110 +73,119 @@ Inpact is an open-source AI-powered platform designed to connect content creator ### Prerequisites -Ensure you have the following installed: +Make sure you have these installed: +- Node.js (v18 or higher) + npm +- Python 3.9+ +- Git +- A Supabase account (free tier is enough) -- Node.js & npm -- Python & FastAPI -- Supabase account +### Local Development Setup (Step-by-Step) -### Installation - -#### 1. Clone the repository - -```sh +#### 1. Clone the Repository +```bash git clone https://github.com/AOSSIE-Org/InPact.git -cd inpact +cd InPact ``` #### 2. Frontend Setup -1. Navigate to the frontend directory: -```sh +```bash cd frontend -``` - -2. Install dependencies: -```sh npm install ``` +Create a `.env` file in the `frontend/` folder: +```env +VITE_SUPABASE_URL=https://your-project.supabase.co +VITE_SUPABASE_ANON_KEY=your-anon-public-key +VITE_YOUTUBE_API_KEY=your-youtube-api-key +``` -3. Create a `.env` file using `.env-example` file: +**How to get Supabase frontend keys:** +1. Go to [https://app.supabase.com](https://app.supabase.com) +2. Open your project → **Settings** → **API** +3. Copy **Project URL** → `VITE_SUPABASE_URL` +4. Copy **anon public** key → `VITE_SUPABASE_ANON_KEY` +**How to Youtube API Key** +1. Log in to the [https://console.cloud.google.com/](https://console.cloud.google.com/) +2. Create a new project or select an existing one from the project drop-down menu. +3. In the Cloud Console, search for "YouTube Data API" in the search bar and select "YouTube Data API v3" from the results. +4. Click the "Enable" button to enable the API for your project. +5. Navigate to the "Credentials" tab in the left-hand menu. +6. Click "Create Credentials" and then select "API key" from the dropdown menu and now use that api key. +#### 3. Backend Setup (with Python Virtual Environment – Highly Recommended) -4. Get your Supabase credentials: - - Go to [Supabase](https://supabase.com/) - - Log in and create a new project (or use existing) - - Go to Project Settings -> API - - Copy the "Project URL" and paste it as VITE_SUPABASE_URL - - Copy the "anon public" key and paste it as VITE_SUPABASE_ANON_KEY +```bash +cd ../backend -#### 3. Backend Setup +# Create a virtual environment (isolates dependencies) +python -m venv venv -1. Navigate to the backend directory: -```sh -cd ../backend -``` +# Activate it +# Windows: +venv\Scripts\activate +# macOS / Linux: +source venv/bin/activate -2. Install dependencies: -```sh +# Install backend dependencies pip install -r requirements.txt -``` - -3. Navigate to the app directory: -```sh cd app ``` -4. Create a `.env` file using `.env-example` as a reference. - -5. Obtain Supabase credentials: - - - Go to [Supabase](https://supabase.com/) - - Log in and create a new project - - Click on the project and remember the project password - - Go to the **Connect** section at the top - - Select **SQLAlchemy** and copy the connection string: +#### 4. Create Backend `.env` File - ```sh - user=postgres - password=[YOUR-PASSWORD] - host=db.wveftanaurduixkyijhf.supabase.co - port=5432 - dbname=postgres - ``` +Create `.env` in `backend/app/` and fill all values: - --OR-- +```env +# Supabase Database Connection +user=postgres +password=YOUR_DB_PASSWORD +host=db.yourproject.supabase.co +port=5432 +dbname=postgres - [The above works in ipv6 networks, if you are in ipv4 network or it cause errors, use the below connection string which could be found in Session Pooler connection] - - ```sh - user=postgres. - password=[YOUR-PASSWORD] - host=aws-.pooler.supabase.com - port=5432 - dbname=postgres - ``` +# API Keys +GROQ_API_KEY=your_groq_key +SUPABASE_URL=https://your-project.supabase.co +SUPABASE_KEY=your-anon-public-key +GEMINI_API_KEY=your_gemini_key +YOUTUBE_API_KEY=your_youtube_key +``` +**Where to get each key (with direct links):** -6. Get the Groq API key: - - Visit [Groq Console](https://console.groq.com/) - - Create an API key and paste it into the `.env` file +| Variable | Service | How to Get (Step-by-Step) | +|---------------------|--------------------------------|-------------------------------------------------------------------------------------------------------------| +| `SUPABASE_URL` & `SUPABASE_KEY` | Supabase | Same as frontend → **Settings → API** → copy URL & anon key | +| `host` & `password` | Supabase PostgreSQL | **Settings → Database → Connection info** → copy Host + the password you set when creating the project | +| `GROQ_API_KEY` | Groq (fast AI inference) | → [console.groq.com/keys](https://console.groq.com/keys) → Create API Key → copy (`gsk_...`) | +| `GEMINI_API_KEY` | Google Gemini | → [aistudio.google.com/app/apikey](https://aistudio.google.com/app/apikey) → Create API key | +| `YOUTUBE_API_KEY` | YouTube Data API v3 | 1. [console.cloud.google.com](https://console.cloud.google.com)
2. New Project → Enable YouTube Data API v3
3. Credentials → Create API Key | -#### 4. Start Development Servers +All are free for development use. +#### 5. Start the Servers -1. Start the frontend server (from the frontend directory): -```sh +**Terminal 1 (Frontend):** +```bash +cd frontend npm run dev ``` +→ Opens at `http://localhost:5173` -2. Start the backend server (from the backend/app directory): -```sh +**Terminal 2 (Backend – make sure venv is active):** +```bash +cd backend/app uvicorn main:app --reload ``` +→ Runs at `http://127.0.0.1:8000` + +You’re all set! Open `http://localhost:5173` and register/login. + +--- ## Data Population From df4d5be5c38c516c91495e13633ab19001e6ca28 Mon Sep 17 00:00:00 2001 From: Sunil Baghel Date: Mon, 17 Nov 2025 20:50:38 +0530 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e27e090..4e3acc5 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ VITE_YOUTUBE_API_KEY=your-youtube-api-key 3. Copy **Project URL** → `VITE_SUPABASE_URL` 4. Copy **anon public** key → `VITE_SUPABASE_ANON_KEY` -**How to Youtube API Key** +**How to get Youtube API Key** 1. Log in to the [https://console.cloud.google.com/](https://console.cloud.google.com/) 2. Create a new project or select an existing one from the project drop-down menu. 3. In the Cloud Console, search for "YouTube Data API" in the search bar and select "YouTube Data API v3" from the results.