amariahak/atlarix-skills/acr-beefreesdk-nocode-content-editor-cursorrules-prompt-file

Claude Code and agent skill by amariahak/atlarix-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Install

npx vskill@latest install amariahak/atlarix-skills/acr-beefreesdk-nocode-content-editor-cursorrules-prompt-file

SKILL.md

The same SKILL.md was published earlier as amariahak/atlarix-skills/acr-beefreesdk-nocode-content-editor-cursorrules-prompt-file.

Cursor rules for embedding Beefree SDK's no-code content editors (for emails, pa

When to use this skill

Cursor rules for embedding Beefree SDK's no-code content editors (for emails, pages, and popups) into a web application.

Source

Synced from https://github.com/PatrickJS/awesome-cursorrules/tree/main/rules/beefreeSDK-nocode-content-editor-cursorrules-prompt-file.mdc.

Beefree SDK Guidelines

Guidelines and best practices for building applications with Beefree SDK, including installation, authentication, configuration, customization, and template management.

Installation Guidelines

Package Installation
  • Install the Beefree SDK package using npm or yarn:

``bash npm install @beefree.io/sdk # or yarn add @beefree.io/sdk ``

Dependencies
  • Beefree SDK requires the following core dependencies:

``json { "dependencies": { "@beefree.io/sdk": "^9.0.2-fix-optional-url-config.0", "axios": "^1.10.0", "express": "^5.1.0", "cors": "^2.8.5", "dotenv": "^17.2.0" } } ``

Environment Setup
  • Create a .env file in your project root with your Beefree credentials:

``env BEE_CLIENT_ID=your_client_id_here BEE_CLIENT_SECRET=your_client_secret_here ``

Authentication Guidelines

Proxy Server Setup
  • ALWAYS use a proxy server for authentication to protect your credentials
  • Create a proxy server file (e.g., proxy-server.js) to handle authentication:

```javascript import express from 'express'; import cors from 'cors'; import axios from 'axios'; import dotenv from 'dotenv';

dotenv.config();

const app = express(); const PORT = 3001;

app.use(cors()); app.use(express.json());

const BEE_CLIENT_ID = process.env.BEE_CLIENT_ID; const BEE_CLIENT_SECRET = process.env.BEE_CLIENT_SECRET;

// V2 Auth Endpoint app.post('/proxy/bee-auth', async (req, res) => { try { const { uid } = req.body;

const response = await axios.post( 'https://auth.getbee.io/loginV2', { client_id: BEE_CLIENT_ID, client_secret: BEE_CLIENT_SECRET, uid: uid || 'demo-user' }, { headers: { 'Content-Type': 'application/json' } } );

res.json(response.data); } catch (error) { console.error('Auth error:', error.message); res.status(500).json({ error: 'Failed to authenticate' }); } });

app.listen(PORT, () => { console.log(Proxy server running on http://localhost:${PORT}); }); ```

Authentication Process
  • Use the V2 authentication endpoint: https://auth.getbee.io/loginV2
  • Pass the ENTIRE API response to the Beefree SDK, not just the token
  • Example authentication call:

``typescript const token = await fetch('http://localhost:3001/proxy/bee-auth', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ uid: 'demo-user' }) }).then(res => res.json()); ``

Container Setup Guidelines

HTML Container
  • Create a dedicated container element for the Beefree SDK:

``html <div id="beefree-sdk-container"></div> ``

CSS Styling
  • Style the container to ensure proper display:

``css #beefree-sdk-container { position: absolute; top: 0px; bottom: 0px; left: 0px; right: 0px; height: 600px; width: 90%; margin: 20px auto; border: 1px solid #ddd; border-radius: 8px; } ``

React Container
  • For React applications, the following code snippet shows an example using refs to manage the container:

```typescript const containerRef = useRef<HTMLDivElement>(null);

return ( <div id="beefree-react-demo" ref={containerRef} style={{ height: '600px', width: '90%', margin: '20px auto', border: '1px solid #ddd', borderRadius: '8px' }} /> ); ```

Configuration Guidelines

Required Configuration Parameters
  • ALWAYS include the container parameter in your configuration:

