Skip to content

Termino is a simple chat application built with Deno.

Notifications You must be signed in to change notification settings

silverlila/termino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

title description
Termino: Chat CLI App
A stateless chat application built with Deno.

Termino

Termino is a simple stateless chat application built with Deno. The application allows users to create chat channels, join existing channels, and communicate in real-time using WebSockets.

Features

  • Channel Creation: Users can create their own chat channels by specifying a unique channel ID and password.
  • Join Existing Channel: Users can join existing channels by providing the correct channel ID and password.
  • Real-time Communication: Messages sent within a channel are broadcasted in real-time to all channel members.
  • Rate Limiting: Users are limited in the frequency with which they can send messages to prevent spam.
  • System Notifications: System notifications are sent to the channel when a user joins or leaves.
  • Command-based Interface: The application is controlled via intuitive commands such as /create, /join, and /leave.

Architecture

The application is split into client and server modules:

  • Client:
    • Connects to the server through a WebSocket endpoint.
    • Listens for user input, sends commands/messages to the server, and handles server responses.
    • Provides user feedback through the console.
  • Server:
    • Handles incoming WebSocket connections.
    • Processes client commands and broadcasts messages.
    • Maintains a channel manager that keeps track of active channels and the clients connected to them.
    • Uses simple rate limiting to prevent frequent message sending by a single user.

Installation and Setup

  1. Clone the repository.

    git clone [YOUR_REPOSITORY_LINK]
  2. To start the server or client, use the main.ts file:

    Start the server
    deno run --allow-net main.ts server
    
    Start the client
    deno run --allow-net main.ts client
    

Usage

  1. Create a Channel:
    /create
  2. Join an Existing Channel:
    /join
  3. Leave the Current Channel:
    /leave
  4. View Help Commands:
    /help
  5. Exit the App:
    /exit

Contribute

Contributions are always welcome! Please ensure you follow the code style and test your changes before creating a pull request.

About

Termino is a simple chat application built with Deno.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published