Building an AI-Powered Domain Name Generator: Technical Deep Dive
As developers, we've all been there - staring at a blank terminal, trying to come up with the perfect name for our new project, startup, or side hustle. After building Wheelie Names, an AI-powered domain generation platform, I want to share the technical challenges and solutions we encountered.
The Problem Space
Traditional domain name generation relies on:
- Manual brainstorming (time-consuming)
- Simple word concatenation (generic results)
- Dictionary-based combinations (limited creativity)
- No real-time availability checking (frustrating UX)
We needed something smarter.
Architecture Overview
Core AI Components
1. Natural Language Processing Pipeline
python
import torch
from transformers import GPT2LMHeadModel, GPT2Tokenizer
import nltk
from nltk.corpus import wordnet
class NameGenerator:
def __init__(self):
self.model = GPT2LMHeadModel.from_pretrained('gpt2-medium')
self.tokenizer = GPT2Tokenizer.from_pretrained('gpt2-medium')
self.industry_keywords = self.load_industry_data()
def generate_names(self, industry, keywords, count=50):
# Seed with industry-specific context
prompt = f"Creative {industry} business names: "
# Generate base names
inputs = self.tokenizer.encode(prompt, return_tensors='pt')
with torch.no_grad():
outputs = self.model.generate(
inputs,
max_length=20,
num_return_sequences=count,
temperature=0.8,
pad_token_id=self.tokenizer.eos_token_id
)
names = [self.tokenizer.decode(output) for output in outputs]
return self.filter_and_rank(names, keywords)
const calculateBrandabilityScore = (name) => {
const factors = {
length: scoreLengthOptimal(name), // 6-12 chars ideal
pronunciation: scorePhonetics(name), // Easy to say
memorability: scoreMemorability(name), // Sticks in mind
uniqueness: scoreUniqueness(name), // Stands out
domainability: scoreDomainFriendly(name), // Works as URL
trademark: scoreTrademarkSafety(name) // Legal safety
};
// Weighted average
return Object.entries(factors)
.reduce((score, [key, value]) => {
const weights = {
length: 0.15, pronunciation: 0.20,
memorability: 0.25, uniqueness: 0.20,
domainability: 0.10, trademark: 0.10
};
return score + (value * weights[key]);
}, 0);
};
import asyncio
import aiohttp
from concurrent.futures import ThreadPoolExecutor
class DomainChecker:
def __init__(self):
self.registrar_apis = [
'namecheap', 'godaddy', 'cloudflare', 'gandi'
]
self.session_pool = aiohttp.ClientSession()
async def check_bulk_availability(self, names, tlds):
# Batch requests to avoid rate limits
tasks = []
for name in names:
for tld in tlds:
domain = f"{name}.{tld}"
tasks.append(self.check_single_domain(domain))
# Process in chunks to avoid overwhelming APIs
chunk_size = 50
results = []
for i in range(0, len(tasks), chunk_size):
chunk = tasks[i:i + chunk_size]
chunk_results = await asyncio.gather(*chunk)
results.extend(chunk_results)
# Rate limiting
await asyncio.sleep(0.1)
return self.format_results(results)
Top comments (0)