Appearance
Master Class module overview
What are Master Classes?
At a high level, Master Classes are live events facilitated by a speaker, typically a well-known figure in the design industry. These events are organized on a webinar platform and are recorded for later viewing. Unlike courses, which can be considered the flagship product offered by IxDF, Master Classes provide a different type of learning experience in a more condensed video format.
Master Classes vs. Masterclasses
To simplify things, a decision has been made to always refer to Master Classes as a single word in the codebase:
php
\App\Modules\Masterclass\Models\Masterclass // GOOD
$registration->masterclass // GOOD
MasterclassFactory::new() // GOOD
\App\Modules\Masterclass\Models\MasterClass // BAD
$registration->masterClass // BAD
MasterClassFactory::new() // BADSpeaker and Attendee
A speaker is represented by the Speaker model. A single Master Class can be associated with multiple speakers. An Attendee is simply a contract. Any entity that implements the Attendee contract can attend Master Classes. Currently, there are two types of attendees:
- Members
- Paying Guests
Once an attendee registers for a Master Class, a Registration is created.
Masterclass Brand Logos
Masterclasses can be associated with brands through the brand_slug property. This association enables:
- Display of brand logos on masterclass cards throughout the platform (companies, books, and similar brand identities)
- Organization of masterclasses by brand affiliation
- Visual context about the masterclass's origin or affiliation
Where Brand Logos Are Used
Brand logos are displayed on masterclass cards to provide visual context. When a masterclass has a brand_slug set, the getBrandLogoRelativeUrl() method constructs the path to retrieve the corresponding logo:
php
// Returns: resources/img/not-indexed/brands/masterclass/{brand_slug}.svg (for companies)
// Returns: resources/img/not-indexed/brands/masterclass/{brand_slug}.webp (for books)
$masterclass->getBrandLogoRelativeUrl();Adding New Brand Logos
Brand logos are defined in the config/ixdf_masterclass.php configuration file and require a corresponding logo image file. Currently, only Developers can add new brands. Follow these steps:
- Add the brand entry to the appropriate group (
companies,books, etc.) inconfig/ixdf_masterclass.php:
php
'brands' => [
'companies' => [
// Existing companies
'new-company' => 'New Company Display Name',
],
'books' => [
// Existing book authors
'book-new-author' => 'New Author Display Name',
],
],This new brand will be available for selection in the Nova admin panel when creating or editing a masterclass (rendered under the proper option group).
- Place the brand logo file in
resources/img/not-indexed/brands/masterclass/directory. The filename must match the brand slug:- For company brands: Use SVG format (e.g.,
adobe.svgfor theadobebrand slug) - For book brands: Use WebP format (e.g.,
book-hooked-how-to-build-habit-forming-products.webpfor thebook-hooked-how-to-build-habit-forming-productsbrand slug)
- For company brands: Use SVG format (e.g.,
Note: Book brand logos must be WebP images simply because they are typically more complex images (book covers) and WebP provides better compression without significant quality loss.
Current Implementation & Future Considerations
Current approach: The config-based approach requires developers to:
- Add new brand entries to the config file
- Upload corresponding brand logos to the appropriate directory
While this works well for infrequent changes and avoids logo duplication, it creates a dependency on developers for adding new brands.
Alternative approach being considered: Instead of maintaining a config array, we could store the S3 logo path directly in the database (e.g., brand_logo_path field) and have Nova fetch available brand logos from S3. This would give the Editorial Team more autonomy to add brands without developer involvement.
Decision: We're keeping the current implementation to gather real-world feedback from the Editorial Team. If this becomes too bureaucratic or creates workflow bottlenecks, we can refactor to a more flexible S3-based solution.
For full context, see the discussion in PR #26489.
Master Class Registrations
There can be only one registration per attendee for a single Master Class. This rule is enforced on the database level using a unique constraint on the masterclass_id, attendee_type and attendee_id columns. When creating a Registration it is recommended to use makeOrRecover method:
php
$registration = Registration::makeOrRecover($masterclass, $attendee);Whenever a Registration is created or restored, a RegisterForWebinarJob is dispatched. Similarly, whenever a Registration is deleted, a UnregisterForWebinarJob is dispatched. The jobs are responsible for syncing the registration state with the external webinar platform.
Master Class Categories
Master Classes can be grouped into categories for better presentation. The MasterclassCategory model represents these categories. Master Classes without a specific category land in the “Miscellaneous” category. The MasterclassCollection offers a convenient method to group Master Classes by category:
php
$upcomingMasterclassesGroupedByCategory = Masterclass::query()
->upcoming()
->get()
->groupByCategory()Relationships
The following diagram shows the relationships between Masterclass and other models:
Master Class Publication Status
A Master Class is is published if the published_at timestamp is not null and it is not in the future. Only published Master Classes are made searchable. See MasterclassSearchIndex for more details.
php
$masterclass->isPublished() // Returns booleanMaster Class Live Status
Each Master Class has a live status. It is either Upcoming, On air or Finished. To determine the live status of a Master Class, we make use of start_at and finish_at timestamps. The status tells us if the Master Class already happened, is happening now, or is scheduled for the future. It doesn’t tell us if the Master Class is available for watching “on demand” as for that purpose we have a dedicated released_on_demand_at timestamp.
There are a few methods on the Masterclass model that help to get the current live status of a Master Class:
php
$masterclass->isUpcoming() // Returns boolean
$masterclass->isOnAir() // Returns boolean
$masterclass->isFinished() // Returns boolean
$masterclass->getLiveStatus() // Returns \App\Modules\Masterclass\Models\Enums\LiveStatus enum caseAdditionally, there are two scopes that help to build queries: upcoming scope and finished scope.
On Demand Master Classes
Master Classes happen live. Shortly after the live event, recordings of the Master Classes are made available to people who wish to watch them. Before a recording is published on the platform, it must be edited and transcoded to ensure it is suitable for “on demand” viewing. For this reason, there is a slight delay before the recording of a finished Master Class is released.
The released_on_demand_at timestamp tells us when the recording of a Master Class has been released.
Master Class Lifecycle
The following diagram shows the full lifecycle of a Master Class:
Master Class Pricing
Master Class pricing varies depending on the type of attendee. For members, Master Classes are available at much more attractive prices compared to paying guests ($5 vs. $50).
For this reason, the Registration model implements the ProductUsageActivityProvider contract. When a member registers for a Master Class at a deeply discounted price, it is recorded as a product usage activity. This information can be used in the event of a dispute.
Master Class Certificates
Similarly to courses, attendees receive certificates for attending Master Classes. Master Class certificates are generated daily. The masterclass:generate-certificates scheduled command simply loops through all Master Classes finished the previous day, finds all relevant registrations and generates certificates for them.
php
$registration->registerCertificate()It also notifies the attendees using the CertificateGenerated notification.
The only other way a Master Class certificate can be generated is when someone purchases an “on demand” Master Class. In that case the certificate is generated immediately since the Master Class is already finished at the time of purchase.
How do we know if a certificate has been generated for a particular Master Class registration? The certificate_slug and certificate_generated_at timestamp are not null.
Webinars platform integrations
By design, Masterclasses can be hosted on different webinar platforms. Currently, we only support Zoom. For an integration with a new platform, you need to implement \App\Modules\Masterclass\Services\WebinarIntegration interface. There is also a NullWebinar integration that can be used for testing purposes.
Zoom Webinar Integration
Null Webinar Integration
Apart from Zoom webinar integration, we also have a NullWebinar integration that can be enabled by setting WEBINAR_INTEGRATION env variable to “null_webinar” instead of “zoom”. This dummy integration is useful for testing purposes.