Sukhendu2002/InboxGhost

A privacy-focused disposable email service built with Next.js and Express.js that enables users to generate temporary email addresses for protecting their primary inbox from spam.

★ 0Forks 0TypeScriptGitHub ↗Compare

README

InboxGhost - Disposable Email Service

A privacy-focused disposable email service built with Next.js and Express.js that enables users to generate temporary email addresses for protecting their primary inbox from spam.

Features

  • Instant Generation: Create disposable emails in one click
  • Real-time Delivery: Receive emails instantly via WebSocket connections
  • Zero Registration: Complete anonymity with no account creation required
  • Auto-Expiry: Automatic cleanup prevents long-term data retention
  • Mobile-First: Responsive design optimized for all devices

Tech Stack

Frontend

  • Next.js 14 (App Router)
  • Tailwind CSS + shadcn/ui components
  • Zustand for state management
  • Socket.IO client for real-time updates

Backend

  • Express.js with TypeScript
  • Redis for data storage
  • Socket.IO for WebSocket connections
  • Winston for logging

Quick Start

Prerequisites

  • Node.js 18+
  • Docker and Docker Compose

Development Setup

  1. Clone and install dependencies:

    # Install frontend dependencies
    cd frontend
    npm install
    
    # Install backend dependencies
    cd ../backend
    npm install
  2. Start Redis with Docker:

    # From project root
    docker-compose -f docker-compose.dev.yml up -d
  3. Start the backend:

    cd backend
    npm run dev
  4. Start the frontend:

    cd frontend
    npm run dev
  5. Access the application:

Using Docker Compose (Full Stack)

# Start everything with Docker
docker-compose up -d

# View logs
docker-compose logs -f

# Stop services
docker-compose down

API Endpoints

Address Management

  • POST /api/v1/address - Generate new disposable email
  • GET /api/v1/address/{address}/info - Get address information
  • DELETE /api/v1/address/{address} - Delete address

Inbox Operations

  • GET /api/v1/inbox/{address} - Get messages for address
  • GET /api/v1/inbox/{address}/messages/{messageId} - Get specific message
  • DELETE /api/v1/inbox/{address}/messages/{messageId} - Delete message

Health & Status

  • GET /api/health - Health check
  • GET /api/stats - Basic statistics

Environment Variables

Backend (.env)

PORT=3001
NODE_ENV=development
REDIS_URL=redis://localhost:6379
FRONTEND_URL=http://localhost:3000
EMAIL_DOMAIN=inboxghost.com
LOG_LEVEL=info

Frontend (.env.local)

NEXT_PUBLIC_API_URL=http://localhost:3001/api/v1
NEXT_PUBLIC_WS_URL=http://localhost:3001

Development

Project Structure

├── frontend/          # Next.js frontend application
├── backend/           # Express.js backend API
├── docker-compose.yml # Production Docker setup
├── docker-compose.dev.yml # Development Docker setup
└── README.md

Available Scripts

Frontend:

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run start - Start production server

Backend:

  • npm run dev - Start development server with hot reload
  • npm run build - Build TypeScript to JavaScript
  • npm run start - Start production server

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

License

MIT License - see LICENSE file for details

Contributors

Sukhendu2002

Issues