Indexed JSON master and shard files in Backend storage
Sharding

Appifio Creator · Lesson T04 · Glossary

Sharding & system files
- off-limits for AI and you

Aura splits large datasets into shards automatically. Some system files are denied - touching them errors out or breaks auth.

Goals: Know what sharding is; list files you must not read/write by hand; tell AI guidance apart from backend enforcement.

Time: 11-13 minutes · Before: T03 · Next: T05

UI: Backend · Clear all data · CMS Settings · Routes tab · Compare changes

1. Sharding diagram

You call appendData('blog-posts.json', item)
→ Aura updates the master index (list metadata)
→ when the dataset is large enough → payload splits into .shards/blog-posts/…
→ you still read via readList('blog-posts.json')
Do NOT readFile('.shards/...') · Do NOT writeFile shards by hand
System deny (enforced): login.json · __super_master_index__ · .shards/*

2. Glossary & system files

Term / fileMeaningCorrect approach
ShardingAutomatically split a large dataset into stable piecesappendData / readList / updateData
login.jsonAdmin store (hashed passwords)login · registerAdmin · changePassword
routes.jsonURL → HTML mapRoutes tab · addRoute (T08)
__cms_manifest__.jsonCMS schema - AI reads, Panel writesCMS UI · don’t rename by hand out of sync with entities
manifest.storage.system_filesNotes for the AI inside the manifestNot the same as every file being blocked by the backend

3. Stay out of the restricted zone

  1. User admin: ask the AI to use appifio_login / registerAdmin - forbid “read login.json” (X11).
  2. Routes: Routes tab → Add RouteSave - or addRoute/removeRoute APIs.
  3. In Diff: any path under .shards/ or writes to __super_master_index__ → ✗ immediately.
  4. Backend: Clear all data only when you understand the risk - the UI asks you to type a confirmation string.
  5. Fixed prompt: “Do not access .shards, login.json, or __super_master_index__. Auth only through the API.”

4. Comparisons · Can / can’t

  • MongoDB sharding / DynamoDB partitions: same idea of splitting load; Aura hides the details.
  • WordPress wp-config + wp_users: same “don’t edit by hand” rule as login.json.

You can: CRUD through the public APIs with the right role. You can’t: edit shards by hand; see original passwords; hard-delete freely if you only have the user role.

Security: Passwords are hashed by the system; after CMS login, the admin session is kept in the browser under your project path - never commit it to Git/HTML.

5. Incidents · Tips

IncidentFix
API deny on a system fileExpected - switch to the official auth/route APIs
AI “fixes routes.json with writeFile”Reject; use the Routes tab or addRoute
See a .shards folder under FilesObserve only - don’t edit; use readList
Clear all data wiped the wrong thingClone/Export first; don’t use it on live production

Fixed prompt on every Advanced project: “Do not access .shards, login.json, or __super_master_index__. Auth only through the API.”

6. Diff rejection examples

  • writeFile('login.json', { users: [...] }) → ✗ - use registerAdmin.
  • readFile('.shards/blog-posts/shard_001.json') → ✗ - use readList('blog-posts.json').
  • writeFile('routes.json', entireObject) → ✗ - Routes tab + Save, or addRoute.
  • API response deny: system file → correct enforcement; switch to a public API.

7. Checklist

  1. Do you understand that readList hides .shards?
  2. Do you refuse to let the AI read login.json?
  3. Do you edit routes via the Routes tab + Save?

Next: T05 - CMS manifest & UI contract

Appifio Creator · User guide · T04