Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️
PHP attendize-alternativedoor-managementevent-check-inevent-managementevent-registrationevent-ticketingeventbrite-alternativeeventslaravelopen-sourcephpreactself-hostedsell-ticketssell-tickets-onlineticket-sellingticketing-systemtickettailor-alternativetito-alternative
paths: - "frontend/src/embed/" - "frontend/public/widget.js" - "frontend/src/widget-test/" - "frontend/src/components/widget/" - "frontend/src/components/common/WidgetEditor/" - "frontend/src/components/layouts/ProductWidget/" - "frontend/src/components/layouts/OrganizerEventsWidget/" - "frontend/src/components/layouts/EventContentWidget/" - "frontend/src/utilites/widget.ts" - "frontend/src/routeLoaders/widgetRouteLoader.ts" - "backend/app//Widget"
Embeddable widget
widget.jsis served from our origin to every live embed, so a change reaches every host page at once. Existing.hievents-widget+data-hievents-*markup must keep rendering as before; new behaviour goes behind new, optional attributes.src/embed/widget.jsis the source andpublic/widget.jsa committed copy (served in dev, copied into the build). Copy it after every change.- Attributes reach the iframe as PascalCase params (
data-hievents-continue-button-text→ContinueButtonText).resolveWidgetConfigmaps them onto the snake_case keys that saved widgets store. Host-pageaff,promo_codeandutm_*are forwarded as-is. - Language: a
data-hievents-localeattribute wins, then a saved widget'slocale(the SSR loader setswidgetLocaleon the request context; the client reads it from the hydrated loader data), then the visitor's language. Old snippets hardcodedata-hievents-locale="en"withdata-hievents-widget-version="1.0"; that pair is ignored. - A saved widget's embed carries only what the host page needs (
HOST_KEYSinWidgetEditor/embedCode.ts); the rest comes from/public/widgets/{short_id}, and attributes override it. The Button type's text, colours and radius are drawn bywidget.jsbefore anything loads, so they live in the embed code; the editor tells users to re-copy the code when a saved widget's embed attributes change. Orders storewidget_idfor stats (seat-picker orders too). Views count anonymous loads, deduped per IP and written in batches (WidgetViewIncrementService), never one UPDATE per load. - Saving a widget looks up every newly sent product, category and date id on the event and returns 422 on a miss. Ids already stored on the widget that have since been deleted are dropped silently, so the widget can still be saved or renamed; when that empties a selection the widget shows all tickets (or any date), and the editor previews this before saving (
savedSettings). - A missing event or organizer sets
notFoundin the loader data; widget components read it fromuseWidgetRuntime()and turn their queries off, so server and client render the same message. - Widget routes report the height of
WidgetFrame's inner wrapper, neverdocument.scrollHeight, so they can shrink. Dialogs inside auto-resized embeds are placed near the click, inside the part of the iframe the visitor can see (measured with anIntersectionObserver), andWidgetFramereports extra height while one is open so the iframe can grow (EmbeddedDialogOffset+embeddedDialogPlacement.ts); Mantine's default sizing uses100dvh, which is the whole content height in an auto-resized iframe. - Widget routes render real content on the server, so any input that appears before hydration must stay disabled until
useIsHydrated()(seeNumberSelector), or the visitor's input is wiped. - The editor preview loads the real widget route with
Preview=trueand pushes settings overpostMessage; preview mode never creates orders. - Widgets run on third-party pages: keep widget routes free of heavy imports, and let the SSR loaders prefetch everything the first paint needs.