Inspiration
The idea for PropHAIR was born over a casual lunch with a friend. We were bouncing ideas around when he vented about a frustration that resonated instantly: his trusted hairdresser of many years had left, and he was paralyzed by the thought of finding a new one. He realized he couldn't ensure the quality of a stranger, and worse, he struggled to articulate what he actually wanted.
That conversation sparked a realization: for many, getting a haircut is like gambling. We sit in the chair, face the dreaded question—"How would you like it cut today?"—and often fail to explain our vision. Or, we want a change but fear that a trending style won't match our face shape.
We asked ourselves: Why isn't there a tool that objectively analyzes your look, finds the best match mathematically, and blends it with physiognomy to boost confidence? We wanted to build a platform that doesn't just show you a style but connects you with the nearest barber capable of executing it, removing the risk from the ritual of grooming.
What it does
PropHAIR is an end-to-end AI stylist and barber connector:
AI Face & Physiognomy Analysis: Users upload a selfie, and the AI analyzes facial structure (shape, features) and gender. It goes a step further by incorporating Physiognomy (Face Reading) to suggest styles that not only look good aesthetically but are believed to enhance personal luck and charisma. Smart Style Recommendation: Based on the analysis, it ranks top hairstyles specifically suited for that user.
Realistic Virtual Try-On: Using advanced in-painting, users can visualize these recommended hairstyles (or any reference photo they upload) on their actual face, preserving their unique identity.
The "Barber View": To solve the communication gap, the app generates a technical 4-angle view (Front, Left, Right, Back) of the generated style to show the hairdresser.
Intelligent Barber Matching: It doesn't just find nearby shops; it reads Google Maps reviews using AI to determine if a shop is specifically good for men, women, or specific styles, providing a "Match Score."
How we built it
PropHAIR is a modern Single Page Application (SPA) built with React, TypeScript, and Tailwind CSS, powered by a robust Google Cloud stack:
AI Engine (Google Gemini):
- We use gemini-3-pro-preview for high-level reasoning, analyzing facial features, and generating structured JSON recommendations.
- We leverage gemini-3-pro-image-preview for the heavy lifting of image generation and "in-painting," allowing us to modify hair while strictly preserving facial identity.
- We utilize gemini-2.5-flash for high-speed processing of Google Maps reviews and grounding. Location & Grounding: Integrated Google Maps Platform with Gemini's grounding capabilities to fetch real-world barber data and analyze sentiment from reviews.
Backend & Analytics: We implemented serverless Google Cloud Functions to handle user feedback and log anonymized activity data into Google BigQuery for insights on trending styles.
Rate Limiting: A custom client-side rate limiter ensures fair usage of API quotas during the preview phase.
Challenges we ran into
The "Identity Crisis": Early on, generative AI would create beautiful hairstyles but put them on a stranger's face. We spent days refining our prompts and using in-painting constraints to ensure Identity Preservation—making sure the user recognizes themselves in the result.
Prompt Engineering for Structure: Getting an LLM to consistently return valid JSON for complex tasks (like ranking hairstyles or parsing map reviews) was tricky. We solved this by strictly defining responseSchema and using TypeScript interfaces to validate data runtime.
Real-world Grounding: Connecting an abstract style (e.g., "Comma Hair") to a physical location was difficult. We had to build logic that interprets style keywords into search queries and then uses a second AI pass to filter barbers based on their review context (e.g., filtering out nail salons that happen to do basic trims).
Latency vs. Quality: High-quality image generation takes time. We optimized this by parallelizing the text analysis and image generation tasks (Promise.all) to reduce user wait times.
Accomplishments that we're proud of
Physiognomy Integration: We didn't just build a filter; we built a "why." Adding the physiognomy reasoning layer made the app feel personal and culturally relevant, turning a simple recommendation into a confidence booster.
The "Barber View" Generator: We are particularly proud of generating the 4-angle technical view. It solves the exact pain point of "how do I explain this to my barber?" by providing visual proof from all sides.
Seamless In-Painting: Achieving a level of realism where the hair looks natural on the user's actual head shape and lighting conditions without distorting their facial features.
User-Centric Validation: We piloted the app with a diverse focus group of men and women. The feedback was overwhelmingly positive, with many users stating, "This is exactly what I was looking for." This direct user feedback drove key iterations and feature additions to the final product.
What we learned
Multimodal is the Future: Text is not enough. The ability to input an image, have the AI "see" the face shape, "think" about the best style, and "draw" the result creates a complete user journey that text-based chatbots cannot match.
Context is King: Generic recommendations fall flat. By adding local context (finding specific nearby barbers), the AI becomes a utility tool rather than just a novelty toy.
User Trust: We learned that users are more likely to accept an AI recommendation if it explains its reasoning (e.g., "This style balances your square jawline").
What's next for PropHAIR - Professional AI Hair Stylist
AR Live Preview: Implementing Gemini's Live API to overlay hairstyles in real-time video rather than static images.
Direct Booking: Integrating with barber reservation systems to allow users to book the specific style directly from the app.
Style Community: Creating a feature for users to vote on each other's generated styles to get human feedback before cutting.
Hair Health Analysis: Using the high-resolution camera to analyze hair texture/health and suggest treatment products alongside styles.
Built With
- gemini-2.5-flash
- gemini-3-pro-image-preview
- gemini-3-pro-preview
- github
- google-apps-script
- google-auth-library
- google-bigquery
- google-cloud-functions
- google-maps-javascripts-api
- google-maps-places-api
- google-sheets
- google/genai
- googleapis
- html5
- react
- tailwindcss
- typescript
- vite
Log in or sign up for Devpost to join the conversation.