👨💼 Headshot AI - Professional Headshots with AI
Introducing Headshot AI, an open-source project from Leap AI that generates Professional AI Headshots in minutes.
The app is powered by:
- 🚀 Leap AI for AI model training
- 🚀 Leap AI to generate headshots
- ▲ Next.js for app and landing page
- 🔋 Supabase for DB & Auth
- 📩 Resend to email user when headshots are ready
- ⭐️ Shadcn with Tailwind CSS for styles
- 🔥 Replit for 1-click app run in the browser
Just add Stripe and you have a Headshot AI SaaS in a box.
To create your own Headshot AI app, follow these steps:
- Clone the repository:
git clone https://github.com/leap-ai/headshots-starter.git
- Enter the
headshots-starter
directory:
cd headshots-starter
-
Install dependencies:
For npm:
npm install
For yarn:
yarn
-
Create a new Supabase project and create the tables required for the app:
- Rename
.env.local.example
to.env.local
and update the values forNEXT_PUBLIC_SUPABASE_URL
andNEXT_PUBLIC_SUPABASE_ANON_KEY
from your Supabase project's API settings
For this starter repo we disabled Row level permissions, you can enable them as needed for your own security, in the supasbase table settings
This code block defines the schema for three tables:
images
,models
, andsamples
.For any table column with
foreign_key
, make sure to link it while creating the column in Supabase.[images]
- id (int8)
- modelId (int8) (foreign_key)*
- uri (text)
- created_at (timestamptz)
[models] - (Make sure to enable realtime on this table)
- id (int8)
- name (text)
- type (text)
- created_at (timestamptz)
- user_id (uuid) (foreign_key)*
- status (text)
- modelId (text)
[samples]
- id (int8)
- uri (text)
- modelId (int8) (foreign_key)*
- Rename
-
Create a Leap AI account
In your
.env.local
file:- Fill in
your_api_key
with your Leap API key - Fill in
your-hosted-url/leap/train-webhook
with https://{your-hosted-url}/leap/train-webhook - Fill in
your-hosted-url/leap/image-webhook
with https://{your-hosted-url}/leap/image-webhook - Fill in
your-webhook-secret
with
- Fill in
-
Create a Resend account
- Fill in
your-resend-api-key
with your Resend API Key
- Fill in
-
Start the development server:
For npm:
npm run dev
For yarn:
yarn dev
-
Visit
http://localhost:3000
in your browser to see the running app.
Deploy the example using Vercel:
Or fork the repo and Deploy using Replit.
Headshot AI can be easily adapted to support many other use-cases on Leap AI including:
- AI Avatars
- Pet Portraits
- Product Shots
- Food Photography
- Icons
- Style-Consistent Assets
& more!
We welcome collaboration and appreciate your contribution to Headshot AI. If you have suggestions for improvement or significant changes in mind, feel free to open an issue!
- Discord Community: Leap Discord
- Help Email: help@tryleap.ai
Headshot AI is released under the MIT License.