Skip to content

COMMUNITY PLUGINS

Submit Plugin

Learn how to build, test, and submit community plugins for Sidefy.

Development Guide

Plugin Development Guide

Learn how to create powerful plugins for Sidefy using JavaScript and our comprehensive API.

Core Function Structure

function fetchEvents(config) {
    // Your plugin logic here
    return events;  // Return events array
}

Every Sidefy plugin must implement the fetchEvents function that accepts a config parameter and returns an events array.

Event Object Format

{
    title: "Event Title",
    startDate: "2024-01-01T10:00:00Z",
    endDate: "2024-01-01T11:00:00Z",
    color: "#3B82F6",
    isAllDay: false,
    isPointInTime: false,
    notes: "Optional description",
    icon: "https://example.com/icon.png",
    href: "https://example.com",
    imageURL: "https://example.com/image.jpg"
}

Required Fields

  • title — Event title (string)
  • startDate — Start time in ISO8601 format
  • endDate — End time in ISO8601 format (required unless isPointInTime is true)
  • color — Hexadecimal color value
  • isAllDay — Whether it's an all-day event (boolean)
  • isPointInTime — Whether it's a point-in-time event (boolean)

Optional Fields

  • notes — Event description (string)
  • icon — Icon URL (string)
  • href — Click link (supports http://, https://, popup://)
  • imageURL — Image URL (string)

Available APIs

Available APIs

Access powerful functionality through the sidefy object in your plugins.

HTTP Requests

sidefy.http.get(url) sidefy.http.post(url, data)

Local Storage

sidefy.storage.get(key) sidefy.storage.set(key, value) sidefy.storage.clear()

1Mb limit

Date Processing

sidefy.date.parse(dateString) sidefy.date.format(date, format)

AI Features

sidefy.ai.chat(prompt)

Web Crawler

sidefy.crawler(url)

Extract web content using Jina Reader API. Returns {success, title, url, content, description}

Popup Builder

sidefy.popup.build(title, content)

Build a popup:// protocol URL for event href field to display custom content in a popup

App Information

sidefy.app.language()

Returns current language code: 'zh', 'en', 'ja', 'ko', 'de', 'es', 'fr', 'pt', 'ru'

Internationalization

sidefy.i18n(translations)

Automatically select text based on the user's language settings for a better experience:

const greeting = sidefy.i18n({
    "zh": "你好,世界!",
    "en": "Hello, World!",
    "ja": "こんにちは、世界!",
    "ko": "안녕하세요, 세계!",
    "de": "Hallo, Welt!",
    "es": "¡Hola, Mundo!",
    "fr": "Bonjour, le monde!",
    "pt": "Olá, Mundo!",
    "ru": "Привет, мир!"
});

return [{
    title: greeting,
    startDate: sidefy.date.format(Date.now())
}];
  • Returns the translation for the current app language first
  • Falls back to English ("en") if the current language is unavailable
  • Returns the first available value if English is also unavailable

Submission Process

Export and Submission Process

Follow these steps to submit your plugin to the community repository.

Step 1

Develop Your Plugin

Create your plugin using the fetchEvents function and available APIs. Test thoroughly to ensure compatibility.

Test in Sidefy App: Use Sidefy's built-in plugin editor to write and test your plugin code directly within the app. In the plugin management interface, you can edit your code, run it to see event output in real-time, and debug plugin behavior to ensure compatibility with Sidefy.

Step 2

Prepare Documentation

Write clear documentation explaining your plugin's functionality, requirements, and usage instructions.

Export from Sidefy: Use Sidefy's plugin export button to export info.json and main.js files into a directory named after your plugin. This creates the standard plugin structure ready for distribution and submission to the community repository.

Step 3

Submit to GitHub

Create a pull request to the sidefy-plugins repository with your plugin code and documentation.

// Directory name, also the unique plugin ID for the client
your-plugin-name/
    ├── main.js # Plugin code
    ├── info.json # Plugin basic information
    └── README.md # Documentation
Visit sidefy-plugins Repository

Step 4

Review and Merge

Our team will review your plugin for quality, security, and compatibility before merging it into the repository.

FAQ

Frequently Asked Questions

Common questions about plugin development and submission.

What programming languages can I use for plugins?

Plugins are written in JavaScript and run in a sandboxed environment. You can use modern JavaScript features and the provided sidefy APIs.

How long does the review process take?

The review process typically takes 1-3 business days. We thoroughly test each plugin for quality, security, and compatibility.

Can I update my plugin after submission?

Yes, you can submit updates to your plugin at any time through the same GitHub pull request process.