Skip to content

Repository files navigation

AdLift AI

AdLift AI is a production-ready ad-to-landing-page fit analyzer. It accepts an advertisement image or pasted ad copy, scrapes a landing page, analyzes both sources with Gemini 2.5 Flash, coordinates specialized LangGraph agents, and returns a dashboard-ready fit report with prioritized recommendations.

Stack

  • Frontend: React, Vite, TypeScript, Tailwind CSS, shadcn-style UI
  • Backend: FastAPI, Python 3.12, Pydantic
  • AI: Google Gemini 2.5 Flash, LangGraph, LangChain
  • Scraping: Playwright, BeautifulSoup4
  • Deployment: Vercel for frontend, Render for backend

Project Structure

backend/
  app/
    agents/       LangGraph workflow and reusable prompts
    api/          FastAPI routes
    core/         settings and dependencies
    models/       Pydantic contracts
    services/     Gemini, scraper, PDF adapters
frontend/
  src/
    components/   dashboard and shadcn-style UI components
    lib/          API client and utilities
    types/        TypeScript contracts
docs/

Local Setup

  1. Create environment files:
cp .env.example .env

For Vite, set frontend env values in frontend/.env.local if you need a non-default API URL:

VITE_API_BASE_URL=http://localhost:8000
  1. Install and run the backend:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python -m playwright install chromium
uvicorn backend.app.main:app --reload --port 8000

On Windows PowerShell, activate with:

.\.venv\Scripts\Activate.ps1
  1. Install and run the frontend workspace:
npm install
npm run dev:frontend

Open http://localhost:5173.

After both Python and Node dependencies are installed, npm run dev from the repository root starts the backend and frontend together.

Required Environment Variables

Backend:

  • GOOGLE_API_KEY or GEMINI_API_KEY
  • GEMINI_MODEL, defaults to gemini-2.5-flash
  • CORS_ORIGINS, comma-separated frontend origins

Frontend:

  • VITE_API_BASE_URL, defaults to http://localhost:8000

API

  • GET /health
  • POST /api/analyze
  • POST /api/reports/pdf

See docs/API.md for request and response details.

Deployment

Render uses the root Dockerfile and render.yaml. Vercel uses vercel.json and builds the frontend app.

Deployment steps are documented in docs/DEPLOYMENT.md.

Verification

pytest backend/tests
npm --prefix frontend run build

The frontend build requires Node dependencies to be installed first.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages