Skip to content

FontPilot.io is an AI-powered tool that helps designers and developers instantly find perfect font combinations based on mood, brand style, or font name. It generates beautiful pairings using Google Fonts, shows live previews on real UI layouts, and offers exportable CSS/font links β€” making typography effortless, aesthetic, and shareable.

Notifications You must be signed in to change notification settings

NitinSemwal2605/FontPilot.io

Repository files navigation

FontPilot.io 🎨

Navigate typography with precision. An intelligent, AI-powered font pairing assistant designed for modern designers, developers, and creators who want to elevate their typography game without spending hours on experimentation.

✨ Features

  • AI-Powered Navigation: Navigate typography with precision using intelligent algorithms that understand your design needs
  • Live Previews: Experience your font choices in real-time with live previews of headers, blog titles, and landing pages
  • Export CSS: Get production-ready CSS code with Google Fonts links and optimized font-family declarations
  • Share & Save: Build your typography library by saving favorite combinations and sharing them with your team
  • Instant Results: Navigate to perfect typography in seconds, not hours. Get beautiful font pairings instantly
  • Google Fonts Integration: Access the complete Google Fonts library with expertly curated pairings that harmonize perfectly

πŸš€ Getting Started

Prerequisites

  • Node.js 18+ (for Next.js 14 features)
  • npm or yarn (package manager)
  • Git (for version control)

Quick Start

  1. Clone the repository:
git clone https://github.com/NitinSemwal2605/fontpilot-io.git
cd fontpilot-io
  1. Install dependencies:
npm install
# or
yarn install
  1. Set up environment variables:
# Create .env.local file
cp .env.example .env.local

# Edit .env.local with your API keys
NEXT_PUBLIC_GOOGLE_FONTS_API_KEY=your_google_fonts_api_key
NEXT_PUBLIC_GOOGLE_GEMINI_API_KEY=your_google_gemini_api_key
  1. Run the development server:
npm run dev
# or
yarn dev
  1. Open your browser: Navigate to http://localhost:3000

πŸ”§ Environment Variables

Create a .env.local file in the root directory with the following variables:

# Google Fonts API Key
NEXT_PUBLIC_GOOGLE_FONTS_API_KEY=your_google_fonts_api_key_here

# Google Gemini AI API Key  
NEXT_PUBLIC_GOOGLE_GEMINI_API_KEY=your_google_gemini_api_key_here

Getting API Keys

  1. Google Fonts API:

  2. Google Gemini AI API:

πŸ› οΈ Tech Stack

  • Framework: Next.js 14 with App Router
  • Styling: Tailwind CSS with custom animations
  • UI Components: shadcn/ui with Radix UI primitives
  • Animations: Framer Motion
  • Icons: Lucide React
  • TypeScript: Full type safety
  • Toast Notifications: react-hot-toast
  • SEO: Structured data, sitemap, robots.txt
  • PWA: Web app manifest for mobile experience
  • AI Integration: Google Gemini Pro for intelligent recommendations
  • Font Management: Google Fonts API integration

🎯 Usage

  1. AI-Powered Search: Describe your project like "Building a SaaS landing page" or "Creating a wedding website"
  2. Browse Categories: Explore curated collections by style (Professional, Creative, Modern, etc.)
  3. Live Previews: See font combinations in real UI components
  4. Export CSS: Copy production-ready CSS with Google Fonts links
  5. Save Favorites: Build your typography library with saved combinations

🎨 Design System

The application uses a modern design system with:

  • Gradient text effects
  • Smooth animations and transitions
  • Glass morphism effects
  • Responsive design
  • Dark mode support (coming soon)

πŸ“± Responsive Design

FontPair.ai is fully responsive and works beautifully on:

  • Desktop (1200px+)
  • Tablet (768px - 1199px)
  • Mobile (320px - 767px)

πŸ”§ Environment Variables

Create a .env.local file in the root directory with the following variables:

# Google Fonts API Key
NEXT_PUBLIC_GOOGLE_FONTS_API_KEY=your_google_fonts_api_key_here

# Google Gemini AI API Key  
NEXT_PUBLIC_GOOGLE_GEMINI_API_KEY=your_google_gemini_api_key_here

Getting API Keys

  1. Google Fonts API:

  2. Google Gemini AI API:

πŸ“ Project Structure

