Skip to content

This app is a PoC of a room booking system built on public blockchain. #solidity #smartcontract #ethereum

License

Notifications You must be signed in to change notification settings

mtskf/coladaybooking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cola Day 2022 - Room Booking System [PoC]

This application is a proof of concept for a room booking system for Cola Day 2022.

demo

Demo

Features

  • shows meeting rooms availability
  • allows users to book meeting rooms by the hour (up to 4 hours per event)
  • allows users to cancel their booking
  • stores data in blockChain (Ropsten Test Network)
  • encrypts event titles with public key encryption (end to end)

Usage

  • On your browser, login to MetaMask and connect to Ropsten Testnet.
  • Visit the demo site: https://coladay.vercel.app/
  • Then, drag your mouse over the timetable to start booking rooms!

Note

  • This web app is designed for Desktop/Laptop devices, not compatible with mobile browsers.
  • Each time you create or delete an event on the blockchain, you will need Ethereum gas for the transaction.
  • The event date is automatically updated to tomorrow for demo purpose.

Architecture

architecture

Dev setup

Contract

Set up secret keys & mnemonic phrase

$ cd truffle
$ mv secrets_template.json secrets.json

Then, edit the secrets.json file with your own secret keys and mnemonic phrase:

  • mnemonic -> use your account on testnet. To create a new account, run $ npx mnemonics.
  • projectId -> use your project ID on Infura
  • etherscanApiKey

Install dependencies

$ cd truffle
$ npm install
$ npm install -g truffle
$ npm install -g ganache-cli

Local Development with Truffle & Ganache

$ cd truffle
$ ganache-cli --accounts 10
$ truffle compile
$ truffle compile && truffle migrate --network develop

Test with Truffle

$ truffle test --show-events

Deploy to Ropsten Testnet

$ truffle compile &&truffle migrate --network ropsten

Front-end

Install dependencies

$ cd client
$ npm install

Start React dev server

$ npm start

Build

$ npm build

About

This app is a PoC of a room booking system built on public blockchain. #solidity #smartcontract #ethereum

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages