FC Extension Pack Specification
Phase 1: FC Extension Packs = a reviewed declarative manifest + card configuration schema + limited layout and interactions (fc.cardType / fc.template / fc.panel / fc.action / fc.connectionType). The platform handles secure rendering, data storage, permission checks and graceful degradation.
⚠ Capabilities shown in this manual such as plugin.register, arbitrary scripts, hooks, storage and notifications are all planned. They are not online and do not mean they can run yet; do not build executable plugins based on them.
✅ Customizable / extendable (presentation layer): everything you can "see" as default presentation on the page — all animations, all card appearances, all menus, theme colors, fonts, backgrounds, buttons, modals, layouts, icons…
❌ Not changeable (core layer): login and registration, data storage, publishing / review logic, business rules, account security and other "core functions and structures" of the platform.
① What is a plugin?
A plugin is a piece of code that adds features to the platform without changing its core. Install one and your micronation gains new cards, themes, backgrounds or tools — like installing an app on your phone.
Plugins connect to the platform's reserved "sockets" (extension points), which keeps things safe and flexible. Writing a plugin = writing a manifest (who you are and what permissions you need) plus code (plugin.js, the logic that does the work).
② Platform overview (which modules plugins can touch)
A plugin is not an isolated gadget: it can plug into these platform modules — each one maps to one or more extension points:
| Platform module | What it is | What plugins can do |
|---|---|---|
| 🌐 Site shell | Left menu, top bar, theme (colors/fonts/corner radius) | Add menu items, change skins, change backgrounds |
| ✏️ FluidCanvas editor | Card canvas editor (card types/edges/fonts/layers/merging) | Register new card types, edges, tools and fonts |
| 📄 Pages | Home/community/messages/activity/articles/subscription and more | Add panels and entry points |
| 👥 Social | Posts/comments/likes/reposts/follows/bookmarks | Subscribe to these events and trigger automatically |
| 📚 Articles | Writing, publishing and reading encyclopedia articles | Hook into publishing |
| 🖼 Gallery | Image upload, tags and search | Read image data (read-only) |
| 👑 Subscription | Four tiers: free/basic/premium/ultra | Set a minTier requirement |
| 🏆 Levels/achievements | User XP, badges and decorations | Read level data (read-only) |
| 🔔 Notifications | In-site notifications and announcements | Send notifications |
In short: everything you can "see" as default presentation (animations, card appearance, menus, buttons, modals, layouts, icons…) can be customized or added; the "invisible" core functions and structures (login, data, business rules…) cannot be changed.
③ Platform entity reference (what maps to what here)
This is the key section — every ID and value used in a plugin maps to a real entity on the platform:
🃏 Card types (cardType) — existing cards; plugins can register new ones for the asset panel
| Card type ID | Name | Default size |
|---|---|---|
flag | Flag card | 8 wide × 5 long |
shield | Coat of arms card | 5 × 5 |
content | Content card | 8 × 4 text block |
text | Text card | Auto |
stats | Stats card | Auto |
sne | SNE index card | Auto |
sheet | Table card | 10 wide × 7 long |
timeline | Timeline card | Auto |
map | Territory map card | Auto |
✂️ Edge themes (edgeTheme) — existing edges; plugins can register new ones
| Edge ID | Name |
|---|---|
paper | Paper |
treasure | Treasure map |
tech | Tech (bevel) |
paint | Paint |
custom:* | Custom edge (AI-generated, e.g. custom:ce-mask1) |
Note: there are 14 built-in edge themes; the table lists the most common ones. Plugins register new edges through the edgeTheme extension point.
👑 Subscription tiers (tier) — the values used for plugin requirements
| Tier ID | Name | Order |
|---|---|---|
free | Free | 0 |
basic | Basic | 1 |
premium | Premium | 2 |
ultra | Ultra | 3 |
📄 Key pages (hosts of page-level extension points)
dashboardoverviewcommunity-hubmessagesactivityfluidcanvasarticlepremium🔤 Fonts (font) — plugins can attach fonts
The platform ships with 451 fonts in 10 language groups (Latin, Chinese, Japanese, Korean, Arabic, Cyrillic and more). Plugins use the ui.theme capability to override font variables or register new font packs.
✨ Animations (animation) — plugins can add opening animations
The platform has built-in page opening and transition animations (transitions.js). Plugins use the ui.animation capability to add or replace custom opening animations and entrance effects.
④ A plugin = two parts
1. manifest (manifest): the plugin's ID card — it tells the platform its name, what it can do and which permissions it needs.
2. Code (plugin.js): the logic that does the real work, connecting to extension points through the capabilities declared in the manifest.
⑤ Complete manifest reference
A manifest is a JSON object. Complete example:
{
"id": "my-weather-card",
"name": "Weather Card",
"version": "1.0.0",
"author": "USR-000101",
"description": "Add a live weather card to the canvas with multi-city switching",
"icon": "⛅",
"preview": "linear-gradient(135deg,#4648d4,#7b7ff0)",
"category": "card",
"capabilities": ["cardType", "ui.menu", "storage"],
"minTier": "premium",
"tags": ["weather", "card"],
"license": "MIT"
}
| Field | Required | Description |
|---|---|---|
id | ✅ | Globally unique identifier: lowercase letters plus hyphens; "author-name" is recommended |
name | ✅ | Plugin display name |
version | ✅ | Version number, semantic |
author | ✅ | Author user ID (USR-xxxx) |
description | ✅ | One-sentence summary |
icon | Optional | Icon (emoji) |
preview | Optional | Preview image (CSS gradient or image URL) |
category | Optional | Category: card / theme / tool / general |
capabilities | ✅ | List of required permissions |
minTier | Optional | Initial subscription requirement; defaults to premium |
tags | Optional | Tag array to make store search easier |
license | Optional | License |
⑥ capabilities explained (capability → exact platform location)
Each capability maps to one or more specific locations on the platform:
| Capability | Where on the platform | What it can do |
|---|---|---|
ui.menu | Left sidebar navigation (12 menu items) | Add / edit / delete menu items |
ui.theme | Site-wide CSS design tokens (--color-* variables) | Override colors, fonts, corner radius and spacing |
ui.background | Page background and canvas background | Change background images and gradients |
ui.animation | Page opening / page transition animations (transitions.js) | Add custom opening animations and entrance effects |
cardType | FluidCanvas editor asset panel | Register new card types |
edgeTheme | Editor edge selector | Register new edge themes |
tool | Editor toolbar, context menu and shortcuts | Add buttons, menu items and shortcuts |
hook | Platform event system | Subscribe to events and run automatically |
storage | Plugin-specific key-value storage | Read and write settings |
notification | In-site notification system | Send notifications |
⚠️ Capability sandbox: plugins can only call capabilities they declared; any other call is blocked by the platform.
⑦ Complete API reference
Plugin code calls the platform API through the global plugin object. Here is the full API (planned; rolled out gradually with the execution engine):
// Register the plugin body (call once per plugin)
plugin.register({
id: 'my-weather-card', // must match manifest.id
cardType: { /* see below */ },
menuItem: { /* see below */ },
edgeTheme: { /* see below */ },
tool: { /* see below */ },
on: { /* event handlers, see section ⑧ */ }
});
// read/write plugin-specific storage (requires the storage capability)
plugin.storage.set('defaultCity', 'Singapore'); // set (keys and values may be strings or JSON)
var city = plugin.storage.get('defaultCity'); // get
plugin.storage.remove('defaultCity'); // remove
// subscribe to events (requires the hook capability)
plugin.on('card.create', function (card) { /* ... */ });
// send an in-site notification (requires the notification capability)
plugin.notify({ title: 'Weather updated', body: 'Singapore is now 32°' });
| API | Signature | Description | Capability needed |
|---|---|---|---|
plugin.register | register(obj) | Register the plugin body | Matching capability |
plugin.storage.set | set(key, value) | Store a key-value pair (isolated by plugin id) | storage |
plugin.storage.get | get(key) | Read a key-value pair | storage |
plugin.storage.remove | remove(key) | Delete a key | storage |
plugin.on | on(event, handler) | Subscribe to an event | hook |
plugin.notify | notify({title, body}) | Send an in-site notification | notification |
⑧ Complete event hook reference
Subscribe to these events to run your code automatically when the corresponding action happens:
| Event | When it fires | Callback parameter |
|---|---|---|
card.create | A new card is created on the canvas | card (card object) |
card.merge | Two cards are merged into a group | group (group object) |
card.delete | A card is deleted | card |
draft.save | A draft is saved | draft |
article.publish | An article is published | article |
comment.create | A comment is posted | comment |
like.create | A like is given | like |
follow.create | A user is followed | follow |
Example: tag cards automatically when they are created —
plugin.on('card.create', function (card) {
card.tags = (card.tags || []).concat(['To sort']);
});
⑨ Complete example
Example A: weather card (new card type + menu)
{
"id": "my-weather-card",
"name": "Weather Card",
"version": "1.0.0",
"author": "USR-000101",
"description": "Add a live weather card to the canvas",
"icon": "⛅",
"capabilities": ["cardType", "ui.menu"],
"minTier": "premium"
}
plugin.register({
id: 'my-weather-card',
cardType: {
id: 'weather',
label: 'Weather Card',
render(data) {
return '<span class="weather-card">' + data.city + ' ' + data.temp + '°</span>';
}
},
menuItem: { title: 'Weather', icon: '⛅', after: 'Map' }
});
Example B: minimal theme (skin + background)
{
"id": "my-minimal-theme",
"name": "Minimal Theme",
"version": "1.0.0",
"author": "USR-000101",
"description": "A cleaner UI palette and canvas background",
"icon": "🎨",
"capabilities": ["ui.theme", "ui.background"],
"minTier": "free"
}
plugin.register({
id: 'my-minimal-theme',
theme: {
'--color-primary': '#7b7ff0',
'--color-background': '#0f2027'
},
background: { canvas: 'linear-gradient(135deg,#0f2027,#2c5364)' }
});
Example C: event hook (auto-archive new cards)
plugin.register({
id: 'my-auto-archive',
on: {
'card.create': function (card) {
card.tags = (card.tags || []).concat(['To sort']);
}
}
});
⑩ Development and testing
manifest.json and plugin.js in any code editor (VS Code, etc.)console.log output in the browser console (F12 → Console)⑪ Version management (semantic versioning)
| Change type | Which number to bump | Example |
|---|---|---|
| Bug fix | Patch version +1 | 1.0.0 → 1.0.1 |
| New feature (backward compatible) | Minor version +1 | 1.0.0 → 1.1.0 |
| Major change (breaking) | Major version +1 | 1.0.0 → 2.0.0 |
Write a changelog for every update. Users can see all past versions under the "Versions" tab on the plugin detail page.
⑫ Submission and review
Pre-submission checklist: ✅ unique id · ✅ least privilege · ✅ code runs · ✅ no privacy issues · ✅ changelog written
What gets rejected: malicious code, privilege abuse, covert transfer of user data, plagiarism, duplication of platform features.
⑬ Subscription tiers and "downgrading"
premium → the default requirement for new plugins; only Premium subscribers can install them.
basic → once usage grows, the team "downgrades" it to Basic.
free (platform built-in) → exceptional plugins are adopted by the team as built-in features, with no manual install; the team notifies the author and pays a bounty in thanks.
⑭ Sandbox and security boundaries
🚫 Read other users' private data (passwords, emails, private messages)
🚫 Access interfaces the platform has not opened
🚫 Covertly send data to external servers
🚫 Access the local file system (the web sandbox isolates it by design)
🚫 Execute undeclared capabilities
Sandbox + AI checks + official review: three layers of protection.
⑮ Naming and icon guidelines
✅ id: lowercase letters plus hyphens; "author-name" is recommended (alex-weather-card)
✅ name: short and memorable; avoid names that duplicate built-in features
✅ icon: one emoji is enough (⛅ 🎨 🧩 🔧 📈)
✅ preview: CSS gradient or a clear image
⑯ Best practices
✅ Use the "author-name" format for ids so they stay globally unique
✅ Least privilege — declare only the capabilities you actually use
✅ Keep the code clean and commented — reviews go faster
✅ Write a clear changelog
✅ Degrade gracefully when the API is unavailable — don't crash
⑰ Frequently asked questions
Q: Do I need to know programming to write a plugin?
A: You need a little JavaScript. If not, start with a simple type like a "theme plugin" that only fills in a manifest.
Q: What if my id collides with another?
A: IDs must be globally unique; a collision makes the submission fail. Using "author-name" makes collisions unlikely.
Q: Can I change existing platform features?
A: No. Plugins can only "add" or "hook into extension points"; they cannot change the platform core.
Q: How do I make my plugin free?
A: Set minTier to free (the default is premium). You can also start at premium and let the team "downgrade" it once usage grows.
Q: How long does review take?
A: AI checks are instant; official manual review usually takes 1–3 days.