DocumentationMethacore Apps

App storage

6 min read · last updated 23 September 2026

Every app gets its own key-value storage at Methacore – for notes, settings, registrations, game scores. You need no database and no server; the storage belongs to the app and to the club in which it is used.

Structure

An entry has a fixed address:

App  →  Verein  →  Bereich (org | user)  →  Sammlung  →  Schlüssel  →  Wert
PartMeaning
Appcomes from the token: the app the OAuth client belongs to. An app never sees another app's storage.
Clubthe token's club. The same app has separate storage in every club.
Scope areaorg – shared with all members of the club who use the app (default). user – only for the signed-in member.
Collectiona name of your choice, e.g. notizen
Keyunique within the collection
Valueany JSON: text, number, object, list

Rules

RuleValue
Collection and key names1–64 characters from A–Z a–z 0–9 _ -
Quota10 MB per app and club, both scope areas combined
What is measuredkey plus value as compact JSON, in bytes
Exceeded413 App storage quota exceeded. – the entry is not saved
Order when listingby key, ascending
Page sizelimit 1–200, default 50
updatedAtUnix timestamp in seconds
Scopesmc.apps.storage:read for reading, mc.apps.storage:write for writing and deleting

Because entries are sorted by key, keys starting with a timestamp (2026-09-23-… or Date.now().toString(36)) work well for chronological lists.

In the builder

Four data sources access the storage: storage.list, storage.get, storage.put and storage.delete. Parameters and responses are listed under Data sources. Without scope, org applies.

{ "type": "call", "source": "storage.put",
  "params": { "collection": "einstellungen", "key": "farbe", "value": "{{event.value}}", "scope": "user" } }

In main.js

/** @type {MethacoreHandler} */
export async function merken({ storage, event }) {
  await storage.set("einstellungen", "farbe", event.value, { scope: "user" });
}

/** @type {MethacoreHandler} */
export async function laden({ storage, setState }) {
  const seite = await storage.list("notizen", { limit: 100, offset: 0 });
  setState("notizen", seite.items);
  setState("anzahl", seite.total);
}
MethodResult
storage.list(collection, { scope?, limit?, offset? }){ items: [{ key, value, updatedAt }], total }
storage.get(collection, key, { scope? }){ key, value, updatedAt } – throws for an unknown key (404)
storage.set(collection, key, value, { scope? })creates or overwrites
storage.delete(collection, key, { scope? })deletes – throws for an unknown key (404)

With the SDK (external apps)

import { createMethacore } from "@methacore/sdk";

const mc = createMethacore({ clientId: "cl_7d2e41a9", scopes: ["mc.apps.storage:read", "mc.apps.storage:write"] });

// Key-value in the org scope area
await mc.storage.kv.set("letzterExport", new Date().toISOString());
const zuletzt = await mc.storage.kv.get<string>("letzterExport"); // undefined if it does not exist

// Collections
const notizen = mc.storage.collection<{ text: string }>("notizen");
const key = await notizen.add({ text: "Sattel zur Reparatur" }); // generates a key
const alle = await notizen.all(); // loads page by page

// The member's scope area
const meine = mc.storage.withScope("user").collection("favoriten");
await meine.set("halle-2", { seit: Date.now() });

kv is the collection kv. In the SDK, get returns undefined instead of an error if the key does not exist.

What does not belong in storage

  • Secrets – entries in the org scope area can be read by every member who uses the app with mc.apps.storage:read.
  • Copies of Methacore data – load profile, events and so on fresh via the data sources. A copy goes stale and can quickly violate your app's privacy policy.
  • Large files – the storage is meant for structured data, not as a file store. 10 MB fill up quickly.

The storage is not versioned. Overwriting is final, and so is deleting.