``typescript const beeConfig = { container: 'beefree-sdk-container', // Required language: 'en-US' }; ``

Optional Configuration Parameters
  • Customize your SDK with optional parameters:

``typescript const beeConfig = { container: 'beefree-sdk-container', // Required language: 'en-US', specialLinks: [ { type: "unsubscribe", label: "Unsubscribe", link: "http://[unsubscribe]/", }, { type: "subscribe", label: "Subscribe", link: "http://[subscribe]/", }, ], mergeTags: [ { name: "First Name", value: "[first_name]", }, { name: "Last Name", value: "[last_name]", }, { name: "Email", value: "[email]", }, ] }; ``

Callback Functions
  • Implement essential callback functions for proper functionality:

``typescript const beeConfig = { container: 'beefree-sdk-container', onSave: function (jsonFile, htmlFile) { console.log("Template saved:", jsonFile); // Implement custom save logic here }, onAutoSave: function (jsonFile) { console.log("Auto-saving template..."); localStorage.setItem("email.autosave", jsonFile); }, onSend: function (htmlFile) { console.log("Email ready to send:", htmlFile); // Implement custom send logic here }, onError: function (errorMessage) { console.error("Beefree SDK error:", errorMessage); // Handle errors appropriately } }; ``

SDK Initialization Guidelines

Basic Initialization
  • Initialize the Beefree SDK with proper error handling:

``typescript async function initializeBeefree(authResponse) { try { const bee = new BeefreeSDK(authResponse); bee.start(beeConfig, {}); console.log('Beefree SDK initialized successfully'); } catch (error) { console.error('Failed to initialize Beefree SDK:', error); } } ``

React Integration
  • For React applications, the following code snippet shows an example using useEffect for initialization:

```typescript useEffect(() => { async function initializeEditor() { const beeConfig = { container: 'beefree-react-demo', language: 'en-US', onSave: (pageJson: string, pageHtml: string, ampHtml: string | null, templateVersion: number, language: string | null) => { console.log('Saved!', { pageJson, pageHtml, ampHtml, templateVersion, language }); }, onError: (error: unknown) => { console.error('Error:', error); } };

const token = await fetch('http://localhost:3001/proxy/bee-auth', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ uid: 'demo-user' }) }).then(res => res.json());

const bee = new BeefreeSDK(token); bee.start(beeConfig, {}); }

initializeEditor(); }, []); ```

Template Loading Guidelines

Loading Templates
  • Use the start() method with template data to load existing templates:

```typescript // Load template from localStorage const selectedTemplate = JSON.parse(localStorage.getItem('currentEmailData'));

if (selectedTemplate) { beefreeSDKInstance.start(selectedTemplate); console.log('Loaded template from localStorage'); } else { // Start with empty template beefreeSDKInstance.start(); console.log('Started with empty template'); } ```

Template Storage
  • Store templates in localStorage for persistence while testing:

```typescript // Save template data localStorage.setItem('currentEmailData', JSON.stringify(templateData)); localStorage.setItem('currentEmailName', emailName);

// Load template data const emailData = localStorage.getItem('currentEmailData'); const emailName = localStorage.getItem('currentEmailName'); ```

Autosave Functionality
  • Implement autosave to prevent data loss:

``typescript onAutoSave: function (jsonFile) { console.log("Auto-saving template..."); localStorage.setItem("email.autosave", jsonFile); } ``

HTML Import Guidelines

HTML Importer API
  • Use the HTML Importer API to convert existing HTML templates to Beefree SDK format
  • API endpoint: https://api.getbee.io/v1/conversion/html-to-json
  • Reference: HTML Importer API Documentation
Import Process
  • Convert HTML templates to Beefree SDK's native JSON format:

``javascript const response = await fetch('https://api.getbee.io/v1/conversion/html-to-json', { method: 'POST', headers: { "Authorization": "Bearer Enter Dev Console API Key as Bearer token", "Content-Type": "text/html" }, body: "<!DOCTYPE html><html><body><h1>Hello World</h1></body></html>" }); const data = await response.json(); ``

Loading Imported Templates
  • Load imported templates into the Beefree SDK:

``typescript const importedTemplate = await importHtmlTemplate(htmlContent); beefreeSDK.start(importedTemplate); ``

Error Handling Guidelines

onError Callback
  • ALWAYS implement the onError callback to handle SDK errors:

``typescript onError: function (errorMessage) { console.error("Beefree SDK error:", errorMessage); // Display user-friendly error message document.getElementById('beefree-sdk-container').innerHTML = '<div class="error">Error loading Beefree SDK: ' + errorMessage.message + '</div>'; } ``

Authentication Error Handling
  • Handle authentication failures gracefully:

``typescript function getBeeToken(callback) { fetch('/api/beefree/auth', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ uid: beeConfig.uid }) }) .then(response => { if (!response.ok) throw new Error('Auth failed: ' + response.status); return response.json(); }) .then(data => { callback(data); }) .catch(error => { console.error('Error getting Beefree token:', error); document.getElementById('beefree-sdk-container').innerHTML = '<div class="error">Failed to authenticate with Beefree. Please check your credentials and try again.</div>'; }); } ``

Template Change Tracking Guidelines

Track Message Changes
Change Detection
  • Use the onChange callback to track template changes:

``typescript onChange: function (jsonFile, response) { console.log('json', jsonFile); console.log('response', response); }, ``

Customization Guidelines

UI Customization

Customize the Beefree SDK appearance with:

Language Customization
  • Set the language for internationalization:

``typescript const beeConfig = { container: 'beefree-sdk-container', language: 'en-US', // or 'es-ES', 'fr-FR', etc. }; ``

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
2
7-day trend score
10

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/amariahak/atlarix-skills/acr-beefreesdk-nocode-content-editor-cursorrules-prompt-file/badge)](https://verified-skill.com/skills/amariahak/atlarix-skills/acr-beefreesdk-nocode-content-editor-cursorrules-prompt-file)

Something wrong with this skill or its page? Tell us.