askrobots / dbbasic-object-server
Public
Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.
danq9
signup: the person chooses the password and name on the confirm page
83c7aa6
2 weeks, 5 days ago
History
nav_entries.json · 4.3 KB · 90 lines
| 1 | { |
| 2 | "name": "nav_entries", |
| 3 | "title": "Navigation", |
| 4 | "version": 1, |
| 5 | "description": "One registry of the doors this server puts on itself. Before this collection there were THREE hand-maintained lists of the same apps and they had already drifted apart: a 25-entry JS array in site_nav's app switcher, a 21-entry Python tuple in site_home's tile grid, and a collection-to-URL map for search results -- each edited by whoever remembered, and between them naming none of the eight newest apps (shop, intake, billing, timers, banking, shipping, receiving, payments). A menu maintained by hand rots the moment somebody ships without editing it, and the rot is invisible: nothing fails, the front door simply advertises a server that no longer exists. So a package now DECLARES its doors in its manifest and install writes them here, the same way it declares its schedules. Every navigation surface becomes a fold over this one collection. The package owns label/path/blurb/group/surface/order and restates them on every install; the operator owns operator_hidden, which an install never writes -- the package says what an app IS, the operator says what they want to SEE.", |
| 6 | "fields": [ |
| 7 | { |
| 8 | "name": "id" |
| 9 | }, |
| 10 | { |
| 11 | "name": "package", |
| 12 | "type": "text", |
| 13 | "label": "Package", |
| 14 | "help": "Which package registered this door. Provenance, stamped by install: it is how a second package claiming the same path is caught, and how you find the manifest to edit when a label is wrong." |
| 15 | }, |
| 16 | { |
| 17 | "name": "label", |
| 18 | "type": "text", |
| 19 | "required": true, |
| 20 | "label": "Label", |
| 21 | "validation": {"min_length": 1, "max_length": 60} |
| 22 | }, |
| 23 | { |
| 24 | "name": "path", |
| 25 | "type": "text", |
| 26 | "required": true, |
| 27 | "label": "Path", |
| 28 | "validation": {"min_length": 1, "max_length": 200}, |
| 29 | "help": "The URL this door opens, starting with '/'. Whether anything answers it is a routing question (convention, site_routes, or a views record) that this collection deliberately does not restate." |
| 30 | }, |
| 31 | { |
| 32 | "name": "blurb", |
| 33 | "type": "text", |
| 34 | "label": "Blurb", |
| 35 | "validation": {"max_length": 160}, |
| 36 | "help": "One honest line about what the app does. Shown under the label on the home grid." |
| 37 | }, |
| 38 | { |
| 39 | "name": "group", |
| 40 | "type": "text", |
| 41 | "label": "Group", |
| 42 | "default": "Apps", |
| 43 | "help": "Free text heading the entry sorts under: Work, Publishing, Money, Commerce, Warehouse, System. Free text rather than an enum so a new deployment can invent its own grouping without a schema migration." |
| 44 | }, |
| 45 | { |
| 46 | "name": "surface", |
| 47 | "type": "enum", |
| 48 | "label": "Surface", |
| 49 | "default": "member", |
| 50 | "enum": ["public", "member", "operator", "hidden"], |
| 51 | "help": "Who this door is shown to: public (anyone, signed in or not), member (any signed-in user), operator (an admin role), hidden (registered but never rendered). This governs the MENU only -- it is not access control. Permissions decide who may actually open the page, and a surface of 'public' on a page the policy protects hides nothing that was not already protected." |
| 52 | }, |
| 53 | { |
| 54 | "name": "order", |
| 55 | "type": "integer", |
| 56 | "label": "Order", |
| 57 | "default": "100", |
| 58 | "help": "Sort position within the group; ties break on label." |
| 59 | }, |
| 60 | { |
| 61 | "name": "operator_hidden", |
| 62 | "type": "boolean", |
| 63 | "label": "Hidden by operator", |
| 64 | "default": "false", |
| 65 | "help": "The operator's word, and install NEVER overwrites it. Set it to hide a door on this deployment without editing anybody's package; a reinstall or an upgrade restates label, path, blurb, group, order and surface but leaves this column exactly as you left it. Same posture as a paused schedule: the package declares what should be there, you decide what is there right now." |
| 66 | }, |
| 67 | { |
| 68 | "name": "owner_id", |
| 69 | "type": "text", |
| 70 | "label": "Owner" |
| 71 | }, |
| 72 | { |
| 73 | "name": "created_at", |
| 74 | "type": "datetime", |
| 75 | "label": "Created", |
| 76 | "read_only": true |
| 77 | } |
| 78 | ], |
| 79 | "forms": { |
| 80 | "default": {"fields": ["label", "path", "blurb", "group", "surface", "order", "operator_hidden"]} |
| 81 | }, |
| 82 | "views": { |
| 83 | "list_mode": "table", |
| 84 | "list_fields": ["label", "path", "group", "surface", "order", "operator_hidden", "package"], |
| 85 | "filter_fields": ["group", "surface"] |
| 86 | }, |
| 87 | "search": { |
| 88 | "fields": ["label", "path", "blurb"] |
| 89 | } |
| 90 | } |