Inpact is an open-source AI-powered platform designed to connect content creators, brands, and agencies through data-driven insights. By leveraging Generative AI (GenAI), audience analytics, and engagement metrics, Inpact ensures highly relevant sponsorship opportunities for creators while maximizing ROI for brands investing in influencer marketing.
- Features
- Tech Stack
- Project Structure
- Prerequisites
- Installation & Setup
- Running the Application
- API Documentation
- Usage Guide
- Project Workflow
- Troubleshooting
- Contributing
- Contact
- Automatically connects creators with brands based on audience demographics, engagement rates, and content style
- Real-time matching algorithm powered by AI
- Personalized recommendations for both creators and brands
- Facilitates partnerships between creators with complementary audiences and content niches
- AI-suggested collaboration ideas based on audience overlap
- Joint campaign planning and execution tools
- Provides fair sponsorship pricing recommendations based on engagement, market trends, and historical data
- Dynamic pricing suggestions for different campaign types
- Budget optimization for brands
- Assists in structuring deals, generating contracts, and optimizing terms using AI insights
- Automated contract generation with customizable templates
- Smart negotiation suggestions
- Enables brands and creators to track sponsorship performance, audience engagement, and campaign success
- Real-time analytics dashboards
- AI-powered insights and recommendations for future campaigns
- Screenshot extraction and metric tracking using Gemini Vision API
- Full lifecycle campaign management for brands
- Creator proposal system with status tracking
- Deliverable tracking and metric submission
- Contract management and signing workflow
- Framework: Next.js 16.0.1 (React 19.2.0)
- Language: TypeScript
- Styling: Tailwind CSS 4
- State Management: Zustand
- Data Fetching: TanStack React Query, Axios
- Forms: React Hook Form with Zod validation
- Animations: Framer Motion
- Charts: Recharts
- Authentication: Supabase Auth
- Icons: Lucide React
- Framework: FastAPI 0.120.3
- Language: Python 3.13+
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth with JWT
- AI Integration:
- Groq API (for text generation)
- Google Gemini API (for content generation and vision tasks)
- Server: Uvicorn
- Validation: Pydantic
- Database: Supabase PostgreSQL
- Authentication: Supabase Auth
- Storage: Supabase Storage (for images and files)
- Real-time: Supabase Realtime (for live updates)
InPactAI/
βββ frontend/ # Next.js frontend application
β βββ app/ # Next.js App Router
β β βββ brand/ # Brand-specific pages
β β β βββ analytics/ # Analytics dashboard
β β β βββ campaigns/ # Campaign management
β β β βββ contracts/ # Contract management
β β β βββ home/ # Brand dashboard
β β β βββ onboarding/ # Brand onboarding flow
β β β βββ proposals/ # Proposal management
β β βββ creator/ # Creator-specific pages
β β β βββ analytics/ # Creator analytics
β β β βββ collaborations/ # Collaboration hub
β β β βββ contracts/ # Contract management
β β β βββ home/ # Creator dashboard
β β β βββ onboarding/ # Creator onboarding flow
β β β βββ proposals/ # Proposal applications
β β βββ login/ # Login page
β β βββ signup/ # Signup page
β β βββ layout.tsx # Root layout
β βββ components/ # Reusable React components
β β βββ analytics/ # Analytics components
β β βββ auth/ # Authentication components
β β βββ contracts/ # Contract components
β β βββ dashboard/ # Dashboard components
β β βββ onboarding/ # Onboarding components
β βββ lib/ # Utility libraries
β β βββ api/ # API client functions
β β βββ auth-helpers.ts # Auth utilities
β β βββ campaignApi.ts # Campaign API client
β β βββ geminiApi.ts # Gemini API client
β β βββ supabaseClient.ts # Supabase client
β βββ types/ # TypeScript type definitions
β βββ public/ # Static assets
β βββ package.json # Frontend dependencies
β βββ next.config.ts # Next.js configuration
β
βββ backend/ # FastAPI backend application
β βββ app/ # Main application code
β β βββ api/ # API routes
β β β βββ routes/ # Route handlers
β β β βββ analytics.py # Analytics endpoints
β β β βββ auth.py # Authentication endpoints
β β β βββ campaigns.py # Campaign endpoints
β β β βββ collaborations.py # Collaboration endpoints
β β β βββ creators.py # Creator endpoints
β β β βββ gemini_generate.py # Gemini AI endpoints
β β β βββ groq_generate.py # Groq AI endpoints
β β β βββ health.py # Health check endpoints
β β β βββ proposals.py # Proposal endpoints
β β βββ core/ # Core application logic
β β β βββ config.py # Configuration settings
β β β βββ dependencies.py # FastAPI dependencies
β β β βββ security.py # Security utilities
β β β βββ supabase_clients.py # Supabase clients
β β βββ db/ # Database utilities
β β βββ models/ # Pydantic models
β β βββ services/ # Business logic services
β β βββ main.py # FastAPI application entry point
β βββ requirements.txt # Python dependencies
β βββ env_example # Environment variables example
β
βββ docs/ # Documentation
β βββ database/ # Database schema documentation
β
βββ guides/ # Implementation guides
β βββ summaries/ # Feature implementation summaries
β
βββ README.md # This file
Before you begin, ensure you have the following installed on your system:
- Node.js (v18 or higher) - Download
- npm (comes with Node.js) or yarn
- Python (3.11 or higher) - Download
- pip (Python package manager)
- Git - Download
- Supabase Account - Sign up
- Groq API Key (for AI features) - Get API Key
- Google Gemini API Key (for AI features) - Get API Key
- VS Code or any modern code editor
- Postman or Insomnia (for API testing)
- Supabase CLI (optional, for local development)
git clone https://github.com/AOSSIE-Org/InPact.git
cd InPactcd frontendnpm installThis will install all required packages listed in package.json.
Create a .env.local file in the frontend directory:
touch .env.localAdd the following variables to .env.local:
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your-supabase-project-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
# Backend API URL
NEXT_PUBLIC_API_URL=http://localhost:8000How to get Supabase credentials:
- Go to Supabase Dashboard
- Log in and create a new project (or select an existing one)
- Navigate to Project Settings β API
- Copy the Project URL and paste it as
NEXT_PUBLIC_SUPABASE_URL - Copy the anon public key and paste it as
NEXT_PUBLIC_SUPABASE_ANON_KEY
Important: For production, ensure
NEXT_PUBLIC_API_URLuses HTTPS.
cd ../backend# Create virtual environment
python -m venv venv
# Activate virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
# venv\Scripts\activatepip install -r requirements.txtcd appCreate a .env file in the backend/app directory:
touch .envCopy the example file and edit it:
cp ../env_example .envEdit .env with your credentials:
# Supabase Configuration (Required)
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your-supabase-anon-key-here
SUPABASE_SERVICE_KEY=your-service-role-key
# Database Configuration (Optional - for direct PostgreSQL connection)
DATABASE_URL=postgresql://postgres.your-project-ref:[YOUR-PASSWORD]@aws-0-region.pooler.supabase.com:6543/postgres
# AI Configuration (Optional)
GROQ_API_KEY=your-groq-api-key
GEMINI_API_KEY=your-gemini-api-key-here
# CORS Origins (comma-separated)
ALLOWED_ORIGINS=http://localhost:3000,http://localhost:3001
# JWT Secret Key from Supabase
# Location: Dashboard β Project Settings β API β JWT Settings β JWT Secret
SUPABASE_JWT_SECRET=your-jwt-secret-from-supabase-dashboardHow to get Supabase credentials:
-
Supabase URL & Keys:
- Go to Project Settings β API
- Copy Project URL β
SUPABASE_URL - Copy anon public key β
SUPABASE_KEY - Copy service_role key β
SUPABASE_SERVICE_KEY(keep this secret!)
-
Database URL (Optional):
- Go to Project Settings β Database
- Under Connection string, select URI or Session Pooler
- For IPv6 networks, use the direct connection:
postgresql://postgres:[YOUR-PASSWORD]@db.xxxxx.supabase.co:5432/postgres - For IPv4 networks or if you encounter connection issues, use the Session Pooler:
postgresql://postgres.xxxxx:[YOUR-PASSWORD]@aws-0-region.pooler.supabase.com:6543/postgres
-
JWT Secret:
- Go to Project Settings β API β JWT Settings
- Copy the JWT Secret (NOT the anon key!)
-
AI API Keys:
- Groq: Visit Groq Console β Create API key
- Gemini: Visit Google AI Studio β Create API key
-
Open Supabase Dashboard
- Go to Supabase Dashboard
- Select your project
-
Access SQL Editor
- In the left sidebar, click on SQL Editor
-
Run Schema Script
- The database schema is located in
backend/SQL - Copy the contents of the SQL file
- Paste into the SQL Editor
- Click Run to execute
Note: The schema file contains table definitions and ENUM types. Make sure to run it in the correct order.
- The database schema is located in
After running the schema, verify that the following tables exist:
profilesbrandscreatorscampaignsproposalscontractscollaborationscampaign_deliverablescampaign_metrics- And other related tables
If the profiles table doesn't have the onboarding_completed column, run:
ALTER TABLE profiles
ADD COLUMN IF NOT EXISTS onboarding_completed BOOLEAN DEFAULT FALSE;| Variable | Description | Required | Example |
|---|---|---|---|
NEXT_PUBLIC_SUPABASE_URL |
Supabase project URL | Yes | https://xxxxx.supabase.co |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
Supabase anon/public key | Yes | eyJhbGc... |
NEXT_PUBLIC_API_URL |
Backend API URL | Yes | http://localhost:8000 |
| Variable | Description | Required | Example |
|---|---|---|---|
SUPABASE_URL |
Supabase project URL | Yes | https://xxxxx.supabase.co |
SUPABASE_KEY |
Supabase anon key | Yes | eyJhbGc... |
SUPABASE_SERVICE_KEY |
Supabase service role key | Yes | eyJhbGc... |
SUPABASE_JWT_SECRET |
JWT secret from Supabase | Yes | your-jwt-secret |
DATABASE_URL |
PostgreSQL connection string | No | postgresql://... |
GROQ_API_KEY |
Groq API key for AI | No | gsk_xxxxx |
GEMINI_API_KEY |
Gemini API key for AI | No | AIzaSy... |
ALLOWED_ORIGINS |
CORS allowed origins | No | http://localhost:3000 |
-
Navigate to the backend app directory:
cd backend/app -
Activate virtual environment (if using one):
source ../venv/bin/activate # macOS/Linux # or venv\Scripts\activate # Windows
-
Start the FastAPI server:
uvicorn main:app --reload
The backend will be available at:
http://localhost:8000- API Documentation:
http://localhost:8000/docs(Swagger UI) - Alternative Docs:
http://localhost:8000/redoc(ReDoc)
- API Documentation:
-
Navigate to the frontend directory:
cd frontend -
Start the Next.js development server:
npm run dev
The frontend will be available at: `http://localhost:3000`
### Production Build
#### Build Frontend
```bash
cd frontend
npm run build
npm start
cd backend/app
uvicorn main:app --host 0.0.0.0 --port 8000- Development:
http://localhost:8000 - Production: Your production backend URL
POST /api/auth/signup- User registrationPOST /api/auth/login- User loginGET /api/auth/me- Get current user profile
GET /campaigns- List campaigns (with filters)POST /campaigns- Create new campaignGET /campaigns/{campaign_id}- Get campaign detailsPUT /campaigns/{campaign_id}- Update campaignDELETE /campaigns/{campaign_id}- Delete campaign
GET /proposals- List proposalsPOST /proposals- Create proposalGET /proposals/{proposal_id}- Get proposal detailsPUT /proposals/{proposal_id}- Update proposalDELETE /proposals/{proposal_id}- Delete proposalPOST /proposals/{proposal_id}/accept- Accept proposalPOST /proposals/{proposal_id}/reject- Reject proposal
GET /contracts- List contractsGET /contracts/{contract_id}- Get contract detailsPOST /contracts- Create contractPUT /contracts/{contract_id}- Update contract
GET /collaborations- List collaborationsPOST /collaborations- Create collaborationGET /collaborations/{collaboration_id}- Get collaboration details
GET /creators- List creators (with search/filters)GET /creators/{creator_id}- Get creator profile
GET /analytics/campaigns/{campaign_id}- Get campaign analyticsPOST /analytics/metrics- Create metricPOST /analytics/metrics/{metric_id}/submit- Submit metric valuePOST /analytics/screenshots/extract- Extract metrics from screenshot
POST /api/groq/generate- Generate content using GroqPOST /api/gemini/generate- Generate content using Gemini
GET /health- Health check endpointGET /health/supabase- Supabase connection check
Once the backend is running, visit:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
These provide interactive documentation where you can test endpoints directly.
-
Sign Up / Login
- Visit the signup page and create an account
- Select "Creator" as your role
- Verify your email address
-
Complete Onboarding
- Fill out your profile information
- Add your social media platforms
- Specify your niche and content types
- Upload profile picture
-
Browse Campaigns
- View available sponsorship opportunities
- Filter by niche, budget, platform, etc.
- View campaign details and requirements
-
Apply for Sponsorships
- Submit proposals for campaigns
- Include your pitch and portfolio
- Track application status
-
Manage Collaborations
- Discover potential collaboration partners
- Send collaboration proposals
- Manage active collaborations
-
Track Performance
- View analytics for your campaigns
- Submit deliverables and metrics
- Monitor engagement and ROI
-
Sign Up / Login
- Create a brand account
- Select "Brand" as your role
- Verify your email
-
Complete Onboarding
- Add company information
- Define target audience
- Set marketing goals and budget
- Upload brand assets
-
Create Campaigns
- Create new sponsorship campaigns
- Define deliverables and requirements
- Set budget and timeline
- Specify preferred creator criteria
-
Review Proposals
- View creator applications
- Review creator profiles and portfolios
- Accept or reject proposals
-
Manage Contracts
- Generate contracts using AI
- Negotiate terms
- Track contract status
-
Monitor Analytics
- View campaign performance
- Track ROI and engagement metrics
- Analyze creator submissions
- Get AI-powered insights
graph TD;
A[User Signup/Login] -->|via Supabase Auth| B[User Dashboard];
B -->|Fetch Audience & Engagement Data| C[AI-Powered Sponsorship Matchmaking];
C -->|Suggest Ideal Brand Deals| D[Creator Applies for Sponsorship];
D -->|Submit Application| E[Brand Reviews & Shortlists];
E -->|AI-Based Pricing & Negotiation| F[Contract Generation via AI];
F -->|Sign Deal| G[Sponsorship Execution];
G -->|Track Performance| H[AI-Powered ROI Analytics];
H -->|Optimized Insights| I[Brands & Creators Adjust Strategies];
I -->|Feedback Loop| C;
graph TD;
A[User Visits Inpact] -->|Supabase Auth| B[Login/Signup];
B -->|Fetch User Profile| C[Dashboard Loaded];
C -->|Request AI-Powered Matches| D[Fetch Sponsorship Deals via API];
D -->|Display Relevant Matches| E[User Applies for Sponsorship];
E -->|Send Application via API| F[Wait for Brand Response];
F -->|Fetch Application Status| G[Show Application Updates];
G -->|If Approved| H[Contract Generation Page];
H -->|AI Drafts Contract| I[User Reviews & Signs Contract];
I -->|Start Campaign Execution| J[Track Sponsorship Performance];
J -->|Show Performance Analytics| K[AI Optimizes Future Matches];
graph TD;
A[User Authentication] -->|Supabase Auth API| B[Verify User];
B -->|Store User Data in DB| C[Return JWT Token];
C -->|Fetch User Profile| D[Return Profile Data];
D -->|Receive Sponsorship Match Request| E[Query AI Engine];
E -->|Analyze Audience & Engagement| F[Generate Sponsorship Matches];
F -->|Return Matches via API| G[Send to Frontend];
G -->|User Applies for Sponsorship| H[Store Application in DB];
H -->|Notify Brand| I[Brand Reviews Application];
I -->|Brand Approves/Rejects| J[Update Application Status];
J -->|If Approved| K[Generate AI-Powered Contract];
K -->|AI Suggests Pricing & Terms| L[Store Finalized Contract in DB];
L -->|Track Campaign Performance| M[Analyze Engagement & ROI];
M -->|Return Insights| N[AI Refines Future Recommendations];
Issue: "Missing Supabase environment variables"
- Solution: Ensure
.env.localexists in thefrontenddirectory with all required variables - Check that variable names start with
NEXT_PUBLIC_for client-side access
Issue: "NEXT_PUBLIC_API_URL is missing or not valid"
- Solution: For local development, set
NEXT_PUBLIC_API_URL=http://localhost:8000 - For production, ensure it's a valid HTTPS URL
Issue: Build fails with TypeScript errors
- Solution: Run
npm installto ensure all dependencies are installed - Check that TypeScript version is compatible (v5+)
Issue: "Supabase client initialization failed"
- Solution:
- Verify
SUPABASE_URLandSUPABASE_KEYin.env - Check that your Supabase project is active
- Ensure network connectivity to Supabase
- Verify
Issue: "JWT verification failed"
- Solution:
- Verify
SUPABASE_JWT_SECRETmatches the JWT Secret in Supabase dashboard - Ensure you're using the JWT Secret, not the anon key
- Verify
Issue: Database connection errors
- Solution:
- Check
DATABASE_URLformat (if using direct connection) - For IPv4 networks, use Session Pooler connection string
- Verify database password is correct
- Check Supabase project status
- Check
Issue: "Module not found" errors
- Solution:
- Activate virtual environment:
source venv/bin/activate - Reinstall dependencies:
pip install -r requirements.txt
- Activate virtual environment:
Issue: Tables don't exist
- Solution: Run the SQL schema script in Supabase SQL Editor
- Check that all ENUM types are created before tables
Issue: "onboarding_completed column doesn't exist"
- Solution: Run the ALTER TABLE command:
ALTER TABLE profiles ADD COLUMN IF NOT EXISTS onboarding_completed BOOLEAN DEFAULT FALSE;
Issue: CORS errors
- Solution:
- Add frontend URL to
ALLOWED_ORIGINSin backend.env - Ensure backend CORS middleware is configured correctly
- Add frontend URL to
Issue: 401 Unauthorized errors
- Solution:
- Verify JWT token is being sent in request headers
- Check token expiration
- Ensure user is logged in
If you encounter issues not covered here:
- Check the Issues page
- Review the documentation in the
docs/andguides/directories - Reach out on Discord or create a new issue
We welcome contributions from the community! Here's how you can help:
-
Fork the Repository on GitHub
- Go to https://github.com/AOSSIE-Org/InPact and click the "Fork" button in the top right.
-
Clone Your Fork Locally
git clone <your-fork-url> cd InPact
-
Add the Original Repository as Upstream Remote
git remote add upstream https://github.com/AOSSIE-Org/InPact.git
-
Create a Feature Branch
git checkout -b feature/your-feature-name
-
Make Your Changes
- Write clean, documented code
- Follow existing code style
- Add tests if applicable
- Update documentation as needed
-
Commit Your Changes
git commit -m "Add: Description of your feature"Use clear, descriptive commit messages:
Add:for new featuresFix:for bug fixesUpdate:for updates to existing featuresDocs:for documentation changes
-
Push to Your Fork
git push origin feature/your-feature-name
-
Open a Pull Request
- Go to the repository on GitHub
- Click "New Pull Request"
- Select your branch
- Fill out the PR template
- Submit for review
- Frontend: Follow Next.js and React best practices
- Backend: Follow PEP 8 Python style guide
- TypeScript: Use strict mode, avoid
anytypes - Comments: Add comments for complex logic
- Documentation: Update README and code comments
- Follow the installation steps above
- Create a separate branch for your work
- Test your changes thoroughly
- Ensure all tests pass (if applicable)
- Update relevant documentation
- GitHub Issues: Create an issue
- Discord: Join our Discord server (link in repository)
- Email: Contact through GitHub profile
This project is open source. Please check the LICENSE file for details.
- Built with β€οΈ by the AOSSIE community
- Powered by Supabase, Next.js, and FastAPI
- AI capabilities powered by Groq and Google Gemini
Happy Coding! π