This repository contains production-ready examples demonstrating how to integrate the Beefree SDK into your applications. Each example is a self-contained project showcasing specific features and use cases.
Beefree SDK is an embeddable no-code builder that gives your end users the freedom to design stunning emails, landing pages, and popupsβwithout writing a single line of code. It's easy to configure, intuitive to personalize, and built to scale with your needs.
- π§ Email Builder: Drag-and-drop email creation with industry best practices
- π Page Builder: Landing page creation tools
- π― Popup Builder: Attention-grabbing popup designer
- π€ AI Features: AI-generated templates and AI Writing Assistant
- π File Manager: Media asset management
- π Template Catalog: Industry best practice templates
- π§ APIs: Comprehensive API suite for customization
Documentation: https://docs.beefree.io/beefree-sdk/
Before running any example, you need:
- Node.js 22+ installed on your machine
- Beefree SDK credentials from the Developer Console
- Client ID
- Client Secret
- Git to clone the repository
| Example | Description | Features | Start Command |
|---|---|---|---|
| π¬ Commenting | Real-time collaborative commenting | Comments, toast notifications, real-time updates | yarn start:commenting |
| π¨ Custom CSS | Dynamic theming and styling | 5 themes, CSS variables, theme switching | yarn start:custom-css |
| πΎ Auto-Save | Template versioning with auto-save | Version control, auto-save, history | yarn start:autosave |
| π PDF Export | Export templates to PDF | PDF generation, multiple formats, progress tracking | yarn start:template-pdf |
Real-time commenting system with toast notifications for collaborative editing.
- Real-time commenting on template elements
- Toast notifications for comment updates
- User mentions and replies
- Comment threading
- Collaborative editing experience
Before running, make sure to:
- Check your plan in the Beefree Developer Console: The commenting feature is available on Core, SuperPowers, and Enterprise plans. It is not available on Free and Essentials plans.
- Add your Beefree SDK credentials to the
secure-auth-example/.envfile:
BEEFREE_CLIENT_ID=your_client_id_here
BEEFREE_CLIENT_SECRET=your_client_secret_here
PORT=3000- Enable commenting in your Beefree SDK Console:
- Log in to your Beefree developer account
- Click on your application's Details button
- Go to Application > Configure Application
- Scroll down to the Services section and toggle "Commenting" to ON (under Editing & Collaboration)
- Save your changes
To run the example, use the start command from the root of the repository:
yarn start:commentingThis command will automatically install all required dependencies and start both the frontend (port 8081) and the authentication server (port 3000).
You can now open http://localhost:8081 in your browser.
If you didn't get the example to run, take a look at the commenting-example/README.md for more detailed instructions
Dynamic theming system with real-time CSS customization and theme switching.
- 5 pre-built themes (Default, Dark, High Contrast, Coral, Custom)
- Real-time theme switching without page reload
- CSS variable architecture for easy customization
- Theme persistence using localStorage
- Responsive design
To run this example, use the start command from the root of the repository:
yarn start:custom-cssThis command will automatically install all required dependencies and start both the frontend (port 8081) and the authentication server (port 3000).
Before running, make sure to configure your Beefree SDK credentials in secure-auth-example/.env:
BEEFREE_CLIENT_ID=your_client_id_here
BEEFREE_CLIENT_SECRET=your_client_secret_here
PORT=3000Then open http://localhost:8081 in your browser.
Automatic template versioning with save history and version management.
- Automatic template saving at configurable intervals
- Version history with timestamps
- Restore previous versions
- Visual diff between versions
- Save progress indicator
To run this example, use the start command from the root of the repository:
yarn start:autosaveThis command will automatically install all required dependencies and start both the frontend (port 5173) and the authentication server (port 3000).
Before running, make sure to configure your Beefree SDK credentials in secure-auth-example/.env:
BEEFREE_CLIENT_ID=your_client_id_here
BEEFREE_CLIENT_SECRET=your_client_secret_here
PORT=3000You can also optionally configure auto-save settings in auto-save-template-versioning/.env:
VITE_AUTH_PROXY_URL=http://localhost:3000/auth/tokenThen open http://localhost:5173 in your browser.
Export templates to PDF using the Beefree Content Services API.
- Export templates to PDF format
- Multiple export formats (HTML, JSON)
- Progress tracking during export
- Download generated PDFs
- Template preview before export
To run this example, use the start command from the root of the repository:
yarn start:template-pdfThis command will automatically install all required dependencies and start the frontend (port 5174).
Before running, make sure to configure your credentials in template-export-pdf-example/.env:
# Beefree SDK Credentials
BEEFREE_CLIENT_ID=your_client_id_here
BEEFREE_CLIENT_SECRET=your_client_secret_here
# Beefree Content Services API
BEEFREE_CS_API_KEY=your_content_services_api_key_here
BEEFREE_CS_API_URL=https://api.getbee.io
# Server Configuration
PORT=3001
VITE_PORT=5174Note: This example requires the Beefree Content Services API key in addition to the standard SDK credentials. Get this from your Developer Console.
Then open http://localhost:5174 in your browser.
The secure-auth-example folder contains a shared authentication server used by most examples. It provides:
- Enterprise-grade JWT token management
- Automatic token refresh every 5 minutes
- Secure credential storage (backend-only)
- Production-ready error handling
This server must be running for the following examples:
- Commenting Example
- Custom CSS Example
- Auto-Save Template Versioning Example
The root-level start commands automatically start this server for you.
beefree-sdk-examples/
βββ .eslintrc.cjs # Shared ESLint configuration
βββ package.json # Root scripts for starting examples
βββ shared/
β βββ auth.js # Shared authentication module
βββ commenting-example/ # Real-time commenting
βββ custom-css-example/ # Dynamic theming
βββ auto-save-template-versioning/ # Auto-save with versioning
βββ template-export-pdf-example/ # PDF export functionality
βββ secure-auth-example/ # Shared auth server
All examples share a single ESLint configuration for consistent code quality.
ESLint runs automatically in two ways:
- During development: The
startcommands include linting to catch issues early - Before commits: Using Husky with a pre-commit hook and lint-staged, all staged code is automatically linted before being committed, ensuring only quality code enters the repository
- Frontend: React 19+ + TypeScript + Vite
- Backend: TypeScript + Express.js + tsx
- Authentication: JWT tokens with auto-refresh
- Package Manager: yarn or npm (yarn preferred)
If you see "port already in use" errors:
# Check what's using the port
lsof -i :3000 # or :5173, :5174, etc.
# Kill the process
kill -9 <PID>- Verify your
BEEFREE_CLIENT_IDandBEEFREE_CLIENT_SECRETare correct - Check the
.envfile is in the right folder (secure-auth-example/) - Make sure the auth server (port 3000) is running
The start commands automatically install dependencies, but if you encounter issues:
# Reinstall all dependencies
yarn install
cd secure-auth-example && yarn install && cd ..
cd [example-folder] && yarn install && cd ..- Check the console output for the correct port
- Make sure no firewall is blocking the ports
- Try
http://localhost:[port]instead of127.0.0.1
- π Beefree SDK Documentation
- π Developer Console - Get your credentials
- π§ API Reference
- π¬ Community Support
- π₯ Video Tutorials
We welcome contributions! Each example follows these principles:
- β Production-Ready: Comprehensive error handling
- β Type Safety: Full TypeScript implementation
- β Security: Backend-only credentials
- β Documentation: Clear setup instructions
- β Code Quality: ESLint compliant
- β Accessibility: WCAG guidelines
See CONTRIBUTING.md for details.
These examples are provided for educational and development purposes. Please refer to the Beefree SDK Terms of Service for usage guidelines.
π Ready to start? Pick an example above and follow the instructions to get up and running in minutes!