Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💬 Chatterz

Next.js Socket.io TypeScript Tailwind CSS Express.js

🚀 Real-time chat application with temporary rooms

A modern, responsive chat app built with Next.js and Socket.IO featuring temporary rooms that expire when all users leave.

✨ Features

  • 🏠 Create Temporary Rooms - Generate unique room codes instantly
  • 👥 Real-time Messaging - Send and receive messages instantly
  • 🔒 Room-based Chat - Private conversations in dedicated rooms
  • 📱 Responsive Design - Beautiful UI that works on all devices
  • Auto-cleanup - Rooms automatically expire when empty
  • 🎨 Modern UI - Clean, intuitive interface with Tailwind CSS
  • 🔄 Live User Count - See how many users are in your room
  • 📋 Easy Sharing - Copy room codes to clipboard
  • 🌙 Theme Support - Built-in dark/light theme switching

🌟 Future Features Planning

  • Setting room to public and private, and showing public rooms on dashboard
  • User joining message in group
  • Displaying all users in group in option to private message
  • Replying to messages
  • Attachments
  • Voice messages
  • May bring voice and video call

🛠️ Tech Stack

Frontend

Backend

Development Tools

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • npm 10+

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/chatterz.git
    cd chatterz
  2. Install dependencies

    npm install
  3. Start the development servers

    npm run dev
  4. Open your browser

📁 Project Structure

chatterz/
├── 📁 apps/
│   ├── 📁 client/          # Next.js frontend application
│   │   ├── 📁 app/         # App Router pages and layouts
│   │   ├── 📁 components/  # Reusable UI components
│   │   └── 📁 public/      # Static assets
│   └── 📁 server/          # Express.js backend server
├── 📁 packages/
│   ├── 📁 eslint-config/   # Shared ESLint configuration
│   ├── 📁 typescript-config/ # Shared TypeScript configuration
│   └── 📁 ui/              # Shared UI component library
├── 📄 package.json         # Root package configuration
├── 📄 turbo.json          # Turbo build configuration
└── 📄 README.md           # Project documentation

🎮 How to Use

Creating a Room

  1. Click "Create New Room"
  2. Copy the generated room code
  3. Share the code with friends

Joining a Room

  1. Enter your name
  2. Enter the room code
  3. Click "Join Room"
  4. Start chatting!

Features in Action

  • Real-time messaging with instant delivery
  • User count updates live as people join/leave
  • Message history loads when joining existing rooms
  • Auto-scroll to latest messages
  • Responsive design works on mobile and desktop

🔧 Available Scripts

In the project root:

  • npm run dev - Start both client and server in development mode
  • npm run build - Build the entire project
  • npm run lint - Run ESLint across all packages
  • npm run check-types - Run TypeScript type checking
  • npm run format - Format code with Prettier

🏗️ Architecture

Real-time Communication

  • Socket.IO handles bidirectional communication
  • Room-based messaging with automatic cleanup
  • Event-driven architecture for scalability

State Management

  • React hooks for local state
  • Socket events for real-time updates
  • TypeScript interfaces for type safety

Styling

  • Tailwind CSS for utility-first styling
  • Radix UI for accessible components
  • Responsive design with mobile-first approach

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

This project is open source and available under the MIT License.

🙏 Acknowledgments

  • Built with ❤️ using modern web technologies
  • Icons by Lucide
  • UI components inspired by shadcn/ui

About

real-time chatting app with temporary rooms that expires after all users exit (demo of socket.io)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages