A Go Fiber based Featureful Chatroom Application.

Overview

Go-Chat

Fast Fiber-ous Chat Application

Deployed At heroku

Currently Supports:

  • Creation of chatrooms
  • Adding users to chatroom
  • Messaging to chatroom using Pure Websockets

Upcoming Features:

  • Invite to Chatrooms
  • Delete Messages
  • Tag Users
  • Search for Users
  • Email Verification
  • Client Website and Application

Last Update:

  • Added New Chat API (v2) with a different Auth Method

API Routes:

Users /api/v1/auth

  • /register : Register a new user
    • Method : POST
    • Body :
          {
              "username": "username",
              "email": "[email protected]",
              "password": "password"
          }
      
    • Response :
          {
              "error": false,
              "message": "User Registered Successfully",
              "access_token":"",
              "refresh_token":""
          }
      
  • /login : Login a user
    • Method : POST
    • Body :
          {
              "email": "[email protected]",
              "password": "password"
          }
      
    • Response :
          {
              "error": false,
              "message": "Logged in Successfully",
              "access_token":"",
              "refresh_token":""
          }
      
  • /refresh : Refresh a JWT Token
    • Method : POST
    • Body :
          {
              "refresh_token": "refresh_token"
          }
      
    • Response :
          {
              "access_token":"",
              "refresh_token":""
          }
      
  • /current-user : Get the current user
    • Method : GET
    • Response :
          {
              "user":"User Email ID"
          }
      
  • /user : Get a user by their email
    • Method : GET
    • Query : ?email=<user email>
    • Response :
          {
              "id": "User ID",
              "email":"User Email ID",
              "name":"User Name",
          }
      

Chats /api/v1/chat

  • /chats : Get all chats
    • Method : GET
    • Response :
          {
              "chats": [
                  {
                      "chat_id": "chat_id",
                      "chat_name": "chat_name",
                      "chat_users": [
                          "user_id",
                          "user_id"
                      ]
                  },
                  {
                      "chat_id": "chat_id",
                      "chat_name": "chat_name",
                      "chat_users": [
                          "user_id",
                          "user_id"
                      ]
                  }
              ]
          }
      
  • /chats : Create a Chat
    • Method : POST
    • Body :
          {
              "name": "Chat Name",
              "users": ["User1", "User2"] // User IDs 
          }
      
    • Response :
          {
              "error": false,
              "message": "Chat Created Successfully",
              "chat": {
                  "id": "Chat ID",
                  "name": "Chat Name",
                  "users": ["User1", "User2"] // User IDs 
              }
          }
      
  • /chats : Update a Chat
    • Method : PUT
    • Body :
          {
              "name": "Chat Name", //[Optional]
              "users": ["User1", "User2"] // User IDs [Optional]
          }
      
    • Response :
          {
              "error": false,
              "message": "Chat Updated Successfully",
              "chat": {
                  "id": "Chat ID",
                  "name": "Chat Name", // Updated Name
                  "users": ["User1", "User2"] // User IDs , Updated Valid USERIDS
              }
          }
      

Chats /api/v1/chat [WebSockets]

  • /<sess_id>/<chat_id> <sess_id> : User's JWT access Token <chat_id> : Chat ID to join.

Creates a Websocket Connection.

Chats /api/v2/chat [WebSockets] [NEW]

  • /<sess_id> <sess_id> : User's JWT access Token
    User is authenticated
    To connect to chatroom send TEXTMessage: "!startChat <chat_id>"

How to Run:

  • Clone the Repo Using
    git clone https://github.com/unownone/fiberous.git
    
  • Get Packages using :
    go get
    cd go-chat
    
  • Run:
    go build .
    ./go-chat
    
You might also like...

Awesome Books project with ES6 is an application that was built using Vanilla JavaScript with ES6 features like using arrow functions. This application allows you to keep records of your favorite books.

Javascript Project Awesome Books with ES6 Using Javascript to create a simple Awesome Books project. Populating the books list and then removing one b

Sep 28, 2022

This web application provides commercial and scientific space travel services. The application allows users to book rockets and join selected space missions.

This web application provides commercial and scientific space travel services. The application allows users to book rockets and join selected space missions.

space-hub About Project "Space Traveler's Hub" is A web application that provides commercial and scientific space travelling services, We are working

Nov 2, 2022

This a web application for a company that provides commercial and scientific space travel services. The application will allow users to book rockets, dragons and join selected space missions.

Space Travelers' Hub In this project, we have worked with the real live data from the SpaceX API. Our task was to build a web application for a compan

Oct 31, 2022

