Skip to content

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.

🎯 Core principle: change the presentation, never the core

✅ 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 moduleWhat it isWhat plugins can do
🌐 Site shellLeft menu, top bar, theme (colors/fonts/corner radius)Add menu items, change skins, change backgrounds
✏️ FluidCanvas editorCard canvas editor (card types/edges/fonts/layers/merging)Register new card types, edges, tools and fonts
📄 PagesHome/community/messages/activity/articles/subscription and moreAdd panels and entry points
👥 SocialPosts/comments/likes/reposts/follows/bookmarksSubscribe to these events and trigger automatically
📚 ArticlesWriting, publishing and reading encyclopedia articlesHook into publishing
🖼 GalleryImage upload, tags and searchRead image data (read-only)
👑 SubscriptionFour tiers: free/basic/premium/ultraSet a minTier requirement
🏆 Levels/achievementsUser XP, badges and decorationsRead level data (read-only)
🔔 NotificationsIn-site notifications and announcementsSend 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 IDNameDefault size
flagFlag card8 wide × 5 long
shieldCoat of arms card5 × 5
contentContent card8 × 4 text block
textText cardAuto
statsStats cardAuto
sneSNE index cardAuto
sheetTable card10 wide × 7 long
timelineTimeline cardAuto
mapTerritory map cardAuto

✂️ Edge themes (edgeTheme) — existing edges; plugins can register new ones

Edge IDName
paperPaper
treasureTreasure map
techTech (bevel)
paintPaint
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 IDNameOrder
freeFree0
basicBasic1
premiumPremium2
ultraUltra3

📄 Key pages (hosts of page-level extension points)

dashboard
Home dashboard
overview
MicroNationary
community-hub
Community
messages
Messages
activity
Activity
fluidcanvas
FluidCanvas editor
article
Article reader
premium
Subscription page

🔤 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"
}
FieldRequiredDescription
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
iconOptionalIcon (emoji)
previewOptionalPreview image (CSS gradient or image URL)
categoryOptionalCategory: card / theme / tool / general
capabilities✅List of required permissions
minTierOptionalInitial subscription requirement; defaults to premium
tagsOptionalTag array to make store search easier
licenseOptionalLicense

⑥ capabilities explained (capability → exact platform location)

Each capability maps to one or more specific locations on the platform:

CapabilityWhere on the platformWhat it can do
ui.menuLeft sidebar navigation (12 menu items)Add / edit / delete menu items
ui.themeSite-wide CSS design tokens (--color-* variables)Override colors, fonts, corner radius and spacing
ui.backgroundPage background and canvas backgroundChange background images and gradients
ui.animationPage opening / page transition animations (transitions.js)Add custom opening animations and entrance effects
cardTypeFluidCanvas editor asset panelRegister new card types
edgeThemeEditor edge selectorRegister new edge themes
toolEditor toolbar, context menu and shortcutsAdd buttons, menu items and shortcuts
hookPlatform event systemSubscribe to events and run automatically
storagePlugin-specific key-value storageRead and write settings
notificationIn-site notification systemSend 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°' });
APISignatureDescriptionCapability needed
plugin.registerregister(obj)Register the plugin bodyMatching capability
plugin.storage.setset(key, value)Store a key-value pair (isolated by plugin id)storage
plugin.storage.getget(key)Read a key-value pairstorage
plugin.storage.removeremove(key)Delete a keystorage
plugin.onon(event, handler)Subscribe to an eventhook
plugin.notifynotify({title, body})Send an in-site notificationnotification

⑧ Complete event hook reference

Subscribe to these events to run your code automatically when the corresponding action happens:

EventWhen it firesCallback parameter
card.createA new card is created on the canvascard (card object)
card.mergeTwo cards are merged into a groupgroup (group object)
card.deleteA card is deletedcard
draft.saveA draft is saveddraft
article.publishAn article is publishedarticle
comment.createA comment is postedcomment
like.createA like is givenlike
follow.createA user is followedfollow

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

1
Create manifest.json and plugin.js in any code editor (VS Code, etc.)
2
Write the manifest — declare id / capabilities / tier requirement
3
Write plugin.js — connect extension points through the declared capabilities
4
Check errors and console.log output in the browser console (F12 → Console)
5
Run the "pre-submission checklist" before submitting (section ⑫)

⑪ Version management (semantic versioning)

Change typeWhich number to bumpExample
Bug fixPatch version +11.0.0 → 1.0.1
New feature (backward compatible)Minor version +11.0.0 → 1.1.0
Major change (breaking)Major version +11.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

1
Click "Submit plugin" in the plugin store
2
Upload the manifest + code
3
Automatic AI checks (malicious code / privilege abuse / privacy leaks)
4
Official manual review
5
Once approved, it is listed and available to "Premium" by default

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.