This project is a web application that analyzes YouTube thumbnail images using AI to provide scores and improvement suggestions. It consists of a FastAPI backend and a React frontend.
- Upload YouTube thumbnail images
- Analyze thumbnails using AI (powered by Groq API)
- Provide scores and improvement suggestions for thumbnails
- Store analysis results in a database
The project is divided into two main parts:
- Backend (FastAPI)
- Frontend (React + TypeScript + Vite)
The backend is a FastAPI application that handles image uploads, analysis, and database operations.
Key components:
- FastAPI application
- SQLAlchemy for database operations
- Groq API integration for image analysis
- Error handling and environment configuration
The frontend is a React application built with TypeScript and Vite, providing a user interface for thumbnail uploads and result display.
Key components:
- React with TypeScript
- Vite for build and development
- Tailwind CSS for styling
- Various UI components and utilities
- Docker and Docker Compose
- Node.js (for local frontend development)
- Python 3.11+ (for local backend development)
-
Clone the repository:
git clone https://github.com/UgolinOlle/ytb-thumbnail-analyser.git cd ytb-thumbnail-analyser
-
Move the
.env.local
file in theroot
directory to.env
and complete it with your own credentialsmv .env.local .env
-
Move the
.env.local
file in thebackend
directory to.env
and complete it with your own credentialscd backend mv .env.local .env
-
Build and run the Docker containers:
docker-compose up --build
-
The application should now be running:
- Backend: http://localhost:8000
- Frontend: http://localhost:3000
To run the backend locally for development:
- Navigate to the
backend
directorycd backend
- Create a virtual environment and activate it
python -m venv venv source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Run the FastAPI server:
uvicorn app.main:app --reload
To run the frontend locally for development:
- Navigate to the
frontend
directorycd frontend
- Install dependencies:
yarn
- Start the development server:
yarn dev
Once the backend is running, you can access the API documentation at:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
This project is licensed under the MIT License.
Leave a Reply