An AWS Cloud Native application using CDK that defines a Serverless Event Driven application for interacting with Twitter and utilising Machine Learning / AI as a Service.

An AWS Cloud Native application using CDK that defines a Serverless Event Driven application for interacting with Twitter and utilising Machine Learning / AI as a Service.

AWS Serverless Event Driven Twitter Bot An AWS Cloud Native application using CDK (Written in TypeScript) that defines a Serverless Event Driven appli

Dec 18, 2022

This web application provides commercial and scientific space travel services. The application allows users to book rockets and join selected space missions.

This web application provides commercial and scientific space travel services. The application allows users to book rockets and join selected space missions.

Space Traveler's Hub This web application provides commercial and scientific space travel services. The application allows users to book rockets and j

Oct 4, 2022

API for the Baby Food Introduction Application. Keep your baby's food introductions in check with this application and backtrack in case of allergies!

API for the Baby Food Introduction Application. Keep your baby's food introductions in check with this application and backtrack in case of allergies!

Baby food introduction API This API is part of the Baby Food Introduction application, which aims to help technological parents keep track of the food

Nov 25, 2022

Web3-citizens-app - React application based on smart contract using web3 and MetaMask extention.

Web3-citizens-app - React application based on smart contract using web3 and MetaMask extention.

Citizens App (web3-react-redux) React application based on smart contract using web3 and MetaMask extention. Start the applicarion Recomend to install

Aug 25, 2022

A web-based application for student-tutor matching service

A web-based application for student-tutor matching service

CodeX A web-based application for student-tutor matching service This project was generated using Nx. 🔎 Smart, Fast and Extensible Build System Addin

Jan 25, 2022

io-ts Typed Event Bus for the runtime of your Node.js application. A core for any event-driven architecture based app.

Typed Event Bus Based on io-ts types, this bus provides a handy interface to publish and consume events in the current runtime of the Node.js process.

May 23, 2022
Comments
  • Github Pages

    Github Pages

    Summary

    Set up a github Pages for the project in a way that it reciprocates whatever information is there in the readme.md too!

    Hints

    Try going through github pages implementations with .md files for a faster way!

    documentation enhancement good first issue hacktoberfest 
    opened by unownone 0
  • Sign In/ Sign Up reloads the page multiple times

    Sign In/ Sign Up reloads the page multiple times

    Summary

    The Sign up/sign in page seems to be failing , and login is not working, at least in the deployed heroku server. See why is that happening and come up with a fix.

    bug hacktoberfest medium 
    opened by unownone 0
Owner
Imon Roy
Coding fascinates me . A noob in Java and python
Imon Roy
Animated sprite hook for react-three-fiber

use-animated-sprite Animated sprite hook for react-three-fiber Dependencies npm install @react-three/drei @react-three/fiber react three Installation

Brit Gardner 7 Dec 4, 2022
This application provides the CDK project and a frontend that allows you to build a serverless chat application based on API Gateway's WebSocket-based API feature.

Serverless chat application using ApiGateway Websockets This project lets you provision a ready-to-use fully serverless real-time chat application usi

AWS Samples 60 Jan 3, 2023
An application where a user can search a location by name and specify a genre of music. Based on the parameters entered, a list of radio stations generate based on genre selected in that area.

Signs of the Times Description An application that allows for the user to enter a date and see the horoscope for that day, and famous people born on t

null 3 Nov 3, 2022
This is an application that entered the market with a mobile application in real life. We wrote the backend side with node.js and the mobile side with flutter.

HAUSE TAXI API Get Started Must be installed on your computer Git Node Firebase Database Config You should read this easy documentation Firebase-Fires

Muhammet Çokyaman 4 Nov 4, 2021
This is a full-stack exercise tracker web application built using the MERN (MongoDB, ExpressJS, ReactJS, NodeJS) stack. You can easily track your exercises with this Full-Stack Web Application.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

WMouton 2 Dec 25, 2021
A web application for a company that provides commercial and scientific space travel services. The application will allow users to book rockets and join selected space missions.

Space Travelers A web application for a company that provides commercial and scientific space travel services. The application will allow users to boo

Hector Torres 2 Apr 6, 2022
A simple To Do List application that allows users to save, edit, mark completed, and delete their to-dos, and save their list when application is closed. Build with JavaScript.

To Do List A simple To Do List online application that allows users to save, and manipulate their to-dos, and save their list when application is clos

Mahmoud Rizk 10 Dec 20, 2022
This plugin can be embedded in PHP application to give the web application specific routes/href

Routes Plugin PHP This plugin can be embedded in PHP application to give the web application specific routes/href location and for entering specific/l

Ifechukwudeni Oweh 7 Jul 17, 2022