Live Demo: https://ticket-graph.herokuapp.com/
it could take up to 30 seconds sometimes cause project is deployed on free heroku dyno
Video: https://youtu.be/06e79YXQdKA
The core idea of this project is to show decentralized service where Ticket Graph users could buy tickets and event organizers could sell them. When user buys ticket his/her Ethereum address appears in the list of participants and if user has installed Ethereum wallet in mobile devices noting more to enter needed.
- Julia as a professional event organiser posted an event to system Graph Tickets about her Jazz concert, setting up location, date, price and quantity of tickets.
- John entered the site, chooses his location and found interesting events around him with additional information.
- John decided to buy a ticket. He simply press "Buy a ticket", pay in Ethereum and his address appears in participants list
- At the entrance Julia colleagues used IoT devices connected to The Graph API. This devices simply gets list of participant using one GraphQL request.
- John scanned QR-code by app, create a digital signature in his app and approve that his ethereum address is in the list and go to the concert.
The Graph API provides great opportunity to integrate decentralized systems with IoT devices and as result create new business models.
Smartcontract for this project is very simplified. It has 2 methods only:
Post new event and provide all info:
postEvent(string memory _title, string memory _location, uint256 _date, string memory _imageUrl, uint32 _price, uint32 _qty) public
Buy tickets by sending money to smartcontract and event id.
function buyTicket(uint event_id) public payable
To syncronize whole data between smartcontract data & end users via The Graph two @entities were created. TicketEvent is collcted all information about events and avaible tickets, Ticket schema is used to store information about users who bought tickets.
The Graph technology is used for searching through Events to provided selections based on user location, date and avaible tickets. Third-part services could use GraphQL requests to manage this data simply. I use Graph to filter Tickets by event id to show list of tickets buyers.
type TicketEvent @entity {
id: ID!
title: String!
location: String!
date: Int!
imageUrl: String!
price: Int!
qty: Int!
owner: Bytes!
}
type Ticket @entity {
id: ID!
event_id: Int!
buyer: Bytes!
}
The Graph helps to provide API for smartcontract for third-patry services and IoT devices to check list of buyers and events.
This project was created during hackathon from scratch including:
- Idea generation
- Writing and teswting smart contract
- Front end application development
- Deploying to Graph & Ropsten network & Heroku
Working version is on https://ticket-graph.herokuapp.com/ (it could take up to 30 seconds sometimes cause project deployed on free heroku dyno)
- Finish searching bar for events
- Provide function to withdraw money for organisers
- Provide multiple ticket buying by one operation
- Add automated testing for smartcontract
- Add ratings to organisers
- Develop recommendation system based on The Graph technology which organisers are trusted ones
- Add addtional fields like genre and etc.
- Add a featture to publish description and other info to IPFS.
Thanks for Graph & CoinList for this opportunity!

