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
145 changes: 77 additions & 68 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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.
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.<project>
password=[YOUR-PASSWORD]
host=aws-<location>.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
```
Comment on lines +118 to +156
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Backend setup and environment configuration look clear and well-structured.

The virtual environment setup (lines 118–131) is excellent for beginners, with platform-specific activation commands. The consolidated .env file example (lines 142–156) with accompanying table (lines 158–168) provides clear, actionable guidance. Direct links to API credential sources are very helpful.

Minor suggestions:

  • Line 145 (password=YOUR_DB_PASSWORD): Consider a brief inline comment clarifying that users should copy this from their Supabase project settings (the table explains it, but a quick note here aids readability).
  • Ensure requirements.txt exists at the backend root and main.py exists in backend/app/ before users run the commands.

Run this script to verify the directory structure and key files exist:


🏁 Script executed:

#!/bin/bash
# Verify backend structure for the documented setup

echo "=== Checking backend directory structure ==="
find . -type d -name backend -o -type d -name frontend 2>/dev/null | head -5

echo "=== Checking for requirements.txt in backend ==="
find . -name requirements.txt -path "*/backend/*" 2>/dev/null

echo "=== Checking for main.py in backend/app ==="
find . -name main.py -path "*/backend/app/*" 2>/dev/null

Length of output: 137


I need to explore the repository structure more broadly to understand the actual layout and locate the backend files.


---

🏁 Script executed:

```shell
#!/bin/bash
# Get broader view of repository structure

echo "=== Repository root contents ==="
ls -la | head -20

echo "=== Top-level directories ==="
find . -maxdepth 1 -type d | sort

echo "=== Search for requirements.txt anywhere ==="
find . -name "requirements.txt" 2>/dev/null

echo "=== Search for main.py anywhere ==="
find . -name "main.py" 2>/dev/null

echo "=== Search for any Python files in app directory ==="
find . -path "*/app/*.py" 2>/dev/null | head -10

Length of output: 1171


Now I need to check the actual README content to see if there's a case-sensitivity mismatch in the documented paths.


---

🏁 Script executed:

```shell
#!/bin/bash
# Check the actual README content for backend path references

echo "=== README lines 118-156 (backend setup section) ==="
sed -n '118,156p' README.md

echo ""
echo "=== Search for lowercase 'cd ../backend' in README ==="
grep -n "cd ../backend" README.md

echo ""
echo "=== Search for any backend path references in README ==="
grep -n "backend" README.md

Length of output: 1069


Correct the directory path casing throughout the backend setup instructions.

The repository uses capitalized directory names (Backend/, not backend/), but the README documents lowercase paths. This causes failures on case-sensitive systems (Linux, macOS). Update:

  • Line 121: cd ../backendcd ../Backend
  • Line 140: backend/app/Backend/app/
  • Line 181: cd backend/appcd Backend/app

The required files (requirements.txt and main.py) do exist in the correct locations, so no structural issues remain once paths are corrected.

🤖 Prompt for AI Agents
In README.md around lines 118 to 156, the backend path casing is incorrect for
case-sensitive filesystems; update all occurrences of "backend" to "Backend" in
these instructions (specifically change the cd command at line ~121 from cd
../backend to cd ../Backend, update the .env creation path at ~140 from
backend/app/ to Backend/app/, and change the final cd at ~181 from cd
backend/app to cd Backend/app), and scan nearby lines in this block to ensure
any other lowercase "backend" occurrences are similarly corrected so commands
and paths match the repository's capitalized directory names.


**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)<br>2. New Project → Enable YouTube Data API v3<br>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

Expand Down