Coder Social home page Coder Social logo

btc_crash_game's Introduction

Crash Gambling Simulator

A simulation of the popular online casino game "crash" with accurate casino odds.

Demo Link - Here showcase

Technologies Used

  • React.js - JS framework used to create the frontend.
  • Express.js - The backend server environment and serves as an API.
  • Node.js - JS environment that executes JS outside of the browser.
  • Socket.io - Allows communication between the server and client in real time.
  • MongoDB - NoSQL database used to store all user and server information.
  • Passport.js - Middleware used to authenticate and authorize users. Handles logins and registrations.
  • bcrypt.js - Secures user passwords by hashing all passwords before storing in database.
  • Chart.js - Create visualizations of data through charts and graphs like line graphs.
  • HTML
  • CSS

Features

  • Login system - Users must log in or create an account to place bets.
  • Betting system - Users wager their balance before the round begins. A multiplier counts up from 1.00 and users can cash out at any time, multiplying their bet amount by the current multiplier. The multiplier will stop, or crash, at a randomly generated value, and users who have not cashed out yet will lose their entire bet.
  • Accurate Gambling Odds - Every crash value is generated using the same algorithms real casinos use, including a 3% house edge.
  • Live Bet Tracker - Users can see other users betting live. When a user places a bet, their username and bet amount are added to a live table. When the user cashes out, their cash out multiplier and profit are also added.
  • Game History - Displays the crash values of the last 25 games played along with the streak of games with crash values above or below 2.00.
  • Chat - Users who are logged in can send messages to other users through chat
  • Live Line Graph - Visualization of the current multiplier with respect to time.

Installation

// Clone the repository
$ git clone https://github.com/wbrandon25/Online-Crash-Gambling-Simulator

// Navigate to directory
$ cd ./Online-Crash-Gambling-Simulator

Setup and Run Client

// Navigate to client directory 
$ cd ./client

// install packages
$ npm i 

// start client (localhost:3000)
$ npm start

// For running in production
$ npm run build
$ npm start

Setup and Run Server

// Navigate to server directory 
$ cd ./backend

// install packages
$ npm i 

// install nodemon for development
$ npm i -D nodemon

// start node server (localhost:4000) and socket.io server (localhost:3001) 
$ npm start 

Environment Variables

  • MONGOOSE_DB_LINK - URL to MongoDB server
  • PASSPORT_SECRET - Secret for Passport.js authorization and authentication

btc_crash_game's People

Contributors

sufyanfarooq 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.