This demo lets you enter your X handle to generate a full upper-body AI avatar using the FASHN SDK.
- Next.js 14 with App Router and TypeScript
- React 18 with server and client components
- Tailwind CSS 4 for styling and responsive design
- Lucide Icons for UI iconography
- FASHN AI - Generative image models tailored for fashion applications
- Cloudflare - Cloudflare Turnstile, Verify web visitors without CAPTCHA
- Upstash - Serverless Data Platform
- Unavatar - Avatar service
- Node.js 18+
- Cloudflare Turnstile credentials
- If you don't want to see the turnstile widget, choose
InvisibleinWidget Modein Cloudflare manage widget page.
- If you don't want to see the turnstile widget, choose
- FASHN AI API key
- Upstash redis rest url and rest token
- Clone the repository and install dependencies:
npm installpnpm install- Copy the environment file and configure your credentials:
cp .env.example .env.local- Set up your environment variables in
.env.local:
# FASHN AI API key
FASHN_API_KEY=
# Cloudflare turnstile credentials
NEXT_PUBLIC_TURNSTILE_SITE_KEY=
TURNSTILE_SECRET_KEY=
# Upstash credentials
UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=npm run devpnpm run devYour application will be available at http://localhost:3000.
Create a production build:
npm run buildpnpm run buildThis app uses our Face to Model endpoint to transform face images into try-on ready upper-body avatars.
MIT License - see LICENSE file for details
We welcome contributions! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow TypeScript best practices
- Follow the existing code style
Found a bug or have a feature request? Please open an issue with:
- Clear description of the problem/feature
- Steps to reproduce (for bugs)
- Expected behavior
- Screenshots (if applicable)
Made with ❤️ by the FASHN AI Team
Star ⭐ this repository if you find it helpful!