Skip to content

Echo Chat is a full-stack, real-time messaging app built with React + TypeScript (Vite, Tailwind, shadcn/ui) and Node/Express + Socket.io with JWT auth. It delivers instant messaging, live presence, accurate message counts, mobile-friendly UI, and resilient reconnect logic.

Notifications You must be signed in to change notification settings

abhi9vaidya/echo-chat

Repository files navigation

Echo Chat

A modern, real-time chat application built with cutting-edge web technologies. Features seamless messaging, user authentication, and live user presence tracking.

Project Overview

Echo Chat is a full-stack real-time messaging application that demonstrates advanced web development skills. Built with modern technologies, it showcases real-time communication capabilities, responsive design, and scalable architecture.

Technologies Used

This project is built with:

  • Frontend: React, TypeScript, Vite, Tailwind CSS, shadcn-ui
  • Backend: Node.js, Express, Socket.io
  • Database: (Add your database choice if applicable)
  • Authentication: JWT-based auth system

Getting Started

Prerequisites

Installation

  1. Clone the repository:
git clone <YOUR_GIT_URL>
cd echo-chat
  1. Install dependencies:
npm install
  1. Start the development server:
npm run dev

The application will be available at http://localhost:8080

Backend Setup

Navigate to the backend directory and install dependencies:

cd echo-backend
npm install
npm run dev

Features

  • Real-time Messaging: Instant message delivery using WebSocket connections with Socket.io
  • User Authentication: Secure JWT-based authentication system with registration and login
  • Live Presence Tracking: Real-time online user status and activity monitoring
  • Responsive Design: Mobile-first approach with adaptive layouts using Tailwind CSS
  • Enhanced Mobile Experience: Touch-optimized interactions with visual feedback, including active scale effects and touch manipulation for native-like mobile interactions
  • Modern UI Components: Clean, accessible interface built with shadcn-ui component library
  • Message Count Updates: Live conversation message counters with WebSocket synchronization
  • Smart Refresh Logic: Intelligent polling with exponential backoff and user activity detection
  • TypeScript Integration: Full type safety across frontend and backend

Development

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run lint - Run ESLint
  • npm run preview - Preview production build

Deployment

This application can be deployed to any static hosting service or platform that supports Node.js applications.

Architecture Overview

Frontend Architecture

  • React 18 with TypeScript for type-safe component development
  • Vite for fast development and optimized production builds
  • Tailwind CSS with shadcn-ui for modern, accessible UI components
  • React Router for client-side routing
  • Socket.io Client for real-time WebSocket communication

Backend Architecture

  • Node.js with Express.js for RESTful API endpoints
  • Socket.io for real-time bidirectional communication
  • JWT Authentication for secure user sessions
  • MongoDB for data persistence (configurable)

Key Technical Features

  • Real-time Communication: WebSocket-based messaging with instant delivery
  • Smart State Management: React hooks with optimistic updates
  • Performance Optimization: Intelligent refresh logic with exponential backoff
  • Responsive Design: Mobile-first approach with adaptive layouts
  • Type Safety: Full TypeScript integration across the stack

Technical Challenges & Solutions

Real-time Message Synchronization

Challenge: Ensuring message counts stay accurate across multiple clients and preventing double-counting of user messages.

Solution: Implemented WebSocket-based message count updates with client-side logic to avoid counting optimistic messages twice.

User Activity Detection

Challenge: Balancing real-time updates with server load optimization.

Solution: Smart refresh system that detects user activity and adjusts polling intervals accordingly (2s active, 30s inactive).

Connection Resilience

Challenge: Handling network interruptions and failed requests gracefully.

Solution: Exponential backoff strategy for failed requests with automatic retry logic.

Mobile Touch Optimization

Challenge: Providing native-like touch interactions on mobile devices while maintaining desktop functionality.

Solution: Implemented touch-manipulation CSS properties and active scale effects (95-98% scaling) on interactive elements including buttons, conversation items, and navigation controls for improved tactile feedback and user experience.

Learning Outcomes

This project demonstrates proficiency in:

  • Full-stack JavaScript/TypeScript development
  • Real-time application architecture with WebSockets
  • Modern React patterns and hooks
  • Responsive UI/UX design
  • Authentication and security best practices
  • Performance optimization techniques
  • Production-ready deployment strategies

Author

Abhinav Vaidya

Full-Stack Developer specializing in modern web technologies. This project showcases expertise in building scalable, real-time applications with React, TypeScript, and Node.js.

fc4ee4f (Initial commit)

About

Echo Chat is a full-stack, real-time messaging app built with React + TypeScript (Vite, Tailwind, shadcn/ui) and Node/Express + Socket.io with JWT auth. It delivers instant messaging, live presence, accurate message counts, mobile-friendly UI, and resilient reconnect logic.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages