Skip to content

shivamxverma/Chatterly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Chatterly

Chatterly is a scalable, real-time chat application built with modern technologies including Socket.io, Kafka, Redis, Postgres, and Next.js. This project demonstrates a robust architecture for handling multiple users with efficient message brokering and data storage.

Features

  • Real-time messaging with Socket.io
  • Scalable message brokering using Kafka
  • Efficient caching with Redis
  • Persistent message storage in Postgres
  • Frontend built with Next.js and TypeScript

Prerequisites

  • Node.js (v22 or higher)
  • PostgreSQL
  • Redis
  • Kafka
  • Yarn or npm

Installation

  1. Clone the repository:

    git clone https://github.com/shivamxverma/chatterly.git
    cd chatterly
  2. Install dependencies:

    yarn install
    # or
    npm install
  3. Set up environment variables: Create a .env.local file in the root directory and add the following:

    DATABASE_URL=postgresql://user:password@localhost:5432/chatterly
    REDIS_URL=redis://localhost:6379
    KAFKA_BROKERS=localhost:9092
    NEXT_PUBLIC_SOCKET_IO_URL=http://localhost:3000
  4. Set up the database:

    npx prisma migrate dev --name init
  5. Start the Kafka server and ensure Redis and Postgres are running.

Running the Application

  1. Start the development server:

    yarn dev
    # or
    npm run dev
  2. Open your browser and navigate to http://localhost:3000.

Technologies Used

  • Next.js: React framework for server-side rendering and static site generation
  • TypeScript: Type-safe JavaScript
  • Socket.io: Real-time bidirectional communication
  • Kafka: Distributed message brokering
  • Redis: In-memory caching
  • Postgres: Relational database for persistent storage
  • Prisma: ORM for database management

Contributing

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -m "Add your feature").
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

  • Inspired by modern chat applications
  • Built with guidance from web development tutorials and best practices

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors