Coder Social home page Coder Social logo

chesshub.io's Introduction

About ChessHub.io

![Gitter](https://badges.gitter.im/Join Chat.svg)

ChessHub.io is an attempt to make a non trivial real-time multiplayer gaming web application using the following technologies:

Client side

Server side

Why Chess?

  • Because it is a good use case for real-time multiplayer gaming
  • Because every time you look for a real-time application example on the web, you end up on chat applications, so I decided to change the subject :-)
  • Because I am a chess junkie!

Goals

The goal of ChessHub.io is not to provide a fully featured web application to play chess but to provide a non trivial application serving as an example of modern web application using the aforementioned technologies.

Apart from chess logic, here is a list of reusable features:

  • Application structure and setup
  • User authentication and registration process (/login & /register)
  • Real time multiplayer gaming logic (See gaming logic section)
  • RESTful API (/api)
  • Real time monitoring dashboard (/monitor)
  • "TV" page to broadcast any real-time content (/tv)

Even though the application is related to chess, it is easy to change the domain model along with application logic and keep/adapt the application structure.

Gaming logic

ChessHub.io uses a simple gaming sequence through Socket.io that works for 2+ players. Here is a simplified diagram of most relevant events:

chesshub.io

Build and Run the application

Prerequisites

  • Node JS
  • Mongo DB up and running on the default port (27017) and using the default database (test)

Run the application

$> npm install
$> node initData.js
$> node .

Browse the following address: http://localhost:3000

You can register a new account or sign in with the following credentials: [email protected] / foobar

Note: The initData.js script will populate Mongo DB with some data so you can use the application.

Screen shots

Home page

home

Playing chess in real time

play

Watch live game

tv

Real time monitoring dashboard

monitor

Contribution

I made ChessHub.io primarily to learn how to make this kind of real-time applications with a non hello world use case.

I am aware of the excellent MEAN.io project, but I decided to go from the ground up without code generation to understand how things work behind the scene.

I am not an expert in all these technologies, so there are probably some points of improvement in the application design, structure or code.

If you believe there is best practice I have not followed, please let me know by opening an issue on the issue tracker. Pull requests are welcome!

License

ChessHub.io is released under the MIT license (see LICENSE file).

chesshub.io's People

Stargazers

 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.