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
Sample Hairstyles
๐ ๏ธ 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
-
Clone the repository:
git clone https://github.com/ryanbaumann/hairstyle-ai-studio.git cd hairstyle-ai-studio -
Install dependencies:
npm install
-
Create a
.envfile in the root directory and add your Gemini API key:VITE_GEMINI_API_KEY=your_api_key_here
-
Start the development server:
npm run dev
Building for Production
To create an optimized production build:
npm run buildTo 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.ts2. 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.



