-
Notifications
You must be signed in to change notification settings - Fork 143
Docs: Improve local setup instructions for API keys & .env file structure #215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
15465f8
5ad8a6d
092d143
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,14 @@ | ||
| user=postgres | ||
| password=[YOUR-PASSWORD] | ||
| host= | ||
| port=5432 | ||
| SUPABASE_URL=[URL] | ||
| SUPABASE_KEY=[YOUR-SUPABASE-KEY] | ||
|
|
||
| user=postgres.<project> | ||
| password=[YOUR-PASSWORD] | ||
| host=aws-<location>.pooler.supabase.com | ||
| port=5432 | ||
| dbname=postgres | ||
| GROQ_API_KEY= | ||
| SUPABASE_URL= | ||
| SUPABASE_KEY= | ||
| GEMINI_API_KEY= | ||
| YOUTUBE_API_KEY= | ||
|
|
||
| GROQ_API_KEY=[YOUR-GROQ-API-KEY] | ||
|
|
||
| GEMINI_API_KEY=[YOUR-GEMINI-API-KEY] | ||
|
|
||
| YOUTUBE_API_KEY=[YOUR-YOUTUBE-API-KEY] |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -84,15 +84,15 @@ Ensure you have the following installed: | |||||||||
| #### 1. Clone the repository | ||||||||||
|
|
||||||||||
| ```sh | ||||||||||
| git clone https://github.com/AOSSIE-Org/InPact.git | ||||||||||
| cd inpact | ||||||||||
| git clone https://github.com/AOSSIE-Org/InPactAI.git | ||||||||||
| cd InPactAI | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| #### 2. Frontend Setup | ||||||||||
|
|
||||||||||
| 1. Navigate to the frontend directory: | ||||||||||
| ```sh | ||||||||||
| cd frontend | ||||||||||
| cd Frontend | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| 2. Install dependencies: | ||||||||||
|
|
@@ -116,23 +116,34 @@ npm install | |||||||||
|
|
||||||||||
| 1. Navigate to the backend directory: | ||||||||||
| ```sh | ||||||||||
| cd ../backend | ||||||||||
| cd Backend | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| 2. Install dependencies: | ||||||||||
| 2. Create a virtual environment | ||||||||||
| ```sh | ||||||||||
| pip install -r requirements.txt | ||||||||||
| python -m venv venv | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| 3. Activate the virtual environment | ||||||||||
| ```sh | ||||||||||
| venv\Scripts\activate | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| 3. Navigate to the app directory: | ||||||||||
| 4. Install dependencies: | ||||||||||
| ```sh | ||||||||||
| pip install -r requirements.txt | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| 5. Navigate to the app directory: | ||||||||||
| ```sh | ||||||||||
| cd app | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| 4. Create a `.env` file using `.env-example` as a reference. | ||||||||||
| 6. Create a `.env` file | ||||||||||
|
|
||||||||||
| - Use `.env-example` file as reference | ||||||||||
|
|
||||||||||
| 5. Obtain Supabase credentials: | ||||||||||
| 7. Obtain Supabase credentials: | ||||||||||
|
|
||||||||||
| - Go to [Supabase](https://supabase.com/) | ||||||||||
| - Log in and create a new project | ||||||||||
|
|
@@ -161,10 +172,64 @@ cd app | |||||||||
| ``` | ||||||||||
|
|
||||||||||
|
|
||||||||||
| 6. Get the Groq API key: | ||||||||||
| 8. Get the Groq API key: | ||||||||||
| - Visit [Groq Console](https://console.groq.com/) | ||||||||||
| - Create an API key and paste it into the `.env` file | ||||||||||
|
|
||||||||||
| 9. Get the YouTube API key: | ||||||||||
| - Visit [Groq Console](https://console.cloud.google.com/) | ||||||||||
|
Comment on lines
+179
to
+180
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix incorrect link text. Line 180 says "Visit [Groq Console]" but links to Google Cloud Console. This appears to be a copy-paste error from step 8. π Suggested fix 9. Get the YouTube API key:
- - Visit [Groq Console](https://console.cloud.google.com/)
+ - Visit [Google Cloud Console](https://console.cloud.google.com/)π Committable suggestion
Suggested change
π€ Prompt for AI Agents |
||||||||||
| - Sign in with your Google Account | ||||||||||
| - Select "Default Project" or Create "New Project", Look at the top | ||||||||||
| - In sidebar go to "APIs & Services" then click "Library" | ||||||||||
| - Serach "YouTube Data API v3" | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo: "Serach" β "Search". π Suggested fix- - Serach "YouTube Data API v3"
+ - Search "YouTube Data API v3"π Committable suggestion
Suggested change
π€ Prompt for AI Agents |
||||||||||
| - Click Enable | ||||||||||
| - Now again go to "APIs & Services" then click "Credentials" | ||||||||||
| - Click "Create Credentials" then "API key" | ||||||||||
| - Click "Show Key" and copy the API key and paste it into the `.env` file | ||||||||||
|
|
||||||||||
| 10. Get the Gemini API key: | ||||||||||
| - Visit [Google AI Studio](https://aistudio.google.com/) | ||||||||||
| - SignIn/SignUp with Google account | ||||||||||
| - Click "API Keys" left side panel | ||||||||||
| - Click "Create API Key" | ||||||||||
| - Name your key "..." and select "Default Gemini Project" | ||||||||||
| - Click "Create key" | ||||||||||
| - Paste the API Key into the `.env` file | ||||||||||
|
|
||||||||||
| 11. Final `.env` file should look: | ||||||||||
|
|
||||||||||
| ```sh | ||||||||||
| SUPABASE_URL=[URL] | ||||||||||
| SUPABASE_KEY=[URL] | ||||||||||
|
|
||||||||||
| user=postgres | ||||||||||
| password=[YOUR-PASSWORD] | ||||||||||
| host=db.wveftanaurduixkyijhf.supabase.co | ||||||||||
| port=5432 | ||||||||||
| dbname=postgres | ||||||||||
|
|
||||||||||
| GROQ_API_KEY=[URL] | ||||||||||
|
|
||||||||||
| GEMINI_API_KEY=[URL] | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| [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 | ||||||||||
| SUPABASE_URL=[URL] | ||||||||||
| SUPABASE_KEY=[URL] | ||||||||||
|
|
||||||||||
| user=postgres.<project> | ||||||||||
| password=[YOUR-PASSWORD] | ||||||||||
| host=aws-<location>.pooler.supabase.com | ||||||||||
| port=5432 | ||||||||||
| dbname=postgres | ||||||||||
|
|
||||||||||
| GROQ_API_KEY=[URL] | ||||||||||
|
|
||||||||||
| GEMINI_API_KEY=[URL] | ||||||||||
| ``` | ||||||||||
|
Comment on lines
+199
to
+231
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Final Step 9 documents obtaining the YouTube API key, and π Suggested fix (showing IPv6 block; apply same to IPv4 block) ```sh
SUPABASE_URL=[URL]
- SUPABASE_KEY=[URL]
+ SUPABASE_KEY=[YOUR-SUPABASE-KEY]
user=postgres
password=[YOUR-PASSWORD]
host=db.wveftanaurduixkyijhf.supabase.co
port=5432
dbname=postgres
- GROQ_API_KEY=[URL]
+ GROQ_API_KEY=[YOUR-GROQ-API-KEY]
- GEMINI_API_KEY=[URL]
+ GEMINI_API_KEY=[YOUR-GEMINI-API-KEY]
+
+ YOUTUBE_API_KEY=[YOUR-YOUTUBE-API-KEY]
```π€ Prompt for AI Agents |
||||||||||
|
|
||||||||||
| #### 4. Start Development Servers | ||||||||||
|
|
||||||||||
|
|
||||||||||
|
|
@@ -173,9 +238,9 @@ cd app | |||||||||
| npm run dev | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| 2. Start the backend server (from the backend/app directory): | ||||||||||
| 2. Start the backend server (from the backend directory): | ||||||||||
| ```sh | ||||||||||
| uvicorn main:app --reload | ||||||||||
| uvicorn app.main:app --reload | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| ## Data Population | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add cross-platform venv activation instructions.
The activation command is Windows-specific. Issue #178 explicitly requested instructions for Windows/macOS/Linux.
π Suggested fix
+
sh +source venv/bin/activate +π€ Prompt for AI Agents