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.
- 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.
- Frontend: React, Vite, Tailwind CSS
- AI Integration: Google Generative AI (Gemini 3 Pro + Flash Lite)
- Icons: Lucide React
- Language: TypeScript
- Node.js (v18 or later)
- npm or yarn
- Google Gemini API Key
-
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
To create an optimized production build:
npm run buildTo preview the production build locally:
npm run previewThe project includes scripts to generate new trending hairstyle images using Google's Gemini API and optimize them for the web.
To generate new images based on prompts in scripts/generate_images_gemini.ts:
npx tsx scripts/generate_images_gemini.tsTo optimize PNG images to JPG and move them to the correct directory:
sh scripts/optimize-hairstyles.shThis project is licensed under the MIT License.



