Skip to content
buildwithneelPublic

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‘» GhostChat

Ephemeral β€’ Anonymous β€’ End-to-End Real-Time Collaboration

An open-source, privacy-first real-time messaging Progressive Web App (PWA) with password-protected rooms, QR code invitations, self-destructing file sharing, and zero accounts or logs.

License: MIT Node.js React Vite Socket.IO Tailwind CSS PWA Ready


Explore Features β€’ Quick Start β€’ PWA & Mobile β€’ Architecture β€’ Deployment β€’ Contributing


🌟 Overview

GhostChat is designed for people who want instant, secure, and disposable group communication without creating accounts, providing phone numbers, or leaving permanent digital footprints.

Whether you need a quick temporary channel to coordinate a meeting, share sensitive credentials that expire immediately, or transfer files securely between devices without signing into third-party clouds, GhostChat creates a sandbox room in seconds and vanishes completely once everyone leaves.


✨ Key Features

πŸ”’ Privacy & Ephemeral Security

  • Zero Login / Zero Tracking: No email, phone number, passwords, or cookies required. Start chatting immediately.
  • Auto-Assigned Identities: Dynamic, colorful identities (Ghost_XXXX) with avatar generation. Rename anytime on the fly.
  • Password-Protected Rooms: Optional room passwords hashed securely with bcrypt.
  • Disposable Architecture: Inactive rooms and messages are pruned automatically. Nothing is stored in permanent databases.
  • Self-Destructing Files: Share files with custom expiration timers, view-once limits, and optional file-level passwords.

πŸ“± Progressive Web App (PWA) & Mobile Excellence

  • Fully Installable: Add to Home Screen on iOS Safari, Android Chrome, and Desktop (Chrome / Edge / Brave).
  • Interactive Install Prompts: Custom banners and step-by-step visual installation guides tailored to each operating system.
  • Service Worker Caching: Intelligent cache-first caching for static assets, network-first navigation fallback, and offline awareness.
  • Mobile Virtual Keyboard Optimized: Seamless input pinning above the soft keyboard using the visualViewport API, preventing viewport jumping and hidden messages.
  • Responsive on Any Screen: Pixel-perfect support from compact screens (iPhone SE, 375Γ—667) to large 4K desktop displays.

⚑ Real-Time Collaboration

  • Blazing WebSockets: Powered by Socket.IO for sub-millisecond message delivery.
  • Live Typing Indicators: See who is typing in real time.
  • Room QR Codes & Instant Invites: Generate dynamic QR codes for any room; scan on mobile to join protected or open rooms instantly.
  • Interactive Audio Feedback: Custom sound cues for incoming and sent messages with audio permission handling and mute toggles.
  • Dual Theme Support: Beautiful glassmorphism aesthetic with high-contrast Dark and Light themes.
  • Recent Rooms Switcher: Fast client-side quick-switching between visited rooms with lock badges.

πŸ› οΈ Tech Stack

Frontend

Backend


πŸš€ Quick Start

Prerequisites

1. Clone Repository

git clone https://github.com/buildwithneel/Ghostchat.git
cd Ghostchat

2. Backend Setup

cd backend
npm install

Create a .env file from the template:

cp .env.example .env

Start the backend development server:

npm start

Server runs on http://localhost:3000

3. Frontend Setup

In a new terminal window:

cd frontend
npm install
npm run dev

Client runs on http://localhost:5173


πŸ“± PWA & Mobile Experience

GhostChat complies with modern PWA criteria and provides a native-like experience across platforms:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   GhostChat PWA                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Feature                  β”‚ Status                      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Installable App          β”‚ βœ… iOS, Android, Desktop    β”‚
β”‚ Service Worker (sw.js)   β”‚ βœ… Cache-First + Fallbacks  β”‚
β”‚ Manifest (manifest.json) β”‚ βœ… Maskable icons & screens β”‚
β”‚ Offline Mode             β”‚ βœ… Cached Shell & Fallback  β”‚
β”‚ Mobile Viewport / Kbd    β”‚ βœ… visualViewport pinned    β”‚
β”‚ Safe-Area Insets         β”‚ βœ… env(safe-area-inset-*)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  • iOS Safari: Tap Share $\to$ Add to Home Screen.
  • Android Chrome: Tap the Install banner or browser menu $\to$ Install app.
  • Desktop (Chrome/Edge): Click the install icon in the address bar.

πŸ›οΈ Architecture

Ghostchat/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ controllers/          # Room lifecycle & file management
β”‚   β”œβ”€β”€ routes/               # REST endpoints for room validation & uploads
β”‚   β”œβ”€β”€ socket/               # Real-time WebSocket connection handlers
β”‚   β”œβ”€β”€ uploads/              # Temporary file staging directory
β”‚   β”œβ”€β”€ utils/                # Password verification and hash helpers
β”‚   β”œβ”€β”€ server.js             # Main HTTP + Socket.IO server & cron tasks
β”‚   └── package.json
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   β”œβ”€β”€ manifest.json     # PWA Web App Manifest
β”‚   β”‚   β”œβ”€β”€ sw.js             # Service Worker caching & routing
β”‚   β”‚   β”œβ”€β”€ icon-*.png        # Maskable & standard application icons
β”‚   β”‚   └── notification.mp3  # Audio notification cues
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/       # UI components (Chat, Modals, TopBar, PWA Banner)
β”‚   β”‚   β”œβ”€β”€ pages/            # Home & ChatRoom views
β”‚   β”‚   β”œβ”€β”€ utils/            # Colors, sound player, config resolution
β”‚   β”‚   β”œβ”€β”€ App.jsx           # Theme context & route configuration
β”‚   β”‚   └── main.jsx          # Entry point & Service Worker registration
β”‚   β”œβ”€β”€ vercel.json           # Vercel deployment headers & rewrite rules
β”‚   β”œβ”€β”€ vite.config.js        # Vite bundler configuration
β”‚   └── package.json
β”‚
└── render.yaml               # Infrastructure-as-code for Render deployment

🌐 Deployment

1. Backend $\to$ Render

GhostChat requires a persistent Node.js environment to maintain Socket.IO WebSocket states:

  1. Create a new Web Service on Render connected to this repository.
  2. Render detects render.yaml automatically.
  3. Set the following environment variables:
    • PORT: 3000 (or Render default)
    • CORS_ORIGIN: https://your-frontend-domain.vercel.app
  4. Deploy service.

2. Frontend $\to$ Vercel

  1. Import repository into Vercel.
  2. Set Root Directory to frontend.
  3. Add environment variables:
    • VITE_BACKEND_URL: https://your-render-backend-url.onrender.com
  4. The included frontend/vercel.json automatically configures:
    • SPA route rewrites to /index.html
    • Cache-Control headers for /sw.js and /manifest.json
    • Static asset immutable caching
  5. Click Deploy.

πŸ”’ Security Best Practices

  • Zero Persistence: Chat logs exist solely in volatile memory during active socket sessions.
  • Cryptographic Hashing: Room passwords use standard salted bcrypt hashing.
  • Access Restrictions: Rate-limiting and size thresholds on temporary file attachments.
  • HTTPS Enforcement: WebSockets upgrade to WSS over TLS in production to prevent eavesdropping.

🀝 Contributing

Contributions, issues, and feature requests are welcome!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'feat: Add AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“œ License

Distributed under the MIT License. See LICENSE for details.


Made with πŸ‘» by buildwithneel

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages