Code Monkey home page Code Monkey logo

codechat's Introduction

CodeChat: Real-time Chat Application

Welcome to CodeChat, a real-time chat application designed to facilitate seamless communication through a terminal-based interface. Built with a focus on simplicity and efficiency, CodeChat leverages WebSockets for real-time messaging and is structured to provide a clear separation of concerns, making it both scalable and easy to maintain.

Upcoming Integrations (Proposed)

  • Tview, for a better Terminal aspect.
  • Web interface (Optional)

Current Features

  • Real-time Communication: Instantly send and receive messages with minimal latency.
  • CLI-based Interface: Access and interact with the chat directly from your terminal.
  • Scalable Architecture: Designed with a modular architecture that separates the client, server, and common utilities.

Getting Started

To get started with CodeChat, clone this repository to your local machine and follow the setup instructions below.

Prerequisites

  • Golang
  • WebSocket support

Installation

  1. Clone the repository:

    git clone https://github.com/<yourusername>/CodeChat.git
  2. Navigate to the cloned directory:

    cd CodeChat
  3. Build the application:

    ./build.sh

    If you encounter a permission denied error, run chmod +x build.sh to make the script executable.

Running CodeChat

To start the ChatApp server, run:

./CodeChat server

To connect as a client from another terminal, run:

./CodeChat client

Project Structure

CodeChat is organized into several key components for clarity and ease of development:

  • cmd/: Contains the CLI setup using CobraCLI, including root.go for CLI environment setup and chat.go for chat command definitions.
  • internal/:
    • server/: Contains server logic, WebSocket connection management (server.go), and client handling (client.go).
    • client/: Manages chat client functionality, WebSocket connections, and terminal UI rendering (ui.go).
  • pkg/:
    • websocket/: Provides utilities for WebSocket operations, like message encoding/decoding.
    • common/: Defines common data structures, such as message formats.
  • main.go: The application's entry point, initializing and running Cobra commands.

Contributing

Contributions to CodeChat are welcome!

License

CodeChat is open-sourced under the MIT License. See the LICENSE file for more details.

codechat's People

Contributors

sweetdevil144 avatar dependabot[bot] avatar

Stargazers

Mrigank Shekhar Dwivedi avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.