Skip to content
Open
Show file tree
Hide file tree
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
56 changes: 56 additions & 0 deletions InPactAI-main/.github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: "🐞 Bug Report"
description: "Create a report to help us improve"
title: "BUG:"
labels: ["Bug"]
body:
- type: checkboxes
attributes:
label: "Is there an existing issue for this?"
description: "Please search to see if an issue already exists for the bug you encountered."
options:
- label: "I have searched the existing issues"
required: true
- type: markdown
attributes:
value: |
> [!IMPORTANT]
> Before posting, remove sensitive data, such as passwords, secret keys, session cookies, etc.
- type: textarea
attributes:
label: "What happened?"
description: "Please provide a detailed description of the issue, including the following information:"
value: |
## πŸ“Œ Issue Overview
<!-- Provide a brief summary of the issue -->

## πŸ” Steps to Reproduce
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See the error

## 🎯 Expected Behavior
<!-- What should happen? -->

## 🚨 Actual Behavior
<!-- What actually happened? -->

## πŸ“· Screenshot
<!-- Attach screenshots if applicable -->

## πŸ’‘ Suggested Improvements
<!-- Any ideas for a fix? -->
validations:
required: true
- type: checkboxes
attributes:
label: "Record"
options:
- label: "I agree to follow this project's Code of Conduct"
required: true
- label: "I want to work on this issue"
required: false
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! πŸ‘
49 changes: 49 additions & 0 deletions InPactAI-main/.github/ISSUE_TEMPLATE/documentation_update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "πŸ“š Documentation Update"
description: "Suggest updates or improvements to the documentation"
title: "DOCS UPDATE:"
labels: ["Documentation"]
body:
- type: checkboxes
attributes:
label: "Is this related to an existing part of the documentation?"
description: "Please confirm if your suggestion is related to an existing section of the documentation."
options:
- label: "Yes, it is related to an existing section"
required: false
- type: markdown
attributes:
value: |
> [!IMPORTANT]
> Please ensure your suggestion aligns with the project's goals and scope. Provide as much detail as possible for clarity.
- type: textarea
attributes:
label: "What needs to be updated?"
description: "Provide a clear and concise description of the section that needs updating or improvement."
value: |
## πŸ“Œ Current Documentation Issue
<!-- Describe what is missing, unclear, or incorrect in the current documentation. -->

## ✨ Proposed Changes
<!-- Describe the changes you are suggesting. -->

## πŸ“‹ Additional Context
<!-- Add any other context, screenshots, or examples about your suggestion here. -->
validations:
required: true
- type: input
attributes:
label: "Relevant Documentation Link (if any)"
description: "Provide a link to the relevant documentation page that needs updating."
placeholder: "e.g., https://github.com/your-repo/docs/README.md"
- type: checkboxes
attributes:
label: "Record"
options:
- label: "I agree to follow this project's Code of Conduct"
required: true
- label: "I want to work on this update"
required: false
- type: markdown
attributes:
value: |
Thanks for helping improve our documentation! πŸ“– Your contribution is greatly appreciated.
50 changes: 50 additions & 0 deletions InPactAI-main/.github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "✨ Feature Request"
description: "Suggest a new feature or enhancement"
title: "FEATURE REQUEST:"
labels: ["Feature Request"]
body:
- type: checkboxes
attributes:
label: "Is your feature request related to a problem?"
description: "Please check if your feature request is related to an existing problem."
options:
- label: "Yes, it is related to a problem"
required: true
- type: markdown
attributes:
value: |
> [!IMPORTANT]
> Before submitting, please ensure your feature request aligns with the project's goals and scope.
- type: textarea
attributes:
label: "Describe the feature you'd like"
description: "Provide a clear and concise description of the feature or enhancement you'd like to see."
value: |
## 🌟 Feature Description
<!-- What is the feature or enhancement you are suggesting? -->

## πŸ” Problem Statement
<!-- If applicable, explain the problem your feature request will solve. -->

## 🎯 Expected Outcome
<!-- Describe what you want to achieve with this feature. -->

## πŸ“· Screenshots and Design Ideas
<!-- Attach any relevant screenshots or mockups. Describe your design ideas that could solve this. -->

## πŸ“‹ Additional Context
<!-- Add any other context about the feature request here. -->
validations:
required: true
- type: checkboxes
attributes:
label: "Record"
options:
- label: "I agree to follow this project's Code of Conduct"
required: true
- label: "I want to work on implementing this feature"
required: false
- type: markdown
attributes:
value: |
Thanks for suggesting a new feature! πŸš€ We appreciate your input and will review it soon.
36 changes: 36 additions & 0 deletions InPactAI-main/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!-- What issue does this PR close? -->
Closes #


## πŸ“ Description

<!-- A clear and concise description of what this pull request does. -->
<!-- Include any context or background information if necessary. -->

