-
Notifications
You must be signed in to change notification settings - Fork 0
Run‐Guide Before Running the Project 🚀
In order to run the project successfully, some configurations need to be set up first. Follow the steps below to configure the project.
-
Navigate to the
.envfile in the project root directory. (if not found, create it) - You should see a configuration that looks similar to the following:
# Tunnel configuration for webhook
TUNNEL_HOST="9657cfb8becc1e051dc626c659d020a7.serveo.net" # replace with your tunnel address
TUNNEL_HOST_IP="138.68.79.95" # replace with your tunnel IP address
# Tito API Configuration
TITO_API_BASE="https://api.tito.io/v3" # leave as-is
TITO_ACCOUNT_SLUG="hagar-usama" # replace with your account slug
TITO_EVENT_SLUG="delta-spectres" # replace with your event slug
# Tito Webhook Configuration
TITO_WEBHOOK_SECRET="susxWOaiWxt4iQcFphPhNa" # replace with your webhook secret
TITO_TOKEN="secret_test_yMie7JQ74JNcmyyRjfKj" # replace with your token secret
# Mailer Configuration for email verification
MAILER_EMAIL="example@gmail.com" # replace with your mail (should be gmail)
GMAIL_APP_KEY="pelo ugrc yrwu qsig" # replace with your gmail app key
# Postgres Configuration
QUICKET_DATABASE_NAME="quicket_development" # leave as-is
QUICKET_DATABASE_USERNAME="postgres" # leave as-is
QUICKET_DATABASE_PASSWORD="password123" # leave as-isTo establish a connection with Tito's webhook, you will need a public address instead of using localhost. You can use ngrok or another suitable service. In this guide, we are using serveo.net.
-
Generate the Tunnel Address:
- Refer to the Tunneling Guide to generate the forwarding address using
serveo.net.
- Refer to the Tunneling Guide to generate the forwarding address using
-
Assign the Tunnel Address:
- Once you have the address, assign it to the
TUNNEL_HOSTvariable in the.envfile. -
Note: Make sure to remove the
https://prefix from the address.
Example:
TUNNEL_HOST="9657cfb8becc1e051dc626c659d020a7.serveo.net" - Once you have the address, assign it to the
-
Get the Tunnel IP Address:
- Open your terminal and run the following command to find the IP address of your tunnel:
nslookup <TUNNEL_HOST>
- Replace
<TUNNEL_HOST>with the actual tunnel host you generated. - Copy the resulting IP address and assign it to the
TUNNEL_HOST_IPvariable in the.envfile.
Example:
TUNNEL_HOST_IP="138.68.79.95" - Open your terminal and run the following command to find the IP address of your tunnel:
Note: You can skip this configuration step for now, as the necessary configuration and credentials will be provided to you.
-
Create a Tito Account:
- If you don't already have a Tito account, create one here.
- During account creation, you will be asked to select an account name. This will be your
TITO_ACCOUNT_SLUG, so make sure to choose it carefully.
-
Create an Event:
- Once your account is set up, you can create an event on Tito.
- Assign the event's name to the
TITO_EVENT_SLUGin your.envfile.
-
Event Configuration:
- After creating the event, make sure to configure it as needed for your project.
- Ensure that all tickets are marked as free and test data is enabled, allowing you to test the event thoroughly before going live.
-
Reference Documentation:
- For more detailed steps on getting started with Tito, refer to their official guide:
Getting Started with Tito
- For more detailed steps on getting started with Tito, refer to their official guide:
To configure the Tito webhook, follow these steps:
-
Go to the Tito Webhook Settings:
- Visit the following URL to access your webhook settings:
https://dashboard.tito.io/<account-slug>/<event-slug>/settings/webhook_endpoints/
- Visit the following URL to access your webhook settings:
-
Copy the Security Token:
- On the page, you’ll see a section titled "Your security token is ...".
- Copy the security token and assign it to the
TITO_WEBHOOK_SECRETin your.envfile.
-
Create or Edit a Webhook:
- To add a new webhook, click the
New Webhookbutton. - Alternatively, if the
TUNNEL_HOSThas changed, you can edit an existing webhook.
- To add a new webhook, click the
-
Set the Webhook URL:
- In the URL field, set it to
https://<tunneling-url>/webhooks/tito(replace<tunneling-url>with the one provided by your tunneling service).
- In the URL field, set it to
-
Select the Trigger Events:
- Choose the following trigger events:
ticket.createdticket.updated
- Choose the following trigger events:
-
Save Your Changes.
This configuration allows the app to send confirmation emails for newly registered users. Follow the steps below to set it up:
-
Assign Your Gmail for Email Confirmation:
- In the
.envfile, assign the Gmail address you want to use for sending confirmation emails to theMAILER_EMAILvariable.MAILER_EMAIL="example@gmail.com" # replace with your Gmail
- In the
-
Create a Gmail App Password:
- To securely connect the app to Gmail, you need to generate an App Password for the Gmail account you assigned to
MAILER_EMAIL. -
Note: Two-Factor Authentication (2FA) must be enabled on your Google account in order to generate an app password. If 2FA is not enabled, you will not be able to proceed.
- To enable 2FA, go to Google Account Security Settings and enable 2-Step Verification.
- Once 2FA is enabled, follow these steps:
- Visit Google App Passwords.
- Sign in with your Gmail account.
- Select App and choose Other (Custom name) from the dropdown.
- Enter a name (e.g.,
Quicket) and click Generate. - You will receive a 16-character app password.
- To securely connect the app to Gmail, you need to generate an App Password for the Gmail account you assigned to
-
Assign the Generated App Password:
- Copy the generated app password and assign it to the
GMAIL_APP_KEYvariable in your.envfile.GMAIL_APP_KEY="pelo ugrc yrwu qsig" # replace with your Gmail app password
- Copy the generated app password and assign it to the
Now, All Configurations Are Done! 🎉🎉