Giter Club home page Giter Club logo

hackalong-2018's Introduction

Hackalong 2018

Hackathon Information


Team


Idea

Create a random chat room website where users can either create a room with a set topic or join a random room where they'll be thrown into a chat with an odd number of people to talk about the set topic.

Rooms will start with 3 people and as the conversation duration progress more people will be thrown into the chat to keep it going. There will always be an odd number of people so the room can't be 50/50.

When a new user gets thrown into the chat it will feed them the previous messages so they can quickly catch up on the talk.

Members of the chat will have buttons that will allow to pick their side at any given time so everyone can see the diversity on the topic.


Backend Documenation

WebSocket Server

Pathname: /ws

To the server

  • SET_USERNAME Requires data.username - ^[a-zA-Z0-9_]+$
    • Setings Your Username
    • e.g. {"type":"SET_USERNAME", "data": { "username": "Testing321" }}
  • CREATE_CHANNEL Requires data.topic
    • Creates a new channel with a topic
    • e.g. {"type":"CREATE_CHANNEL", "data": { "topic": "Windows vs Mac LUL" }}
  • JOIN_CHANNEL
    • Joins a random channel
    • e.g. {"type":"JOIN_CHANNEL" }
  • LEAVE_CHANNEL
    • Leaves an active channel
    • e.g. {"type":"LEAVE_CHANNEL" }
  • SEND_MESSAGE Requires data.message
    • Sends a message in the active channel
    • e.g. {"type":"SEND_MESSAGE", "data": { "message": "Kappa 123" }}
  • VOTE Requires data.vote (bool - true is for - false is against)
    • Updates the user option on the topic
    • e.g. {"type":"VOTE", "data": {"vote": true}}

From the server

  • SET_USERNAME
    • Response from settings a username can either contain data.username or error
    • e.g. {"type":"SET_USERNAME", "data": { "username": "Testing321" }}
    • e.g. {"type":"SET_USERNAME","error":"ERR_BADUSERNAME"}
  • CREATE_CHANNEL
    • Sent when there was an error creating a new channel. If successful will send JOIN_CHANNEL instead
    • e.g. {"type":"CREATE_CHANNEL","error":"ERR_UNAUTHORIZED"}
  • JOIN_CHANNEL
    • Sent when you've successfully joined a channel from with sending JOIN_CHANNEL or CREATE_CHANNEL
    • e.g. {"type":"JOIN_CHANNEL"}
  • NEW_MESSAGE
    • Sent when there is a new message in the chat from either you or other members
    • e.g. {"type":"NEW_MESSAGE","data":{"message":"Kappa 123","username":"Testing321"}}
  • MEMBER_JOIN
    • Sent when a new member joins the chat
    • e.g. {"type":"MEMBER_JOIN","data":{"username":"Testing321"}}
  • MEMBER_LEAVE
    • Sent when a new member leaves the chat
    • e.g. {"type":"MEMBER_LEAVE","data":{"username":"Testing321"}}
  • VOTE
    • Sent when a user updates their option
    • 1 is for - 0 is no vote yet - -1 is against
    • e.g. {"type":"VOTE","data":{"member":{"username":"Testing123","vote":-1},"timestamp":"2018-08-11T22:43:29.3425895-04:00"}}

hackalong-2018's People

Contributors

jamiepine avatar timcole avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hackalong-2018's Issues

Make rooms have a unique URL

Make rooms have a unique URL, so it is possible to create a room for an argument somewhere and link people to the room.

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.