## πŸ”§ Changes Made

<!-- List the changes you made in this pull request. -->
<!-- For example:
- Fixed a bug in the login flow.
- Added a new feature for user profile customization.
- Updated documentation for API endpoints.
-->

## πŸ“· Screenshots or Visual Changes (if applicable)

<!-- Attach screenshots or GIFs to show visual changes, if any. -->
<!-- Drag and drop screenshots here or provide a description of visual updates. -->

## 🀝 Collaboration

<!-- If you collaborated with someone on this pull request, mention their GitHub username or name here. -->
Collaborated with: `@username` (optional)


### βœ… Checklist

- [ ] I have read the contributing guidelines.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] I have added necessary documentation (if applicable).
- [ ] Any dependent changes have been merged and published in downstream modules.

31 changes: 31 additions & 0 deletions InPactAI-main/.github/workflows/update-project-structure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Auto-Update Project Structure
on:
pull_request:
types: [closed]
branches: [main]

jobs:
update-structure:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Generate project structure file
run: tree -a -I 'node_modules|.git' -f > project_structure.txt


- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update project structure (auto)"
branch: main
commit_user_name: "CI Bot"
commit_user_email: "ci-bot@example.com"
commit_author: "CI Bot <ci-bot@example.com>"
38 changes: 38 additions & 0 deletions InPactAI-main/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Node modules
node_modules

# Build output
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Python
__pycache__/
*.py[cod]
*.pyo
*.pyd
venv/
env/
ENV/
venv.bak/
pycache/
10 changes: 10 additions & 0 deletions InPactAI-main/Backend/.env-example
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
user=postgres
password=[YOUR-PASSWORD]
host=
port=5432
dbname=postgres
GROQ_API_KEY=
SUPABASE_URL=
SUPABASE_KEY=
GEMINI_API_KEY=
YOUTUBE_API_KEY=
4 changes: 4 additions & 0 deletions InPactAI-main/Backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.env
__pycache__/
venv
.venv
Empty file.
40 changes: 40 additions & 0 deletions InPactAI-main/Backend/app/db/db.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession
from sqlalchemy.orm import sessionmaker, declarative_base
from sqlalchemy.exc import SQLAlchemyError
import os
from dotenv import load_dotenv

# Load environment variables from .env
load_dotenv()

# Fetch database credentials
USER = os.getenv("user")
PASSWORD = os.getenv("password")
HOST = os.getenv("host")
PORT = os.getenv("port")
DBNAME = os.getenv("dbname")

# Corrected async SQLAlchemy connection string (removed `sslmode=require`)
DATABASE_URL = f"postgresql+asyncpg://{USER}:{PASSWORD}@{HOST}:{PORT}/{DBNAME}"

# Initialize async SQLAlchemy components
try:
engine = create_async_engine(
DATABASE_URL, echo=True, connect_args={"ssl": "require"}
)

AsyncSessionLocal = sessionmaker(
bind=engine, class_=AsyncSession, expire_on_commit=False
)
Base = declarative_base()
print("βœ… Database connected successfully!")
except SQLAlchemyError as e:
print(f"❌ Error connecting to the database: {e}")
engine = None
AsyncSessionLocal = None
Base = None


async def get_db():
async with AsyncSessionLocal() as session:
yield session
57 changes: 57 additions & 0 deletions InPactAI-main/Backend/app/db/seed.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
from datetime import datetime
from app.db.db import AsyncSessionLocal
from app.models.models import User


async def seed_db():
users = [
{
"id": "aabb1fd8-ba93-4e8c-976e-35e5c40b809c",
"username": "creator1",
"email": "creator1@example.com",
"password": "password123",
"role": "creator",
"bio": "Lifestyle and travel content creator",
"profile_image": None,
"created_at": datetime.utcnow()
},
{
"id": "6dbfcdd5-795f-49c1-8f7a-a5538b8c6f6f",
"username": "brand1",
"email": "brand1@example.com",
"password": "password123",
"role": "brand",
"bio": "Sustainable fashion brand looking for influencers",
"profile_image": None,
"created_at": datetime.utcnow()
},
]

# Insert or update the users
async with AsyncSessionLocal() as session:
for user_data in users:
# Check if user exists
existing_user = await session.execute(
User.__table__.select().where(User.email == user_data["email"])
)
existing_user = existing_user.scalar_one_or_none()

if existing_user:
continue
else:
# Create new user
user = User(
id=user_data["id"],
username=user_data["username"],
email=user_data["email"],
role=user_data["role"],
profile_image=user_data["profile_image"],
bio=user_data["bio"],
created_at=user_data["created_at"]
)
session.add(user)
print(f"Created user: {user_data['email']}")

# Commit the session
await session.commit()
print("βœ… Users seeded successfully.")
Loading