GitHunt
RY

ryanbaumann/hairstyle-ai-studio

AI Hairstylist Sample App - Built with AI Studio, Antigravity, and Gemini API

Hairstyle AI Studio

Hairstyle AI Studio is a modern, AI-powered web application that helps users discover and visualize new hairstyles. Built with React, Vite, and Google's Gemini AI, it offers a seamless experience for exploring various hair trends and getting personalized recommendations.

โœจ Features

  • Gemini 3 Visual Intelligence: Uses the latest Gemini 3 model for precise facial analysis and hyper-realistic hairstyle rendering.
  • Real-time "Thinking" Engine: See the AI's internal reasoning process in real-time as it crafts your new look.
  • Interactive Vibe Selection: Instantly switch between curated trending and classic styles for men and women.
  • Refinement Suite: Fine-tune your results with natural language instructions or reference images.
  • Session History: Keep track of all your transformations in a persistent local collection.

๐Ÿ“ธ Screenshots

Application Interface

Hairstyle AI Studio UI

Sample Hairstyles

Wolf Cut Modern Mullet Glass Bob

๐Ÿ› ๏ธ Tech Stack

  • Frontend: React, Vite, Tailwind CSS
  • AI Integration: Google Generative AI (Gemini 3 Pro + Flash Lite)
  • Icons: Lucide React
  • Language: TypeScript

๐Ÿš€ Getting Started

Prerequisites

  • Node.js (v18 or later)
  • npm or yarn
  • Google Gemini API Key

Installation

  1. Clone the repository:

    git clone https://github.com/ryanbaumann/hairstyle-ai-studio.git
    cd hairstyle-ai-studio
  2. Install dependencies:

    npm install
  3. Create a .env file in the root directory and add your Gemini API key:

    VITE_GEMINI_API_KEY=your_api_key_here
  4. Start the development server:

    npm run dev

Building for Production

To create an optimized production build:

npm run build

To preview the production build locally:

npm run preview

๐ŸŽจ Image Generation & Optimization

The project includes scripts to generate new trending hairstyle images using Google's Gemini API and optimize them for the web.

1. Generate Images

To generate new images based on prompts in scripts/generate_images_gemini.ts:

npx tsx scripts/generate_images_gemini.ts

2. Optimize Images

To optimize PNG images to JPG and move them to the correct directory:

sh scripts/optimize-hairstyles.sh

๐Ÿ“„ License

This project is licensed under the MIT License.


ryanbaumann/hairstyle-ai-studio | GitHunt