/guest-client

Vue.js web application for event guests for finding events and manage tickets (optimised for mobile).

Primary LanguageJavaScript

Ticketing dApp

Blockchain Ticketing

Software Project

University of Zurich

this is a test

Prerequisites

  • Git command line interface
  • Node.js command line interface
  • Metamask Extension for your browser communicating with the Ethereum blockchain
  • Ganache to spin up a blockchain with funded test accounts and instant mining

Project Setup

Clone the Project

git clone --recurse-submodules https://github.com/bc-ticketing/guest-client

Set up Client

cd guest-client/client
npm install

Install Truffle

cd ..
sudo npm install -g truffle

Setup Metamask

  1. Start a local blockchain by opening the Ganache application.
  2. Create a new workspace and add truffle-config.js to the project and safe the workspace.
  3. Copy the mnemonic phrase (12 word seed phrase) in the Ganache application.
  4. Open Metamask in your browser (Google Chrome recommended).
  5. Click on import using account seed phrase and paste the mnemonic seed phrase. (No funds are shown because Metamask is not connected to the local network yet.)
  6. Click on the network dropdown and select Custom RPC.
  7. Enter Ganache as the Network Name and the Ganache network configuration as the RPC URL which is by default http://127.0.0.1:7545.
  8. Click Save.
  9. You should now be logged in with an account(s) from the Ganache application with a balance of 100 ETH.

Run Environment

First, start local blockchain with by opening the Ganache application.

Then:

# get recent contracts, deploy them and run
./deployRun.sh
# if contracts already deployed, to run the environment
npm install
npm run serve

Standalone setup and run commands

# compiles and minifies for production
npm run build
# run unit tests
npm run test:unit
# lints and fixes files
npm run lint

⚠️ Make sure your Metamask is connected to the correct network! ⚠️

Environment File & Variables

The application needs a file named .env.local in the root directory. The content of the file needs to be a set of key-value pairs in the format KEY=VALUE. The following values need to be set:

Identity Contract Address

Public address of the deployed Identity contract VUE_APP_IDENTITY_CONTRACT_ADDRESS

Event Factory Contract Address

Public address of the deployed Event Factory Contract VUE_APP_EVENT_FACTORY_CONTRACT_ADDRESS

Trust Certificates API Url

Url for the trust certificates API VUE_APP_TRUST_CERTIFICATES_API_URL

Trust Certificates API Port

Port for the trust certificates API VUE_APP_TRUST_CERTIFICATES_API_PORT

Twitter Bearer Token

Twitter API token for the trust certificates API VUE_APP_TWITTER_BEARER_TOKEN

Idetix Approver Address

Public address of the Idetix Identity approver VUE_APP_IDETIX_APPROVER_ADDRESS