Inspiration
Ticket scalping is a big problem in the events market. The secondary ticketing market is worth $15 billion, and the most disturbing fact is that artists, venues, event managers see none of this revenues, as ticket scalpers make a killing. In fact, the same market is said to grow to $68 billion. Many companies are even in breach of anti-trust laws but no one notices because the market isn't regulated. This lead to the birth of Debook - a decentralized ticketing platform on the NEAR blockchain. Debook stores all data, text and files on the blockchain in a decentralized manner.
Source: https://bigthink.com/neuropsych/scalping/
What it does
Debook uses the power of blockchain to auto-regulate ticket sales. As an event manager, you can host an event by entering vital details for the event such as event name, event location, number of tickets, cost of each ticket etc. After adding these details the event manager may publish the event. Now the event is accessible and anyone can buy tickets to the event. As a customer, you may buy tickets from your favourite events by simply logging in to Debook, through your NEAR wallet. After that, all one needs to do is click on "buy" to purchase a ticket and confirm payment through cryptocurrency. The ticket will then be visible under "My Tickets" and when the customer needs to attend the event, they can show the QR code attached with each ticket, and attend the event. It's that easy!
How we built it
We used the following technologies to build Debook:
React.js: React.js was a no-brainer for us to choose since all of our teammates have experience in building React.js applications and the NEAR documentation had great support for React.js so it made the development experience very easy too. On top of that, React.js is very fast and efficient, so our end result was also fast and efficient.
IPFS: Since we were building a decentralized application, we had to store the static assets to IPFS, albeit it was just a single image, but we felt that the core of our application was the decentralization of ticket sales, hence we used the infura IPFS gateway to store and query IPFS files.
AssemblyScript: There are two main ways to work with NEAR, one is with Rust and the other is AssemblyScript. We chose AssemblyScript because our team had prior JavaScript/TypeScript experience but also because for our use case AssemblyScript made quite a lot of sense. The NEAR docs again, had amazing documentation regarding AssemblyScript and building and deploying smart contracts with AssemblyScript.
Next.JS: As said before, our application had to be fast and we wanted performance, so we went with Next.JS, which is a framework for building React.js applications. Next.JS had quite a lot of features including custom serverless API routes which was important for our use case since we had some issues with CORS.
Challenges we ran into
We did not run into many challenges at first, but towards the end, our main challenge was integrating crypto payments into our application. Since the API docs for our payments provider was not very clear, we had to do a lot of trial and error to get it right and integrate complete crypto payments using DAI, a stablecoin which is equal to one dollar.
Accomplishments that we're proud of
We are proud of multiple things. Firstly, we are proud of being able to create an entire application from scratch within the given time limit. Secondly, we are proud of integrating payments on the mainnet through crypto, which is a big achievement for us since crypto payments are not too popular as of yet. Thirdly, we are proud of building an application on a technology we were previously unfamiliar with, i.e. NEAR blockchain. Reading documentation, going through examples and all has been an amazing experience for us as developers, and is an achievement for us.
What we learned
It was a great learning experience for us because it was the first we used AssemblyScript and NEAR. Plus, building an entire production ready application from scratch itself, was pretty amazing. It was also the first time any of us integrated crypto-based payments. We also gained experience using IPFS and Infura gateway.
What's next for Debook
In the future, we would like to extend some core functionality to include direct p2p payments, so the customer directly sends crypto to the event manager's ethereum address. We also want to add sorting and searching events, so customers can easily find their favourite events without any hassle. To ensure that events posted by managers aren't fraud or NSFW, we want to implement a community-based reporting feature which hides/demotes events that have been reported highly by the community.
Built With
- assemblyscript
- ethereum
- ipfs
- javascript
- near
- next.js
- typescript
- wasm


Log in or sign up for Devpost to join the conversation.