Create an Event Booker
Overview
Welcome to the Event Booker example, a simple booking app for events or appointments. The underlying structure can be adapted for Web3 integration, allowing you to extend the app's functionality such as using tokens to pay booking fees for exclusive events. Here’s how the app works:
Launch the app to book an event or appointment.
Fill in the details of the event or appointment.
Confirm and submit your booking details.
Steps
Ready to create your own booking app? Follow these steps:
1. Define the structure
Open the input.json file in a text editor, then add the journey definition:
{
"id": "jn-event-booker",
"icon": "https://i.ibb.co/7N134gb/booking.png",
"name": "Book an Event",
"description": "Book an Event",
"status": "Active",
"start_card_ref_id": "cd-book-an-event",
"roles": [
"rl-member"
],
"journey_type": "STANDARD_JOURNEY"
}Define the included cards:
Define the included events:
Define the included event handlers:
2. Create the card definitions
Create the definitions for the start card: cd-book-an-event.json and the next card: cd-set-booking-details.json.
3. Create the event definitions
Create the definition for the event to navigate from start card to the next card: e-w-navig-to-details.json.
Create the definition for the submit event that contains the data for the booking details: e-w-broad-shareAppt.json.
Create the definition for the next navigation event after submitting details: e-w-navig-to-book-1.json.
4. Create the event handler definitions
Create the event handler definition for the navigation event with booking details: eh-w-navig-to-details.json.
Create the event handler definition for saving data to the BOOKING_DETAILS collection: eh-h-e-w-broad-shareAppt.json. This node event handler also appends attributes to the payload.
Create the event handler definition for the navigation event after submitting booking details: eh-w-navig-to-book-1.json. The booking details are fetched from the data collection: td/td-BOOKING_DETAILS.
Last updated
Was this helpful?