Skip to content

📝 Quicket Structure and Overview

Hagar Usama edited this page Dec 7, 2024 · 1 revision

Overview

Quicket is an event admission system built with Ruby on Rails. It integrates with the Tito API to manage and fetch tickets, providing both admin and regular users with specific access to event data. Users can register, log in, and manage their tickets, while administrators have full control over ticket data.

🏗️ Application Structure

Quicket is configured in a Docker environment, containing:

  • Postgres Service: Stores user and ticket data.
  • Rails Service: The core application handling API calls, user interactions, and background jobs.

The app follows standard Rails architecture, with components such as:

  • Controllers: Handle requests and manage data flow.
  • Services: Encapsulate business logic, like API interactions.
  • Models: Define data structures and relationships (e.g., User and Ticket models).

🧩 Key Components

1. Entities

  • Users: Each user can register, log in, and have multiple tickets.
  • Tickets: Retrieved from Tito’s API, tickets are associated with users and updated in specific scenarios.

2. 🎫 Ticket Management & Synchronization

Tickets are automatically updated in three scenarios:

  • Webhook Trigger: When Tito issues a ticket creation or update event.
  • User Registration: Tickets sync upon new user registrations.
  • Scheduled Job: A background scheduler runs every hour and at the start of the server to check for updates.

3. 🔑 User Authentication

The app uses Devise for user management, with email verification required before registration.

4. 👩‍💻 Role-Based Views

  • Admin: Can view and delete all tickets.
  • Regular User: Has access to their own tickets and profile only.

5. 📑 Pagination

Ticket lists are paginated using Kaminari to improve load times and user experience.

6. 🔄 WebSocket (In Progress)

A WebSocket is being implemented to allow views to dynamically update when webhook triggers occur.

🔌 API Integrations

Quicket integrates with the Tito API for ticket data:

  • Base URL: https://api.tito.io/v3
  • Required Parameters: TITO_ACCOUNT_SLUG and TITO_EVENT_SLUG.
  • Credentials: Store the API token and webhook secret in .env.

🖼️ Screenshots

Admin Ticket View

Admin Ticket View

Admin Ticket Details

Admin Ticket Details

User Ticket View

User Ticket View

User Profile View

User Profile View