Skip to content

Repository files navigation

SpectraWHOIS

δΈ­ζ–‡ | English

A modern, fast WHOIS lookup service built with Next.js 15 and powered by RDAP (Registration Data Access Protocol). Features a beautiful Liquid Glass UI design and supports traditional WHOIS queries through Railway Node.js plugin.

πŸš€ Quick Deploy

Deploy to Vercel (Frontend)

Deploy with Vercel

  1. One-Click Deploy: Click the button above to deploy to Vercel
  2. Environment Variables: Optionally set NEXT_PUBLIC_WHOIS_PLUGIN_URL for traditional WHOIS support
  3. Done: Your WHOIS lookup service is live!

✨ Features

  • 🌍 Global TLD Support: Supports all TLDs via IANA bootstrap registry
  • 🌐 IDN Support: Full support for internationalized domain names with Punycode conversion
  • πŸ”„ Dual Protocol Support: RDAP for modern domains + traditional WHOIS via Railway plugin
  • ⚑ IANA Discovery: Dynamic WHOIS server discovery with 24-hour caching
  • 🎨 Liquid Glass UI: Modern design language with Framer Motion animations
  • πŸ“± Responsive Design: Optimized for mobile with smooth performance
  • πŸ”’ Privacy Compliant: Uses RDAP for modern privacy standards
  • πŸš€ Railway Plugin: Native Node.js TCP connections for traditional WHOIS
  • 🏷️ Brand Customization: Easily customize the brand name via environment variables
  • πŸ› οΈ Developer Experience: Built-in debug panel and environment detection
  • 🌐 Internationalization: Full support for English and Chinese languages

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Frontend      │───▢│  Railway API    │───▢│  WHOIS Servers  β”‚
β”‚  (Next.js)      β”‚    β”‚   (Node.js)     β”‚    β”‚  (Port 43)      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚                       β”‚
        β–Ό                       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  RDAP Servers   β”‚    β”‚  IANA Discovery β”‚
β”‚  (HTTPS API)    β”‚    β”‚ whois.iana.org  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm, yarn, or pnpm

Frontend Setup

  1. Clone the repository:
git clone https://github.com/marvinli001/spectra-whois.git
cd spectra-whois
  1. Install dependencies:
npm install
  1. Set up environment variables:
cp .env.example .env.local

Edit .env.local:

# Brand Customization (optional)
NEXT_PUBLIC_BRAND_NAME=SpectraWHOIS

# For WHOIS plugin support (optional)
NEXT_PUBLIC_WHOIS_PLUGIN_URL=https://your-railway-app.railway.app/whois
  1. Run the development server:
npm run dev

Railway Plugin Setup

Option 1: One-Click Deploy (Recommended)

Deploy WHOIS Plugin on Railway

Important: When deploying, make sure to:

  1. Set the Root Directory to whois-plugin
  2. Railway will auto-detect Node.js and deploy
  3. Copy the deployed URL for frontend integration

Option 2: Manual Setup

  1. Navigate to the plugin directory:
cd whois-plugin
  1. Install dependencies:
npm install
  1. Run locally for testing:
npm run dev
  1. Deploy to Railway:
    • Connect your GitHub repository to Railway
    • Set Root Directory to whois-plugin
    • Railway will automatically detect the Node.js project

πŸ”Œ Traditional WHOIS Plugin (Optional)

For enhanced functionality with traditional WHOIS queries, you can optionally deploy the Railway plugin:

Deploy WHOIS Plugin to Railway

Deploy WHOIS Plugin on Railway