fontpilot-io/
β”œβ”€β”€ app/                          # Next.js 14 App Router
β”‚   β”œβ”€β”€ components/               # Shared components
β”‚   β”‚   └── structured-data.tsx  # SEO structured data
β”‚   β”œβ”€β”€ favorites/               # Favorites page
β”‚   β”‚   └── page.tsx
β”‚   β”œβ”€β”€ globals.css              # Global styles
β”‚   β”œβ”€β”€ layout.tsx               # Root layout with metadata
β”‚   β”œβ”€β”€ manifest.ts              # PWA manifest
β”‚   β”œβ”€β”€ page.tsx                 # Home page
β”‚   β”œβ”€β”€ robots.ts                # SEO robots.txt
β”‚   └── sitemap.ts              # SEO sitemap
β”œβ”€β”€ components/                   # Reusable components
β”‚   β”œβ”€β”€ ui/                      # shadcn/ui components
β”‚   β”‚   β”œβ”€β”€ button.tsx
β”‚   β”‚   β”œβ”€β”€ card.tsx
β”‚   β”‚   └── input.tsx
β”‚   β”œβ”€β”€ features.tsx             # Features section
β”‚   β”œβ”€β”€ footer.tsx               # Footer component
β”‚   β”œβ”€β”€ font-card.tsx            # Font pair card
β”‚   β”œβ”€β”€ font-preview.tsx         # Font loading component
β”‚   β”œβ”€β”€ navigation.tsx           # Navigation bar
β”‚   └── ai-reasoning.tsx         # AI reasoning display
β”œβ”€β”€ lib/                         # Utility libraries
β”‚   β”œβ”€β”€ ai-recommendations.ts    # AI integration
β”‚   β”œβ”€β”€ favorites.ts             # Local storage management
β”‚   β”œβ”€β”€ fonts.ts                 # Google Fonts integration
β”‚   β”œβ”€β”€ font-styles.ts           # Font categorization
β”‚   └── utils.ts                 # Utility functions
β”œβ”€β”€ public/                      # Static assets
└── package.json                 # Dependencies

πŸ—οΈ Architecture Overview

Core Components

  1. AI Integration (lib/ai-recommendations.ts)

    • Google Gemini Pro integration
    • Context-aware font recommendations
    • Fallback recommendations for different use cases
  2. Font Management (lib/fonts.ts)

    • Google Fonts API integration
    • Dynamic font loading
    • Font categorization and filtering
  3. State Management

    • React hooks for local state
    • Local storage for favorites
    • Session storage for font previews
  4. UI Components

    • Modular component architecture
    • Reusable shadcn/ui components
    • Responsive design with Tailwind CSS

Key Features Implementation

AI-Powered Recommendations

// lib/ai-recommendations.ts
export async function getAIRecommendations(userNeed: string): Promise<AIRecommendation[]>
  • Analyzes user input for context
  • Generates 10 tailored font combinations
  • Provides reasoning and use cases

Font Loading System

// lib/fonts.ts
export function loadFontsForPair(headingFont: string, bodyFont: string): Promise<void>
  • Dynamic Google Fonts loading
  • Prevents duplicate font requests
  • Handles loading states

Favorites System

// lib/favorites.ts
export function addToFavorites(fontPair: FontPair): boolean
  • Local storage persistence
  • Add/remove functionality
  • Dedicated favorites page

πŸ”§ Development Guidelines

Code Style

  • TypeScript: Strict type checking enabled
  • ESLint: Code quality and consistency
  • Prettier: Automatic code formatting
  • Component Structure: Functional components with hooks

Adding New Features

  1. New Font Categories

    // Add to lib/font-styles.ts
    export const fontStyles = {
      'New Category': {
        icon: '🎨',
        color: 'text-blue-500',
        description: 'Description here'
      }
    }
  2. New AI Recommendations

    // Add to lib/ai-recommendations.ts
    const newRecommendations = [
      {
        heading: 'Font Name',
        body: 'Font Name',
        category: 'Category',
        description: 'Description',
        reasoning: 'Why this works',
        useCase: 'Specific use case'
      }
    ]
  3. New UI Components

    // Create in components/
    export default function NewComponent() {
      return (
        <div className="your-styles">
          {/* Component content */}
        </div>
      )
    }

Environment Setup

  1. Development

    npm run dev
  2. Build for Production

    npm run build
    npm start
  3. Type Checking

    npm run type-check
  4. Linting

    npm run lint

πŸ§ͺ Testing

Manual Testing Checklist

  • AI recommendations work for different inputs
  • Font loading and preview functionality
  • Favorites system (add/remove/save)
  • CSS export functionality
  • Responsive design on different screen sizes
  • SEO metadata and structured data
  • PWA functionality

Performance Testing

  • Font loading performance
  • AI response times
  • Bundle size optimization
  • Lighthouse scores

πŸš€ Deployment

Vercel (Recommended)

  1. Connect your GitHub repository
  2. Set environment variables in Vercel dashboard
  3. Deploy automatically on push to main branch

Other Platforms

  • Netlify: Similar to Vercel setup
  • Railway: Container-based deployment
  • AWS/GCP: Custom server setup

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Contribution Guidelines

  • Follow TypeScript best practices
  • Add proper error handling
  • Include loading states for async operations
  • Test on multiple browsers
  • Update documentation for new features

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Google Fonts API for font data
  • Google Gemini Pro for AI recommendations
  • shadcn/ui for beautiful components
  • Framer Motion for smooth animations
  • Tailwind CSS for utility-first styling

πŸ“ž Support


Made with ❀️ by Nitin Semwal

  • .animate-gradient-shift: Animated gradient background

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“ž Support


Made with ❀️ for designers and developers

About

FontPilot.io is an AI-powered tool that helps designers and developers instantly find perfect font combinations based on mood, brand style, or font name. It generates beautiful pairings using Google Fonts, shows live previews on real UI layouts, and offers exportable CSS/font links β€” making typography effortless, aesthetic, and shareable.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published