Imported from tencentedgeone/edgeone-makers-tools (
skills/edgeone-makers-tools/references/makers-storage/SKILL.md). Install upstream withnpx skills add tencentedgeone/edgeone-makers-tools --skill makers-storage. Copyright stays with the author.
EdgeOne Makers Storage
šļø There is NO managed database on this platform ā no SQL, no MongoDB, no Prisma, no ORM. Do not reach for
sqlite,pg,mysql,mongodb, or an in-memory array (it resets on every cold start / redeploy). Blob IS your database. Any dynamic data a generated site needs to persist ā guestbook messages, uploaded drawings, votes, leaderboards, per-user save state, form submissions ā is modeled as Blob keys. Model your "tables" as key prefixes (messages/<id>.json,users/<uid>.json). See references/blob.md ā "Blob as your backend".
ā ļø Local dev does NOT always require login.
edgeone makers devruns without authentication for pure-static previews. Login only becomes necessary through this chain: using Blob ā the project must belinked ā linking requires a logged-in account first. So if (and only if) dev/deploy must read/write Blob (or any credentialed backend), runedgeone login(browser) or pass-t <token>before linking/starting dev. If your site has no backend, skip login and just runedgeone makers dev. See also makers-env-adaption (Login authentication + Project linking).ā When the project uses Blob/KV, ALWAYS pass
-n <project-name>toedgeone makers dev. Bareedgeone makers devdrops into an interactive "Link existing / Create and link" picker that hangs in sandbox / non-interactive environments. With-n, the CLI auto-creates the project if the name doesn't exist yet ā one command, no separate step needed.š Every Blob store:
getStore({ name, consistency: "strong" })ā never the string formgetStore("name"). The string form defaults to eventual consistency and causes "I just wrote but the next read returns stale/null" bugs. Full rule and rationale: references/blob.md ā IRON RULE (top of file).
EdgeOne Makers provides two storage services. Choose based on your runtime and data type:
| Storage | Runtime | Data Type | SDK | Use Case |
|---|---|---|---|---|
| KV | Edge Functions only | Small key-value pairs (⤠25 MB) | Global variable (no npm) | Counters, config, session tokens, simple CRUD |
| Blob | Cloud Functions (Makers Functions) | Files & objects (images, docs, uploads) | @edgeone/pages-blob (npm) |
User uploads, AI-generated content, file management |
Decision Tree
Need to persist anything (records, lists, counters, uploads, save state)?
āā Edge Function (V8 runtime, no npm)?
ā ā KV Storage (global variable) ā read references/kv.md
āā Cloud Function (Node.js, has npm)? ā default for any real backend
āā Files / images / large objects?
ā ā Blob Storage ā read references/blob.md
āā Structured data (records, lists, counters, per-user state)?
ā Blob with setJSON / key prefixes ā read references/blob.md
Routing
| Task | Read |
|---|---|
| KV Storage (Edge Functions, global variable, put/get/delete/list) | references/kv.md |
| Blob Storage (Cloud Functions, npm SDK, file upload/download, pre-signed URLs) | references/blob.md |