Setup Instructions:

  1. Click the deploy button above
  2. Set Root Directory to whois-plugin in Railway dashboard
  3. Copy the deployed URL (e.g., https://your-app.railway.app)
  4. Add to your Vercel environment: NEXT_PUBLIC_WHOIS_PLUGIN_URL=https://your-app.railway.app/whois

πŸ“š Plugin Documentation | πŸ“š δΈ­ζ–‡ζ–‡ζ‘£

πŸ“¦ Deployment

Frontend (Vercel)

  1. Connect to Vercel:

    • Import your GitHub repository in Vercel
    • Vercel will automatically detect Next.js
  2. Set Environment Variables (Optional):

    NEXT_PUBLIC_WHOIS_PLUGIN_URL=https://your-railway-app.railway.app/whois
    
  3. Deploy:

    • Push to main branch triggers automatic deployment

πŸŽ›οΈ Environment Variables

Frontend (.env.local)

Variable Description Default Required
NEXT_PUBLIC_BRAND_NAME Custom brand name SpectraWHOIS No
NEXT_PUBLIC_WHOIS_PLUGIN_URL Railway WHOIS plugin URL - Optional*
NEXT_PUBLIC_WHOIS_API_URL Alternative plugin URL - Optional*
DEBUG_ENV_CHECKER Show environment debug logs false No

*Required only for traditional WHOIS tab functionality

Brand Customization

You can customize the brand name displayed throughout the application:

# .env.local or Vercel Environment Variables
NEXT_PUBLIC_BRAND_NAME=YourCustomName

This will update:

  • Homepage title and logo
  • Floating search bar header
  • Browser tab title
  • All UI references

If not set, defaults to "SpectraWHOIS"

Railway Plugin

Variable Description Default Required
PORT Server port 3001 Auto-set by Railway
NODE_ENV Environment mode production Auto-set by Railway
ALLOWED_ORIGINS CORS origins * No

πŸ”§ Configuration

WHOIS Tab Display

The traditional WHOIS tab appears when:

  1. βœ… WHOIS plugin URL is configured
  2. βœ… Domain supports RDAP (so both tabs can be shown)
  3. βœ… Frontend can reach the Railway plugin

Debug Panel (Development)

In development mode, a debug panel appears in the bottom-right corner showing:

  • Configuration status (green = configured, yellow = not configured)
  • Environment variables detection
  • Platform detection (local/Vercel/other)
  • Configuration suggestions

πŸ“‘ API Endpoints

WHOIS Plugin (Railway)

Single Domain Query

GET /whois?domain=example.com

Batch Query

POST /whois/batch
Content-Type: application/json

{
  "domains": ["example.com", "github.com", "vercel.com"]
}

Health Check

GET /health

Response Format

Success Response

{
  "success": true,
  "domain": "example.com",
  "whoisServer": "whois.verisign-grs.com",
  "rawData": "Domain Name: EXAMPLE.COM...",
  "parsedData": {
    "domain": "example.com",
    "registrar": "Reserved Domain",
    "registrationDate": "1995-08-14",
    "expirationDate": "2024-08-13",
    "nameServers": ["a.iana-servers.net", "b.iana-servers.net"]
  },
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Error Response

{
  "success": false,
  "domain": "example.com",
  "error": "Connection timeout",
  "source": "whois",
  "reason": "timeout",
  "troubleshooting": {
    "description": "Query timed out waiting for response",
    "suggestions": ["Server may be experiencing high load", "Try again later"]
  }
}

πŸ› οΈ Development

Project Structure

spectra-whois/
β”œβ”€β”€ src/                          # Next.js frontend
β”‚   β”œβ”€β”€ app/                      # App Router pages
β”‚   β”œβ”€β”€ components/               # React components
β”‚   β”‚   β”œβ”€β”€ debug/               # Debug panel
β”‚   β”‚   β”œβ”€β”€ ui/                  # UI components
β”‚   β”‚   └── whois/               # WHOIS-specific components
β”‚   β”œβ”€β”€ contexts/                # React contexts
β”‚   β”œβ”€β”€ services/                # API services
β”‚   └── utils/                   # Utilities
β”œβ”€β”€ whois-plugin/                # Railway Node.js plugin
β”‚   β”œβ”€β”€ lib/                     # WHOIS client library
β”‚   β”œβ”€β”€ server.js               # Express server
β”‚   β”œβ”€β”€ test.js                 # Basic tests
β”‚   └── package.json            # Plugin dependencies
└── public/                      # Static assets

Testing

Frontend

npm run build    # Test build
npm run lint     # Lint check
npm run dev      # Development server

WHOIS Plugin

cd whois-plugin
npm test         # Run basic tests
npm start        # Production server
npm run dev      # Development server with watch

🌟 Key Technologies

  • Frontend: Next.js 15, React 18, Tailwind CSS, Framer Motion
  • Backend: Node.js, Express.js, Native TCP Sockets
  • Deployment: Vercel (Frontend) + Railway (Backend)
  • Protocols: RDAP (HTTPS), Traditional WHOIS (TCP Port 43)
  • Discovery: IANA Bootstrap Registry

🎨 Customization Guide

Brand Name

Change the brand name displayed throughout the application:

  1. Local Development:

    # .env.local
    NEXT_PUBLIC_BRAND_NAME=YourBrandName
  2. Vercel Deployment:

    • Go to your project settings
    • Navigate to "Environment Variables"
    • Add NEXT_PUBLIC_BRAND_NAME=YourBrandName
    • Redeploy your application

Styling

The project uses Tailwind CSS 4. Key customization points:

  • Colors: Edit tailwind.config.ts for theme colors
  • Animations: Modify Framer Motion variants in components
  • Glass Effects: Adjust LiquidGlass component in src/components/ui/liquid-glass.tsx

πŸš€ Performance Optimizations

Implemented

  • βœ… Mobile-specific performance optimizations
  • βœ… Static gradients on mobile (animated on desktop)
  • βœ… Reduced motion for better mobile experience
  • βœ… Fixed positioning optimizations
  • βœ… Responsive spacing and layout

Recommendations

  • πŸ“Š Add Service Worker for offline support
  • πŸ”„ Implement virtual scrolling for large lists
  • πŸ’Ύ Add localStorage for query history
  • πŸ“¦ Code splitting for better initial load
  • πŸ–ΌοΈ Image optimization with Next.js Image

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some 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

  • IANA for maintaining the WHOIS server registry
  • Vercel for excellent Next.js hosting
  • Railway for reliable backend deployment
  • Tailwind CSS for the utility-first CSS framework
  • Framer Motion for beautiful animations

Built with ❀️ using Next.js 15 and Railway

About

A modern, fast WHOIS lookup service built with Next.js 15 and powered by RDAP

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages