Introduction to Fanfare
Fanfare is a SaaS platform that helps e-commerce businesses manage high-demand product launches through virtual waiting rooms, queues, draws, auctions, and timed releases. When you have more demand than supply, Fanfare ensures a fair, engaging experience for your customers while protecting your infrastructure from traffic spikes.What Problems Does Fanfare Solve?
Traffic Management
When you launch a limited-edition product or run a flash sale, thousands of visitors can hit your site simultaneously. Without proper management, this leads to:- Server crashes and downtime
- Frustrated customers who cannot complete purchases
- Unfair advantages for users with faster connections or bots
Fair Access
Traditional “first-come-first-served” systems disadvantage users with slower internet connections or those who arrive a few seconds late. Fanfare offers multiple distribution mechanisms:- Queues: First-in-first-out with estimated wait times
- Draws: Random selection giving everyone an equal chance
- Auctions: Price-based allocation for high-value items
- Timed Releases: Scheduled access windows for product drops
Customer Experience
Instead of showing error pages or loading spinners, Fanfare provides a polished waiting experience with:- Real-time position updates
- Estimated wait times
- Interactive elements to keep users engaged
- Automatic notification when admitted
Key Concepts
Before diving into the SDK, you need to understand these core concepts:Organization
Your Fanfare account is an organization. All experiences, consumers, and API keys belong to your organization. You receive anorganizationId when you sign up.
Experience
An experience is a customer-facing event that manages access to your product or service. For example, “Summer Sneaker Drop 2025” or “Concert Ticket Sale”. Each experience contains one or more sequences.Sequence
A sequence defines the rules for a group of consumers within an experience. You can have:- A general admission sequence for all visitors
- A VIP sequence requiring an access code
- An audience-specific sequence for newsletter subscribers
Distribution
A distribution is the mechanism that allocates access within a sequence. Distribution types include:| Type | Description | Best For |
|---|---|---|
| Queue | First-in-first-out waiting line | Flash sales, product launches |
| Draw | Random selection from entrants | Fair allocation, limited drops |
| Auction | Highest bidder wins | High-value items, collectibles |
| Timed Release | Opens at a specific time | Pre-orders, scheduled releases |
Consumer
A consumer is a visitor participating in your experience. Consumers can be:- Guests: Anonymous users identified by device fingerprint
- Authenticated: Users who verify via email, phone, or your existing auth system
Admission
When a consumer gains access through a distribution (reaches the front of a queue, wins a draw, etc.), they receive an admission token. Your backend validates this token to authorize the purchase.How the SDK Works
The Fanfare SDK runs in your customer’s browser and handles:- Session Management: Creating and restoring consumer sessions across page refreshes and tabs
- Experience Entry: Joining queues, draws, auctions, or timed releases
- Real-time Updates: Receiving position changes, admission notifications, and auction updates
- State Synchronization: Keeping multiple browser tabs in sync
- UI Components: Pre-built widgets you can customize or build from scratch
Architecture Overview
- Your frontend loads the Fanfare SDK
- The SDK manages the consumer’s journey through experiences
- When admitted, the SDK provides a token
- Your backend validates the token with Fanfare’s API
- Your backend completes the transaction
Framework Support
Fanfare provides official SDK packages for:| Package | Framework | Description |
|---|---|---|
@fanfare/sdk | Vanilla JS | Core SDK, framework-agnostic |
@fanfare/react | React 18+ | React hooks and components |
@fanfare/solid | SolidJS | Solid primitives and components |
What You Need
To integrate Fanfare, you need:- A Fanfare account: Sign up at fanfare.io
- API credentials: Your
organizationIdandpublishableKeyfrom the dashboard - An experience: Create at least one experience in the dashboard
- Frontend integration: Install the SDK in your website
Next Steps
Ready to get started? Continue to the Quickstart Guide to build your first integration in 5 minutes. Or explore more detailed topics:- Installation - Package installation for your framework
- Configuration - Provider setup and options
- First Experience - Create your first queue, draw, or auction