dineway 0.1.30 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/README.md +348 -181
  2. package/dist/api/route-utils.d.mts +2 -2
  3. package/dist/api/route-utils.mjs +1 -1
  4. package/dist/api/schemas/index.d.mts +1 -1
  5. package/dist/{api-CYnT_2_B.mjs → api-BgETfzu-.mjs} +1 -1
  6. package/dist/astro/index.d.mts +2 -2
  7. package/dist/astro/index.mjs +2 -2
  8. package/dist/astro/middleware/auth.d.mts +2 -2
  9. package/dist/astro/middleware/auth.mjs +1 -1
  10. package/dist/astro/middleware/request-context.mjs +1 -1
  11. package/dist/astro/middleware/setup.mjs +1 -1
  12. package/dist/astro/middleware.mjs +6 -6
  13. package/dist/astro/routes/api/admin/api-tokens/index.mjs +1 -1
  14. package/dist/astro/routes/api/admin/context/_id_/history.mjs +2 -2
  15. package/dist/astro/routes/api/admin/context/_id_/index.mjs +2 -2
  16. package/dist/astro/routes/api/admin/context/_id_/review.mjs +2 -2
  17. package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +2 -2
  18. package/dist/astro/routes/api/admin/context/diff.mjs +2 -2
  19. package/dist/astro/routes/api/admin/context/index.mjs +2 -2
  20. package/dist/astro/routes/api/admin/context/stale.mjs +2 -2
  21. package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +3 -3
  22. package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +3 -3
  23. package/dist/astro/routes/api/admin/hitl-requests/index.mjs +3 -3
  24. package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +2 -2
  25. package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +2 -2
  26. package/dist/astro/routes/api/admin/oauth-clients/index.mjs +2 -2
  27. package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +3 -3
  28. package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +3 -3
  29. package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +1 -1
  30. package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +3 -3
  31. package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +3 -3
  32. package/dist/astro/routes/api/admin/plugins/index.mjs +1 -1
  33. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +1 -1
  34. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +3 -3
  35. package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +1 -1
  36. package/dist/astro/routes/api/admin/plugins/updates.mjs +1 -1
  37. package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +1 -1
  38. package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +1 -1
  39. package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +1 -1
  40. package/dist/astro/routes/api/auth/invite/complete.mjs +2 -2
  41. package/dist/astro/routes/api/auth/invite/register-options.mjs +1 -1
  42. package/dist/astro/routes/api/auth/mode.mjs +1 -1
  43. package/dist/astro/routes/api/auth/passkey/options.mjs +1 -1
  44. package/dist/astro/routes/api/auth/passkey/register/options.mjs +1 -1
  45. package/dist/astro/routes/api/auth/passkey/register/verify.mjs +2 -2
  46. package/dist/astro/routes/api/auth/passkey/verify.mjs +2 -2
  47. package/dist/astro/routes/api/auth/signup/complete.mjs +2 -2
  48. package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +1 -1
  49. package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +1 -1
  50. package/dist/astro/routes/api/health.mjs +1 -1
  51. package/dist/astro/routes/api/import/wordpress/execute.mjs +2 -2
  52. package/dist/astro/routes/api/import/wordpress/prepare.mjs +2 -2
  53. package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +2 -2
  54. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +2 -2
  55. package/dist/astro/routes/api/manifest.mjs +3 -3
  56. package/dist/astro/routes/api/mcp.mjs +2 -2
  57. package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +2 -2
  58. package/dist/astro/routes/api/menus/_name_/items.mjs +2 -2
  59. package/dist/astro/routes/api/menus/_name_/reorder.mjs +2 -2
  60. package/dist/astro/routes/api/menus/_name_/translations.mjs +2 -2
  61. package/dist/astro/routes/api/menus/_name_.mjs +2 -2
  62. package/dist/astro/routes/api/menus/index.mjs +2 -2
  63. package/dist/astro/routes/api/oauth/authorize.mjs +3 -3
  64. package/dist/astro/routes/api/oauth/device/authorize.mjs +2 -2
  65. package/dist/astro/routes/api/oauth/device/code.mjs +2 -2
  66. package/dist/astro/routes/api/oauth/device/token.mjs +2 -2
  67. package/dist/astro/routes/api/oauth/register.mjs +2 -2
  68. package/dist/astro/routes/api/oauth/token/refresh.mjs +2 -2
  69. package/dist/astro/routes/api/oauth/token/revoke.mjs +2 -2
  70. package/dist/astro/routes/api/oauth/token.mjs +3 -3
  71. package/dist/astro/routes/api/openapi.json.mjs +1 -1
  72. package/dist/astro/routes/api/redirects/_id_.mjs +2 -2
  73. package/dist/astro/routes/api/redirects/index.mjs +2 -2
  74. package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +1 -1
  75. package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +1 -1
  76. package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +1 -1
  77. package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +1 -1
  78. package/dist/astro/routes/api/schema/collections/index.mjs +1 -1
  79. package/dist/astro/routes/api/schema/orphans/_slug_.mjs +1 -1
  80. package/dist/astro/routes/api/schema/orphans/index.mjs +1 -1
  81. package/dist/astro/routes/api/sections/_slug_.mjs +2 -2
  82. package/dist/astro/routes/api/sections/index.mjs +2 -2
  83. package/dist/astro/routes/api/settings.mjs +2 -2
  84. package/dist/astro/routes/api/setup/admin-verify.mjs +3 -3
  85. package/dist/astro/routes/api/setup/admin.mjs +1 -1
  86. package/dist/astro/routes/api/setup/index.mjs +1 -1
  87. package/dist/astro/routes/api/setup/status.mjs +1 -1
  88. package/dist/astro/routes/api/snapshot.mjs +1 -1
  89. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +2 -2
  90. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +2 -2
  91. package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +2 -2
  92. package/dist/astro/routes/api/taxonomies/index.mjs +2 -2
  93. package/dist/astro/routes/api/themes/preview.mjs +1 -1
  94. package/dist/astro/routes/api/well-known/auth.mjs +2 -2
  95. package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +1 -1
  96. package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +1 -1
  97. package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +2 -2
  98. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +2 -2
  99. package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +2 -2
  100. package/dist/astro/routes/api/widget-areas/_name_.mjs +2 -2
  101. package/dist/astro/routes/api/widget-areas/index.mjs +2 -2
  102. package/dist/astro/types.d.mts +2 -2
  103. package/dist/{bylines-CGwQCHdG.d.mts → bylines-r8fYBu9F.d.mts} +27 -27
  104. package/dist/cli/index.mjs +1 -1
  105. package/dist/{context-BnD2m5tn.mjs → context-DgqEfcWz.mjs} +1 -1
  106. package/dist/{device-flow-DDZjntgf.mjs → device-flow-CTS91g4A.mjs} +2 -2
  107. package/dist/{hitl-requests-Dt7JsXh5.mjs → hitl-requests-DaRuZ7tb.mjs} +2 -2
  108. package/dist/{hitl-route-helpers-F3voM_3Y.mjs → hitl-route-helpers-DcPySbZ3.mjs} +2 -2
  109. package/dist/index.d.mts +2 -2
  110. package/dist/index.mjs +1 -1
  111. package/dist/media/local-runtime.d.mts +2 -2
  112. package/dist/{oauth-authorization-lW9vJ_hl.mjs → oauth-authorization-DyOFXQWq.mjs} +2 -2
  113. package/dist/{oauth-clients-D1n0ykZJ.mjs → oauth-clients-BMs_bmoz.mjs} +1 -1
  114. package/dist/plugins/adapt-sandbox-entry.d.mts +2 -2
  115. package/dist/{runtime-CJasRKJB.d.mts → runtime-CP8eY2L-.d.mts} +2 -2
  116. package/dist/runtime.d.mts +2 -2
  117. package/dist/{site-context-BBX9G7FT.mjs → site-context-DuBQk6Mp.mjs} +1 -1
  118. package/dist/version-DjRKTPYR.mjs +6 -0
  119. package/package.json +3 -3
  120. package/dist/version-C0JMMhmz.mjs +0 -6
  121. /package/dist/{allowed-origins-U7ZavuGp.mjs → allowed-origins-3RuuoFjC.mjs} +0 -0
  122. /package/dist/{challenge-store-ChIyDxM6.mjs → challenge-store-cJam-E5R.mjs} +0 -0
  123. /package/dist/{experimental-workflows-_I9NlZbO.mjs → experimental-workflows-BbZbIEZp.mjs} +0 -0
  124. /package/dist/{mode-BSPqFzOJ.mjs → mode-Bd55iLcP.mjs} +0 -0
  125. /package/dist/{secrets-DOkSNlfQ.mjs → secrets-DfeNNoLa.mjs} +0 -0
  126. /package/dist/{setup-complete-DXCcwkth.mjs → setup-complete-C2ztsNhJ.mjs} +0 -0
package/README.md CHANGED
@@ -1,287 +1,454 @@
1
- # Dineway
1
+ # Dineway — Build Your Restaurant Website with AI
2
2
 
3
- The Agentic Website builder for restaurants and local businesses. Dineway combines structured content modeling with the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) to create intelligent, AI-powered sites that don't just display information they understand your menus, manage your reputation, execute marketing, and act on behalf of the restaurant owner.
3
+ Dineway is the **Agentic Website builder** for restaurants and local businesses. You don't need to write code. Just tell an AI agent your restaurant name and city, and it builds a professional websitewith menus, blog, reviews, gallery, and local SEO automatically.
4
4
 
5
- The core thesis: A restaurant's website should not be a brochure. It should be an employee they understand it, act on it, and improve autonomously.
5
+ > **How it works:** You paste this guide into an AI agent (Codex, Claude, OpenClaw, or similar). The agent reads it, installs the tools, and builds your site end-to-end. You review, approve, and publish.
6
6
 
7
- ## Overview
7
+ ---
8
8
 
9
- Dineway is an [Astro](https://astro.build) integration that gives your site a full content engine, admin panel, built-in MCP server, and plugin system. It runs on Node.js with SQLite/libSQL (or PostgreSQL), deploys anywhere with a single command, and stores all schema in the database — not in code.
9
+ ## What You Get
10
10
 
11
- ### Architecture
11
+ | Feature | Description |
12
+ | --- | --- |
13
+ | 🍽️ **Restaurant Website** | A polished, mobile-first site built from your real business data — hours, location, reviews, photos |
14
+ | 📝 **Blog & News** | Articles derived from real customer reviews and restaurant updates |
15
+ | 🍕 **Menu Display** | Structured menu with items, prices, descriptions, and photos |
16
+ | ⭐ **Reviews Showcase** | Curated real reviews that highlight your restaurant's character |
17
+ | 🖼️ **Photo Gallery** | A CMS-managed gallery with your best images |
18
+ | 🔍 **Local SEO** | JSON-LD structured data, meta tags, and local business schema — all automatic |
19
+ | 🛠️ **Admin Panel** | A visual dashboard to edit content, manage media, and publish changes |
20
+ | 🤖 **AI-Powered** | 50+ MCP tools let AI agents manage content, menus, and marketing on your behalf |
12
21
 
13
- ```
14
- ┌──────────────────────────────────────────────────────────────────┐
15
- │ Your Restaurant Site │
16
- │ │
17
- │ Astro Framework (Live Collections · Sessions · Middleware) │
18
- │ │
19
- │ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌───────────┐ │
20
- │ │ Content │ │ Admin │ │ MCP │ │ Plugins │ │
21
- │ │ Engine │ │ Panel │ │ Server │ │ │ │
22
- │ └────────────┘ └────────────┘ └────────────┘ └───────────┘ │
23
- │ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌───────────┐ │
24
- │ │ Site │ │ Entity │ │ HITL │ │ CLI │ │
25
- │ │ Context │ │ Resolution │ │ Reviews │ │ │ │
26
- │ └────────────┘ └────────────┘ └────────────┘ └───────────┘ │
27
- │ │
28
- │ Data Layer: SQLite / libSQL / PostgreSQL ←→ Local / S3 Storage │
29
- └──────────────────────────────────────────────────────────────────┘
30
- ```
22
+ ---
31
23
 
32
- ### Core Capabilities
24
+ ## Before You Start
33
25
 
34
- | Category | What It Does |
35
- | ----------------------- | ------------------------------------------------------------------------------------------------------------ |
36
- | **MCP Server** | 50+ tools for AI agents to interact with content, schema, media, search, taxonomies, menus, and site context |
37
- | **Site Context Engine** | Versioned operational knowledge (brand voice, seasonal strategy, policies) — agents consult before acting |
38
- | **Content Engine** | Structured collections with typed fields, revisions, drafts, scheduled publishing, and full-text search |
39
- | **Entity Resolution** | Natural-language references ("the spring lamb special") resolve to exact content items |
40
- | **Human-in-the-Loop** | Review requests ensure AI-generated changes get human approval before going live |
41
- | **Admin Panel** | Visual schema builder, rich text editor (TipTap/Portable Text), media library, menu builder |
42
- | **Plugin System** | Lifecycle hooks, KV storage, settings, admin pages, dashboard widgets, custom block types |
43
- | **CLI** | Programmatic site management for content, schema, media, deployment — designed for both humans and AI agents |
26
+ ### What You Need
44
27
 
45
- ## Installation
28
+ 1. **Node.js 22 or later** — [download here](https://nodejs.org/)
29
+ 2. **An AI agent environment** — any of these:
30
+ - [OpenAI Codex](https://openai.com/codex)
31
+ - [Claude Code](https://claude.ai)
32
+ - [OpenClaw](https://openclaw.dev)
33
+ - Any agent that supports skill packs
34
+ 3. **Your restaurant info** — name and city (that's it!)
46
35
 
47
- ```shell
48
- npm create dineway@latest
49
- ```
36
+ ### Check Node.js
50
37
 
51
- Or add to an existing Astro project:
38
+ Open a terminal and run:
52
39
 
53
- ```shell
54
- npm install dineway
40
+ ```bash
41
+ node --version
42
+ # Should print v22.x.x or higher
55
43
  ```
56
44
 
57
- ## Agent Skills
45
+ If you don't have Node.js, download it from [nodejs.org](https://nodejs.org/) and install it first.
58
46
 
59
- Dineway also publishes an agent skill pack for designing, building, and publishing AI-ready restaurant sites. The skills guide agents through place-data enrichment, restaurant information architecture, visual design, Dineway CMS schema and seed content, media upload, local SEO, and deployment.
47
+ ---
60
48
 
61
- Install the skill pack with `npx skills`:
49
+ ## Step 1 Install Dineway Skills
50
+
51
+ Dineway Skills are instruction packs that teach your AI agent how to build restaurant websites. Install them with one command:
62
52
 
63
53
  ```bash
64
54
  npx skills add https://github.com/dineway/dineway-skills
65
55
  ```
66
56
 
67
- For a full restaurant build, invoke the restaurant-site skill with a restaurant name and city:
57
+ This installs the following skills into your project:
68
58
 
69
- ```text
70
- Use building-restaurant-site to build an AI-ready Dineway restaurant site for "Restaurant Name" in "City, Country".
71
- ```
59
+ | Skill | What It Does |
60
+ | --- | --- |
61
+ | `building-restaurant-site` | End-to-end restaurant site creation from real place data |
62
+ | `building-dineway-site` | General Dineway site building patterns |
63
+ | `dineway-cli` | CLI commands for managing content, schema, media, and deployment |
64
+ | `enrich-place-details` | Fetches your restaurant's real data (hours, reviews, photos, location) |
65
+ | `frontend-design` | Creates distinctive, production-grade visual design |
66
+ | `brainstorming` | Explores design and architecture options before building |
72
67
 
73
- For an existing Dineway project, use the CLI skill to manage schema, content, media, generated types, and deployment:
68
+ ---
74
69
 
75
- ```text
76
- Use dineway-cli to seed content, generate types, upload media, and deploy this Dineway site.
77
- ```
70
+ ## Step 2 — Create Your Restaurant Site
71
+
72
+ ### Option A: Tell the Agent (Recommended)
78
73
 
79
- ## CLI
74
+ Paste this into your AI agent's input:
80
75
 
81
- The Dineway CLI (`dineway`) manages projects and instances. Commands fall into three categories:
76
+ ```text
77
+ Use building-restaurant-site to build an AI-ready Dineway restaurant site for "YOUR RESTAURANT NAME" in "YOUR CITY, COUNTRY".
78
+ ```
82
79
 
83
- - **Local commands** work directly on local project files or a SQLite file, no running server needed: `init`, `dev`, `seed`, `export-seed`, `auth secret`, `secrets generate`, `secrets fingerprint`
84
- - **Deployment commands** — orchestrate platform CLIs or generate provider files: `deploy`
85
- - **Remote commands** — talk to a running Dineway instance via HTTP: `types`, `login`, `logout`, `whoami`, `content`, `schema`, `media`, `search`, `taxonomy`, `menu`
80
+ Replace with your real restaurant name and city. Examples:
86
81
 
87
- ### Authentication
82
+ ```text
83
+ Use building-restaurant-site to build an AI-ready Dineway restaurant site for "Peace Harmony" in "Sydney, Australia".
84
+ ```
88
85
 
89
- Remote commands resolve auth automatically in this order:
86
+ ```text
87
+ Use building-restaurant-site to build an AI-ready Dineway restaurant site for "La Maison Rouge" in "Paris, France".
88
+ ```
90
89
 
91
- 1. `--token` flag
92
- 2. `DINEWAY_TOKEN` env var
93
- 3. Stored credentials from `dineway login`
94
- 4. Dev bypass (localhost only — no token needed)
90
+ The agent will automatically:
95
91
 
96
- For local dev servers, just run the command auth is handled automatically. For remote instances, run `dineway login --url https://my-site.example.com` first.
92
+ 1. Search for your restaurant and fetch real business data (hours, reviews, photos, location)
93
+ 2. Download and curate the best photos
94
+ 3. Design an information architecture with Blog, News, Menu, Reviews, and Gallery
95
+ 4. Build a polished Astro website with local SEO and JSON-LD
96
+ 5. Create the Dineway CMS schema and seed content
97
+ 6. Start a local dev server for you to preview
97
98
 
98
- ## Quick Start
99
+ ### Option B: Manual Project Creation
99
100
 
100
- ### Create and Run
101
+ If you prefer to start with a blank project and build it yourself:
101
102
 
102
103
  ```bash
103
- # Create a new Dineway site
104
+ # Create a new Dineway project
104
105
  npm create dineway@latest my-restaurant
106
+
107
+ # Enter the project directory
105
108
  cd my-restaurant
109
+
110
+ # Install dependencies
106
111
  npm install
107
112
 
108
- # Start the dev server (runs migrations automatically)
113
+ # Start the dev server
109
114
  npx dineway dev
110
-
111
- # Open the admin panel at http://localhost:4321/_dineway/admin
112
- # Complete the Setup Wizard to create your first admin account
113
115
  ```
114
116
 
115
- ### Seed a Site
117
+ The dev server starts at `http://localhost:4321`. The admin panel is at `http://localhost:4321/_dineway/admin`.
118
+
119
+ ---
120
+
121
+ ## Step 3 — Preview Your Site
122
+
123
+ Once the agent finishes building (or you've started the dev server manually), open your browser:
124
+
125
+ - **Your site:** `http://localhost:4321`
126
+ - **Admin panel:** `http://localhost:4321/_dineway/admin`
127
+
128
+ On your first visit to the admin panel, the Setup Wizard runs automatically — it creates the database and prompts you to create your admin account.
129
+
130
+ ### Create Your Admin Account
116
131
 
117
- Apply a seed file to bootstrap collections, menus, taxonomies, and content:
132
+ 1. Open `http://localhost:4321/_dineway/admin`
133
+ 2. The Setup Wizard appears on first visit
134
+ 3. Enter your email and display name
135
+ 4. Register a passkey (fingerprint, Face ID, or security key)
136
+ 5. You're now the site administrator
137
+
138
+ > **Tip:** In dev mode, you can skip passkey setup by visiting:
139
+ > `http://localhost:4321/_dineway/api/setup/dev-bypass?redirect=/_dineway/admin`
140
+
141
+ ---
142
+
143
+ ## Step 4 — Manage Content with Dineway CLI
144
+
145
+ The Dineway CLI is your command-line tool for managing everything about your site. The AI agent uses it automatically, but you can also use it directly.
146
+
147
+ ### Seed Your Site with Content
148
+
149
+ If you have a seed file (the agent creates one automatically):
118
150
 
119
151
  ```bash
120
- npx dineway seed .dineway/seed.json
152
+ npx dineway seed seed/seed.json
121
153
  ```
122
154
 
123
- Export the current database as a reusable seed:
155
+ ### Manage Menu Items
124
156
 
125
157
  ```bash
126
- npx dineway export-seed > seed.json
127
- npx dineway export-seed --with-content > seed-with-content.json
158
+ # List all menu items
159
+ npx dineway content list menu-items
160
+
161
+ # Add a new menu item
162
+ npx dineway content create menu-items --data '{
163
+ "title": "Grilled Salmon",
164
+ "description": "Atlantic salmon with seasonal vegetables",
165
+ "price": 28.50
166
+ }'
167
+
168
+ # Update a menu item (use the ID from a prior list/get)
169
+ npx dineway content get menu-items grilled-salmon
170
+ npx dineway content update menu-items 01ABC123 --rev MToyMDI2... --data '{"price": 32.00}'
128
171
  ```
129
172
 
130
- ### Manage Content via CLI
131
-
132
- The CLI is designed for both humans and AI agents. Create and update auto-publish by default for immediate read-after-write consistency.
173
+ ### Manage Blog Posts
133
174
 
134
175
  ```bash
135
- # List content
176
+ # List posts
136
177
  npx dineway content list posts
137
- npx dineway content list posts --status published --limit 10
138
178
 
139
- # Get a single item (Portable Text fields converted to markdown)
140
- npx dineway content get posts my-post-slug
179
+ # Create a new blog post
180
+ npx dineway content create posts --data '{
181
+ "title": "Spring Menu Now Available",
182
+ "content": "# Fresh Flavors for the Season\n\nWe are excited to announce our new spring menu..."
183
+ }'
184
+ ```
141
185
 
142
- # Create content (auto-publishes by default)
143
- npx dineway content create posts --data '{"title": "Spring Menu", "content": "# New Dishes"}'
144
- npx dineway content create posts --file post.json --slug spring-menu
186
+ ### Upload Photos
145
187
 
146
- # Update content (requires --rev from a prior get)
147
- npx dineway content update posts 01ABC123 --rev MToyMDI2... --data '{"title": "Updated"}'
188
+ ```bash
189
+ # Upload a dish photo
190
+ npx dineway media upload ./dish-photo.jpg --alt "Grilled salmon plate" --caption "Our signature dish"
148
191
 
149
- # Lifecycle
150
- npx dineway content publish posts 01ABC123
151
- npx dineway content unpublish posts 01ABC123
152
- npx dineway content schedule posts 01ABC123 --at 2026-03-01T09:00:00Z
192
+ # List all media
193
+ npx dineway media list
153
194
  ```
154
195
 
155
- ### Manage Schema
196
+ ### Manage Schema (Collections & Fields)
156
197
 
157
198
  ```bash
158
- # List collections
199
+ # List all collections
159
200
  npx dineway schema list
160
201
 
161
- # Create a collection
162
- npx dineway schema create menu-items --label "Menu Items"
202
+ # Add a field to menu items
203
+ npx dineway schema add-field menu-items calories --type integer --label "Calories"
163
204
 
164
- # Add fields
165
- npx dineway schema add-field menu-items price --type number --required
166
- npx dineway schema add-field menu-items description --type text --label "Description"
167
- npx dineway schema add-field menu-items photo --type image
205
+ # Create a new collection
206
+ npx dineway schema create specials --label "Daily Specials"
168
207
  ```
169
208
 
170
- Field types: `string`, `text`, `number`, `integer`, `boolean`, `datetime`, `image`, `reference`, `portableText`, `json`.
209
+ ### Search Content
210
+
211
+ ```bash
212
+ npx dineway search "salmon" --collection menu-items
213
+ ```
171
214
 
172
- ### Media, Search, Taxonomies, and Menus
215
+ ### Generate TypeScript Types
173
216
 
174
217
  ```bash
175
- # Upload media
176
- npx dineway media upload ./dish-photo.jpg --alt "Grilled lamb" --caption "Spring special"
218
+ npx dineway types
219
+ ```
177
220
 
178
- # Search content
179
- npx dineway search "lamb" --collection menu-items --limit 5
221
+ > **For agents:** All CLI commands support `--json` for machine-readable output. It's auto-enabled when stdout is piped:
222
+ > ```bash
223
+ > npx dineway content list posts --json | jq '.items[].slug'
224
+ > ```
180
225
 
181
- # Manage taxonomies
182
- npx dineway taxonomy list
183
- npx dineway taxonomy add-term categories --name "Seasonal" --slug seasonal
226
+ ---
184
227
 
185
- # View menus
186
- npx dineway menu list
187
- npx dineway menu get primary
188
- ```
228
+ ## Step 5 — Deploy Your Site
189
229
 
190
- ### Generate TypeScript Types
230
+ When you're happy with your site, deploy it live with one command.
231
+
232
+ ### Deploy to Forgeway (Recommended)
233
+
234
+ Forgeway is Dineway's first-party hosting platform. It's the simplest way to go live:
191
235
 
192
236
  ```bash
193
- npx dineway types
237
+ npx dineway deploy forgeway
194
238
  ```
195
239
 
196
- Writes `.dineway/types.ts` and `.dineway/schema.json` for full type safety in your Astro pages.
240
+ What happens:
241
+
242
+ 1. You verify your email address (Dineway account)
243
+ 2. The site is built and deployed
244
+ 3. You receive a **one-time setup link** to create your admin account on the live site
245
+ 4. `DINEWAY_SITE_URL` and `DINEWAY_TOKEN` are saved to your project `.env` automatically
246
+ 5. Follow-up CLI commands (like `npx dineway whoami`) work automatically
197
247
 
198
- ### Deploy
248
+ > **Important:** Open the setup link in your browser immediately. It lets you register a passkey for your admin account on the live site.
199
249
 
200
- One-command deployment to any Node.js host:
250
+ If you lose the setup link, regenerate it:
201
251
 
202
252
  ```bash
203
- npx dineway@latest deploy # default deploy to dineway platform (no setup required)
204
- npx dineway@latest deploy railway # generates railway.json, runs railway up
205
- npx dineway@latest deploy docker # generates Dockerfile + .dockerignore
206
- npx dineway@latest deploy fly # generates Fly config, runs fly deploy
207
- npx dineway@latest deploy gcp # experimental: gcloud run deploy
253
+ npx dineway auth setup-link
208
254
  ```
209
255
 
210
- ### JSON Output
256
+ ### Deploy to Other Platforms
257
+
258
+ ```bash
259
+ npx dineway deploy railway # Railway — generates config and deploys
260
+ npx dineway deploy docker # Docker — generates Dockerfile
261
+ npx dineway deploy fly # Fly.io — generates config and deploys
262
+ npx dineway deploy gcp # Google Cloud Run (experimental)
263
+ ```
211
264
 
212
- All CLI commands support `--json` for machine-readable output. Auto-enabled when stdout is piped:
265
+ ### After Deployment
266
+
267
+ Once deployed, manage your live site remotely:
213
268
 
214
269
  ```bash
215
- npx dineway content list posts --json | jq '.items[].slug'
216
- ID=$(npx dineway content create posts --data '{"title":"Hello"}' --json | jq -r '.id')
270
+ # Log in to your live site
271
+ npx dineway login --url https://your-site.example.com
272
+
273
+ # Check who you're logged in as
274
+ npx dineway whoami
275
+
276
+ # Manage content remotely
277
+ npx dineway content list posts --url https://your-site.example.com
217
278
  ```
218
279
 
219
- ## Astro Configuration
220
-
221
- ```typescript
222
- // astro.config.mjs
223
- import { defineConfig } from "astro/config";
224
- import dineway, { local } from "dineway/astro";
225
- import { sqlite } from "dineway/db";
226
-
227
- export default defineConfig({
228
- integrations: [
229
- dineway({
230
- database: sqlite({ url: "file:./data.db" }),
231
- storage: local({
232
- directory: "./uploads",
233
- baseUrl: "/_dineway/api/media/file",
234
- }),
235
- }),
236
- ],
237
- });
280
+ ---
281
+
282
+ ## Step 6 — Ongoing Management with AI
283
+
284
+ After your site is live, continue using your AI agent for ongoing tasks:
285
+
286
+ ```text
287
+ Use dineway-cli to create a new blog post about our weekend brunch special.
238
288
  ```
239
289
 
240
- ```typescript
241
- // src/live.config.ts
242
- import { defineLiveCollection } from "astro:content";
243
- import { dinewayLoader } from "dineway/runtime";
290
+ ```text
291
+ Use dineway-cli to update the menu with new summer dishes.
292
+ ```
244
293
 
245
- export const collections = {
246
- _dineway: defineLiveCollection({ loader: dinewayLoader() }),
247
- };
294
+ ```text
295
+ Use dineway-cli to upload these new restaurant photos and add them to the gallery.
248
296
  ```
249
297
 
250
- ## Querying Content in Astro Pages
298
+ The agent reads the `dineway-cli` skill and translates your natural-language requests into CLI commands automatically.
299
+
300
+ ---
301
+
302
+ ## Quick Reference
303
+
304
+ ### CLI Command Categories
251
305
 
252
- Use Dineway's query functions in your Astro components:
306
+ | Category | Commands | Needs Server? |
307
+ | --- | --- | --- |
308
+ | **Setup** | `init`, `dev`, `seed`, `export-seed` | No |
309
+ | **Deploy** | `deploy forgeway/railway/docker/fly/gcp` | No |
310
+ | **Auth** | `login`, `logout`, `whoami`, `auth setup-link`, `auth secret` | Yes (remote) |
311
+ | **Content** | `content list/get/create/update/delete/publish/unpublish/schedule` | Yes |
312
+ | **Schema** | `schema list/get/create/delete/add-field/remove-field` | Yes |
313
+ | **Media** | `media list/get/upload/delete` | Yes |
314
+ | **Search** | `search` | Yes |
315
+ | **Taxonomy** | `taxonomy list/terms/add-term` | Yes |
316
+ | **Menu** | `menu list/get` | Yes |
317
+ | **Types** | `types` | Yes |
253
318
 
254
- ```typescript
255
- import {
256
- getDinewayCollection,
257
- getDinewayEntry,
258
- getSiteSettings,
259
- getMenu,
260
- getTaxonomyTerms,
261
- getWidgetArea,
262
- search,
263
- } from "dineway";
319
+ ### Field Types for Schema
264
320
 
265
- // Content
266
- const { entries } = await getDinewayCollection("posts");
267
- const { entry } = await getDinewayEntry("posts", "hello-world");
321
+ When adding fields to collections, use these types:
268
322
 
269
- // Site settings
270
- const settings = await getSiteSettings();
323
+ | Type | Use For |
324
+ | --- | --- |
325
+ | `string` | Short text (titles, names) |
326
+ | `text` | Long plain text |
327
+ | `number` | Decimal numbers (prices) |
328
+ | `integer` | Whole numbers (counts, calories) |
329
+ | `boolean` | Yes/No flags |
330
+ | `datetime` | Dates and times |
331
+ | `image` | Photos and images |
332
+ | `reference` | Link to another content item |
333
+ | `portableText` | Rich text with formatting |
334
+ | `json` | Structured data |
271
335
 
272
- // Navigation
273
- const menu = await getMenu("primary");
336
+ ### Authentication Flow
274
337
 
275
- // Taxonomies
276
- const categories = await getTaxonomyTerms("categories");
338
+ The CLI resolves authentication automatically:
277
339
 
278
- // Widgets
279
- const sidebar = await getWidgetArea("sidebar");
340
+ 1. `--token` flag (highest priority)
341
+ 2. `DINEWAY_TOKEN` from shell environment or `.env` file
342
+ 3. Stored credentials from `dineway login`
343
+ 4. Dev bypass — localhost only, no auth needed
344
+
345
+ For local development, just run commands — auth is handled automatically.
346
+
347
+ ---
348
+
349
+ ## Common Questions
350
+
351
+ ### How do I access the admin panel?
352
+
353
+ Visit `http://localhost:4321/_dineway/admin` (local) or `https://your-site.example.com/_dineway/admin` (deployed). You need an admin account — create one through the Setup Wizard on first visit.
354
+
355
+ ### How do I reset my admin account?
280
356
 
281
- // Search
282
- const results = await search("hello world", { collections: ["posts"] });
357
+ Generate a new one-time setup link:
358
+
359
+ ```bash
360
+ npx dineway auth setup-link
283
361
  ```
284
362
 
363
+ Open the link in your browser to register a new passkey.
364
+
365
+ ### Can I edit the site design after it's built?
366
+
367
+ Yes. The site is a standard [Astro](https://astro.build) project. You (or your AI agent) can modify the HTML, CSS, and components in the `src/` directory. Content managed by Dineway CMS is edited through the admin panel or CLI.
368
+
369
+ ### What data does the agent use to build my site?
370
+
371
+ The agent fetches publicly available business data: your restaurant name, address, hours, reviews, photos, and menu information. It does not access private accounts or require credentials.
372
+
373
+ ### Can I use Dineway for non-restaurant businesses?
374
+
375
+ Yes. While optimized for restaurants, Dineway's content engine, admin panel, and plugin system work for any local business. Use the `building-dineway-site` skill instead of `building-restaurant-site`.
376
+
377
+ ---
378
+
379
+ ## Agent Automation Reference
380
+
381
+ > This section is for AI agents that read this README to automate site creation. Human readers can skip this.
382
+
383
+ ### Automated Restaurant Site Build
384
+
385
+ ```text
386
+ STEP 1: Install skills
387
+ RUN: npx skills add https://github.com/dineway/dineway-skills
388
+
389
+ STEP 2: Build the site
390
+ INVOKE SKILL: building-restaurant-site
391
+ INPUTS: restaurant name, city/country
392
+ The skill internally invokes:
393
+ - enrich-place-details (fetch real place data)
394
+ - brainstorming (design decisions)
395
+ - frontend-design (visual implementation)
396
+ - building-dineway-site (CMS integration)
397
+ - dineway-cli (content seeding, media upload)
398
+
399
+ STEP 3: Validate
400
+ RUN: npx dineway dev
401
+ VERIFY: Site loads at http://localhost:4321
402
+ VERIFY: Admin panel loads at http://localhost:4321/_dineway/admin
403
+ VERIFY: Blog, News, Menu, Reviews, Gallery pages exist and render
404
+
405
+ STEP 4: Deploy
406
+ RUN: npx dineway deploy forgeway
407
+ CAPTURE: Setup link from output
408
+ PRESENT: Setup link to user for admin account creation
409
+ ```
410
+
411
+ ### Automated Content Management
412
+
413
+ ```text
414
+ # List content in a collection
415
+ RUN: npx dineway content list {collection} --json
416
+
417
+ # Create content (auto-publishes)
418
+ RUN: npx dineway content create {collection} --data '{...}' --json
419
+
420
+ # Update content (requires --rev from a prior get)
421
+ RUN: npx dineway content get {collection} {id} --json
422
+ # Extract _rev from response
423
+ RUN: npx dineway content update {collection} {id} --rev {_rev} --data '{...}' --json
424
+
425
+ # Upload media
426
+ RUN: npx dineway media upload {filepath} --alt "{description}" --json
427
+
428
+ # Deploy changes
429
+ RUN: npx dineway deploy forgeway
430
+ ```
431
+
432
+ ### Key Files in a Dineway Project
433
+
434
+ ```
435
+ my-restaurant/
436
+ ├── astro.config.mjs # Astro + Dineway configuration
437
+ ├── src/
438
+ │ ├── live.config.ts # Dineway content loader (boilerplate)
439
+ │ ├── pages/ # Site pages (server-rendered)
440
+ │ ├── layouts/ # Layout components
441
+ │ └── components/ # Reusable UI components
442
+ ├── seed/
443
+ │ └── seed.json # Schema + demo content seed file
444
+ ├── .dineway/
445
+ │ ├── types.ts # Generated TypeScript types
446
+ │ └── schema.json # Generated schema
447
+ └── package.json
448
+ ```
449
+
450
+ ---
451
+
285
452
  ## Documentation
286
453
 
287
- Full documentation, guides, and API reference: [docs](https://docs.dineway.ai)
454
+ Full documentation, guides, and API reference: [docs.dineway.ai](https://docs.dineway.ai)
@@ -1,11 +1,11 @@
1
- import { $n as isParseError, Qn as ParseResult, Zn as OptionsRepository, er as parseBody, ir as handleError, nr as apiError, rr as apiSuccess, t as DinewayConfig, tr as parseQuery } from "../runtime-CJasRKJB.mjs";
1
+ import { $n as isParseError, Qn as ParseResult, Zn as OptionsRepository, er as parseBody, ir as handleError, nr as apiError, rr as apiSuccess, t as DinewayConfig, tr as parseQuery } from "../runtime-CP8eY2L-.mjs";
2
2
  import { t as Database } from "../types-B1NksXAb.mjs";
3
3
  import { at as StorageCollectionConfig, it as StorageCollection } from "../types-BIM7jwxr.mjs";
4
4
  import "../types-BgE6gMFI.mjs";
5
5
  import "../runner-pAnQS6iI.mjs";
6
6
  import "../index-2tBfB_8X.mjs";
7
7
  import "../index-CpbixmRL.mjs";
8
- import "../bylines-CGwQCHdG.mjs";
8
+ import "../bylines-r8fYBu9F.mjs";
9
9
  import "../types-BBETcziA.mjs";
10
10
  import "../validate-BzUCAU2a.mjs";
11
11
  import { Kysely } from "kysely";
@@ -12,7 +12,7 @@ import { i as parseQuery, n as parseBody, t as isParseError } from "../parse-D7T
12
12
  import "../ssrf-KAIQS48_.mjs";
13
13
  import "../cron-D7FDsRu-.mjs";
14
14
  import { n as getPublicOrigin } from "../public-url-BL2r8dmQ.mjs";
15
- import { t as finalizeSetup } from "../setup-complete-DXCcwkth.mjs";
15
+ import { t as finalizeSetup } from "../setup-complete-C2ztsNhJ.mjs";
16
16
 
17
17
  //#region src/api/auth-storage.ts
18
18
  /**