Skip to content

πŸš€ AI-powered intelligent domain name generation platform. Generate perfect domain names with OpenAI GPT-4, check availability, and manage favorites. Built with Next.js, TypeScript, and Supabase.

License

Notifications You must be signed in to change notification settings

houko/smart-domain

Repository files navigation

Smart Domain Generator πŸš€

English δΈ­ζ–‡ ζ—₯本θͺž

AI-powered intelligent domain name generation and management platform that helps you find the perfect domain for your projects.

✨ Features

πŸ€– AI-Powered Intelligence

  • Smart Domain Generation: Leverages OpenAI GPT-4 for intelligent naming suggestions
  • Multiple Strategies: Direct combination, concept fusion, neologism creation, and cultural adaptation
  • Context Understanding: Analyzes your project description to generate relevant names

πŸ” Domain Management

  • Real-time Availability: Batch domain availability checking with pricing comparison
  • Multi-registrar Support: Compare prices across different domain registrars
  • Favorites System: Save, organize, and track your preferred domain names
  • Search History: Keep track of all your searches and results

🌐 International Support

  • Multi-language: Full support for English, Chinese (Simplified), and Japanese
  • Cultural Adaptation: Domain suggestions adapted for different markets
  • RTL Support: Ready for right-to-left languages

πŸ” Developer Features

  • REST API: Complete API for programmatic access
  • API Key Management: Generate and manage multiple API keys
  • Usage Analytics: Track API usage with detailed metrics
  • Rate Limiting: Built-in protection against abuse

🎨 Modern UI/UX

  • Responsive Design: Beautiful interface that works on all devices
  • PWA Support: Install as a Progressive Web App
  • Dark/Light Theme: Automatic theme switching
  • Accessibility: WCAG 2.1 compliant

πŸ›  Tech Stack

Frontend

Backend

  • Database: Supabase (PostgreSQL)
  • Authentication: Supabase Auth with Google OAuth
  • API: RESTful API with TypeScript
  • Caching: Redis for performance optimization

AI & External APIs

  • AI Models: OpenAI GPT-4 for domain generation
  • Domain Checking: GoDaddy API for availability and pricing
  • Analytics: Statsig for feature flags and analytics

DevOps

  • Monorepo: Turborepo for efficient builds
  • Deployment: Vercel for seamless deployment
  • CI/CD: GitHub Actions for automated testing and deployment

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ and pnpm
  • Supabase account and project
  • OpenAI API key
  • (Optional) GoDaddy API credentials for real domain checking

1. Clone and Install

git clone https://github.com/houko/smart-domain.git
cd smart-domain
pnpm install

2. Environment Setup

Copy the environment template and fill in your credentials:

cp apps/web/.env.example apps/web/.env.local

Required environment variables:

# Database (Required)
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key

# AI Generation (Required)
OPENAI_API_KEY=your_openai_api_key

# Application URL (Required for production)
NEXT_PUBLIC_APP_URL=https://your-domain.com

# Domain Checking (Optional - uses mock data if not provided)
GODADDY_API_KEY=your_godaddy_api_key
GODADDY_API_SECRET=your_godaddy_api_secret

# Analytics (Optional)
NEXT_PUBLIC_STATSIG_CLIENT_KEY=your_statsig_client_key

3. Database Setup

Set up your Supabase database using the provided SQL files:

# Run database migrations
psql -h your-supabase-host -d postgres -f apps/web/sql/setup.sql

4. Run Development Server

pnpm dev

Visit http://localhost:3000 to see your application running!

πŸ“ Project Structure

smart-domain/
β”œβ”€β”€ apps/
β”‚   └── web/                 # Next.js application
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   β”œβ”€β”€ app/         # App Router pages
β”‚       β”‚   β”œβ”€β”€ components/  # React components
β”‚       β”‚   β”œβ”€β”€ lib/         # Utility functions
β”‚       β”‚   └── types/       # TypeScript definitions
β”‚       β”œβ”€β”€ messages/        # Internationalization files
β”‚       └── sql/             # Database schemas
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ ai/                  # AI generation logic
β”‚   └── domain/              # Domain checking utilities
└── docs/                    # Documentation

πŸ”§ Configuration

Database Schema

The application uses PostgreSQL with the following main tables:

  • users - User profiles and authentication
  • favorites - Saved domain names
  • search_history - Search records
  • api_keys - API key management
  • usage_stats - Analytics and usage tracking

API Routes

  • POST /api/generate - Generate domain suggestions
  • GET /api/v1/favorites - Get user favorites
  • POST /api/v1/favorites - Add to favorites
  • GET /api/v1/history - Get search history
  • GET /api/v1/stats - Get usage statistics

See API Documentation for complete API reference.

🌍 Internationalization

Adding a new language:

  1. Create translation file:
cp apps/web/messages/en.json apps/web/messages/[locale].json
  1. Update i18n.ts configuration:
export const locales = ['en', 'zh', 'ja', 'your-locale'] as const;
  1. Translate the JSON file and test:
pnpm dev

πŸ§ͺ Testing

Run the test suite:

# Unit tests
pnpm test

# E2E tests
pnpm test:e2e

# Type checking
pnpm type-check

# Linting
pnpm lint

πŸ“¦ Deployment

Vercel (Recommended)

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

Docker

# Build Docker image
docker build -t smart-domain .

# Run container
docker run -p 3000:3000 --env-file .env.local smart-domain

Manual Deployment

# Build for production
pnpm build

# Start production server
pnpm start

🀝 Contributing

We welcome contributions! Please read our Contributing Guide for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and add tests
  4. Commit using conventional commits: git commit -m "feat: add amazing feature"
  5. Push to your branch: git push origin feature/amazing-feature
  6. Open a Pull Request

Code Style

  • Use TypeScript for all new code
  • Follow the existing code style (Prettier + ESLint)
  • Write tests for new features
  • Update documentation as needed

πŸ“– Documentation

πŸ“„ License

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

πŸ™ Acknowledgments

  • OpenAI for powerful AI capabilities
  • Supabase for the amazing backend platform
  • Vercel for seamless deployment
  • Shadcn/ui for beautiful UI components

πŸ”— Links


Made with ❀️ by the Smart Domain team
⭐ Star us on GitHub

About

πŸš€ AI-powered intelligent domain name generation platform. Generate perfect domain names with OpenAI GPT-4, check availability, and manage favorites. Built with Next.js, TypeScript, and Supabase.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •