Skip to content

Soujiro0/zeroauth-chat

Repository files navigation

ZeroAuth Chat (No Account Needed Real-Time Messenger)

A modern, instant mobile-UX messaging web application built with Node.js, Socket.io, Express, MySQL, and React (Vite) where no account or registration is needed. Users connect instantly via ephemeral device-bound UUIDs (#1A2B) without accounts or passwords, enjoy multi-room live channels (#Global), launch instant 1-click Direct Messages or WebRTC voice/video calls, and share server-optimized rich media—all backed by a 7-day automatic message pruning policy for absolute privacy.

Quick Start

  1. Clone the repository to your local machine.
  2. Install root server dependencies:
    npm install
  3. Install frontend client dependencies and build the production bundle:
    npm run build:client
  4. Configure your environment variables:
    cp .env.example .env
    (Ensure your local MySQL server is running and create the local_chat database).
  5. Start the backend server:
    npm start
  6. Open your browser and navigate to http://localhost:5000 to launch the 2-step onboarding wizard.

Screenshots & UI Walkthrough

Here are live examples of the application in action from the screenshots/ directory:

1. 2-Step Onboarding Wizard

Step 1: Display Name Entry Step 1: Clean, zero-registration display name entry.

Step 2: Badge Customization & Live Preview Step 2: Selecting custom avatar badge colors (#0084FF, #10B981, etc.) with real-time preview.

2. Zero-Registration Architecture Info Screen

How It Works Screen Dedicated info screen detailing ephemeral UUID storage and 7-day auto-pruning.

3. Real-Time Grid & Channel Chat

Multi-Room Channels & Online Grid Live multi-room channels (#Global, #Tech) alongside the global online peers grid.

4. 1-Click Direct Messaging & WebRTC Calling

Direct Messaging & Voice/Video Call Instant 1-on-1 private messaging and peer-to-peer WebRTC voice/video calling.

5. Optimized Rich Media & Glassmorphism Previews

Media Upload Progress & Fullscreen Modal Real-time upload progress ring and glassmorphism preview modal for compressed images and videos.

Commands

Command Description
npm start Start the Express and Socket.io production server (server.js)
npm run build:client Navigate into client/ and build the optimized Vite production bundle (dist/)
cd client && npm run dev Run the Vite frontend development server on http://localhost:5173 with hot module replacement

Architecture & Core Design Decisions

  • Zero-Registration & Ephemeral Sessions: Instead of database user accounts, user identity (username, tag, avatarColor) is bound to a crypto.randomUUID() stored directly in browser localStorage.
  • Global Online Grid & Instant DMs: All connected sockets register globally on connection (io.emit('online_users', ...)). Clicking any active peer on the grid opens a private 1-on-1 Direct Message namespace (dm_[uuid1]_[uuid2]) without requiring friend requests.
  • WebRTC P2P Signaling: Direct peer-to-peer audio and video calls are negotiated over Socket.io (call_user, accept_call, ice_candidate) with interactive floating controls.
  • Server-Side Media Processing: Uploaded images (sharp) and videos/audio (fluent-ffmpeg) are automatically compressed and converted (.webp, .mp4, .mp3) to ensure high performance across mobile and desktop devices.
  • 7-Day Auto-Pruning: Direct messages older than 7 days are automatically purged from the MySQL database to maintain privacy and lean server storage.

Documentation Index

Comprehensive architectural notes and API details can be found inside docs/:

  • Features Documentation: Detailed overview of user-facing workflows, onboarding, DMs, WebRTC, and media features.
  • Functions & Core Logic Documentation: Breakdown of userState.js, Socket.io handlers, MySQL models, and frontend context hooks.
  • Database Schema Documentation: Specifications for MySQL tables (messages, reactions), environment variables (.env), and retention policies.

About

Instant real-time chat with zero account registration needed. Powered by device-bound UUIDs, live channel grids, and WebRTC calling.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors