Giter Site home page Giter Site logo

googlefeud / anonroom Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 655 KB

A website for creating anonymous chat rooms. Written entirely in typescript.

License: Apache License 2.0

TypeScript 92.97% HTML 0.80% JavaScript 1.60% CSS 4.63%
chat-rooms spa mongodb-database typescript

anonroom's Introduction

anonroom

A website for creating anonymous chat rooms. Written entirely in typescript.

WORKING DEMO: https://anonroom-test.glitch.me/

Built with

  • node.js as a backend
    • Typescript is used to ensure type-safety and bug-free code.
    • The express npm package provides the web server.
    • The ws npm package helps with creating a websocket server.
    • The mongodb npm package is used to interact with the mongoDB database.
  • On the client-side:
    • Webpack is used to bundle all the files
    • Typescript is used to compile JSX to normal JS
    • React is used to make the user interface
    • React-Router is used to make the website a SPA
    • Bootstrap is used to make the page responsive
  • The MongoDB database is used

Features

  • Create chat rooms, with an unlimited amount of participants
  • To become an "admin" of the room, type in the room password. Anyone can become an admin, they just need the password.
  • The only way users can connect is via a link
  • Different colors for each user
  • Room can get locked, preventing people from joining
  • Chat can get locked, preventing people from sending messages
  • Room can be deleted easily
  • Rooms automatically get deleted after 72 hours of inactivity (no messages).
  • Message history
  • If a discord webhook link is provided, all messages will also be sent via the webhook
  • Ability to download message history
  • Completely free and open source

How to run

Requirements:

  • node.js version 10+ (Latest LTS recommended)
  • npm
  • A mongoDB cloud database (free tier works just fine)

Setup:

  • Create the mongoDB cloud database
  • Clone the latest version of this repository
  • Execute the command npm i in the root directory
  • Create a config.json file in the root directory, it should look like this:
{
     "dbUsername": "user mongoDB cloud username",
     "dbPassword": "user mongoDB cloud password",
     "websiteURL": "The URL to your anonroom instace (http://localhost:port if running locally)",
     "websocketPath": "/gateway",
     "port": 4000,
     "heartbeatInterval": 60000
}
  • Execute the commands npm run f and npm run b in the root directory
  • Start the server with the command npm run start
  • Open up your browser and go to the website url you gave in the config.json file.

Future plans

  • Make a non SPA version (SPA is very overkill here)

anonroom's People

Contributors

googlefeud avatar

Stargazers

 avatar  avatar

Watchers

 avatar

anonroom's Issues

To be done

Top priority tasks right now:

  • Make it so the "Participant" model holds a property to their websocket client, or keep them at a different place.
  • Create utility methods for generating room/participant ids.

More mobile friendly

Currently, it's only mobile friendly if the screen is flipped horizontally, and even then, stuff just takes up a lot of space.

Implement room sweeping

Rooms should get deleted after 72 hours of no activity, but this isn't happening right now.

Bug when going back

If you join a room and then go back, you can enter a new username and join again.

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.