dineway 0.1.30 → 0.1.32

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 +384 -182
  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-BNh44xAn.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-V8d8rXsD.d.mts} +28 -28
  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-DtFUCA79.mjs +6 -0
  119. package/package.json +2 -2
  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,190 +1,215 @@
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`.
171
-
172
- ### Media, Search, Taxonomies, and Menus
209
+ ### Search Content
173
210
 
174
211
  ```bash
175
- # Upload media
176
- npx dineway media upload ./dish-photo.jpg --alt "Grilled lamb" --caption "Spring special"
177
-
178
- # Search content
179
- npx dineway search "lamb" --collection menu-items --limit 5
180
-
181
- # Manage taxonomies
182
- npx dineway taxonomy list
183
- npx dineway taxonomy add-term categories --name "Seasonal" --slug seasonal
184
-
185
- # View menus
186
- npx dineway menu list
187
- npx dineway menu get primary
212
+ npx dineway search "salmon" --collection menu-items
188
213
  ```
189
214
 
190
215
  ### Generate TypeScript Types
@@ -193,95 +218,272 @@ npx dineway menu get primary
193
218
  npx dineway types
194
219
  ```
195
220
 
196
- Writes `.dineway/types.ts` and `.dineway/schema.json` for full type safety in your Astro pages.
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
+ > ```
225
+
226
+ ---
197
227
 
198
- ### Deploy
228
+ ## Step 5 — Deploy Your Site & Own Your Website
199
229
 
200
- One-command deployment to any Node.js host:
230
+ Unlike standard SaaS website builders, Dineway lets you fully own your website. Your code, your structured menus, your blog posts, and your media files belong entirely to you. You can choose to deploy to Dineway's official platform or host it on your own server or cloud provider with zero vendor lock-in.
231
+
232
+ ### Option A: Deploy to Forgeway (Simplest & Managed)
233
+
234
+ Forgeway is Dineway's first-party hosting platform. It's the easiest way to go live:
201
235
 
202
236
  ```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
237
+ npx dineway deploy forgeway
208
238
  ```
209
239
 
210
- ### JSON Output
240
+ What happens:
241
+ 1. You verify your email address (Dineway account).
242
+ 2. The site is built, global CDN is configured, and database is provisioned.
243
+ 3. You receive a **one-time setup link** to register your admin passkey on the live site.
244
+ 4. `DINEWAY_SITE_URL` and `DINEWAY_TOKEN` are saved to your project `.env` automatically so remote CLI commands work out of the box.
245
+
246
+ > **Important:** Open the setup link in your browser immediately. It lets you register your secure passkey for the live admin panel. If you lose or expire the link, regenerate it with `npx dineway auth setup-link`.
211
247
 
212
- All CLI commands support `--json` for machine-readable output. Auto-enabled when stdout is piped:
248
+ ---
249
+
250
+ ### Option B: Self-Host Anywhere (Maximum Ownership)
251
+
252
+ You can host Dineway on your own infrastructure. Dineway runs as a standard Node.js server.
213
253
 
214
254
  ```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')
255
+ # Choose a platform target to generate configurations and deploy
256
+ npx dineway deploy railway # Generates railway.json & deploys to Railway
257
+ npx dineway deploy fly # Generates fly.toml & deploys to Fly.io with persistent volumes
258
+ npx dineway deploy docker # Generates Dockerfile & .dockerignore
259
+ npx dineway deploy docker --compose # Generates Dockerfile + docker-compose.yml for local VPS hosting
260
+ npx dineway deploy gcp # Google Cloud Run (experimental)
217
261
  ```
218
262
 
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
- });
263
+ #### Configuring Your Database & Media Storage for Self-Hosting
264
+
265
+ When self-hosting, you specify how the database and media files are stored in `astro.config.mjs` using environment variables or configuration blocks:
266
+
267
+ 1. **Database Options**:
268
+ - **Local SQLite (Standard)**: Best for single-container VPS or Fly.io with a persistent volume.
269
+ ```typescript
270
+ database: sqlite({ url: "file:./data/data.db" })
271
+ ```
272
+ - **Remote libSQL (Turso)**: Excellent for serverless or ephemeral platforms like Railway, Fly, or GCP.
273
+ ```typescript
274
+ database: libsql({
275
+ url: process.env.DINEWAY_DATABASE_URL || "libsql://...",
276
+ authToken: process.env.DINEWAY_DATABASE_TOKEN
277
+ })
278
+ ```
279
+ - **PostgreSQL**: Industry-standard relational database.
280
+ ```typescript
281
+ database: postgres({ connectionString: process.env.DATABASE_URL })
282
+ ```
283
+
284
+ 2. **Media Storage Options**:
285
+ - **Local Uploads**: Saves images directly on the server's hard disk (ideal for local VPS).
286
+ ```typescript
287
+ storage: local({ directory: "./uploads", baseUrl: "/_dineway/api/media/file" })
288
+ ```
289
+ - **S3-Compatible Storage (AWS S3, Cloudflare R2, MinIO)**: Best for ephemeral hosts (Railway, Cloud Run) so files are never lost when the container restarts.
290
+ ```typescript
291
+ storage: s3({
292
+ bucket: process.env.S3_BUCKET_NAME,
293
+ region: process.env.S3_REGION,
294
+ endpoint: process.env.S3_ENDPOINT, // e.g. Cloudflare R2 or MinIO endpoint
295
+ accessKeyId: process.env.S3_ACCESS_KEY_ID,
296
+ secretAccessKey: process.env.S3_SECRET_ACCESS_KEY
297
+ })
298
+ ```
299
+
300
+ ### After Deployment
301
+
302
+ Once deployed, manage your live site remotely:
303
+
304
+ ```bash
305
+ # Log in to your live site
306
+ npx dineway login --url https://your-site.example.com
307
+
308
+ # Check who you're logged in as
309
+ npx dineway whoami
310
+
311
+ # Manage content remotely
312
+ npx dineway content list posts --url https://your-site.example.com
238
313
  ```
239
314
 
240
- ```typescript
241
- // src/live.config.ts
242
- import { defineLiveCollection } from "astro:content";
243
- import { dinewayLoader } from "dineway/runtime";
315
+ ---
244
316
 
245
- export const collections = {
246
- _dineway: defineLiveCollection({ loader: dinewayLoader() }),
247
- };
317
+ ## Step 6 Ongoing Management with AI
318
+
319
+ After your site is live, continue using your AI agent for ongoing tasks:
320
+
321
+ ```text
322
+ Use dineway-cli to create a new blog post about our weekend brunch special.
323
+ ```
324
+
325
+ ```text
326
+ Use dineway-cli to update the menu with new summer dishes.
327
+ ```
328
+
329
+ ```text
330
+ Use dineway-cli to upload these new restaurant photos and add them to the gallery.
331
+ ```
332
+
333
+ The agent reads the `dineway-cli` skill and translates your natural-language requests into CLI commands automatically.
334
+
335
+ ---
336
+
337
+ ## Quick Reference
338
+
339
+ ### CLI Command Categories
340
+
341
+ | Category | Commands | Needs Server? |
342
+ | --- | --- | --- |
343
+ | **Setup** | `init`, `dev`, `seed`, `export-seed` | No |
344
+ | **Deploy** | `deploy forgeway/railway/docker/fly/gcp` | No |
345
+ | **Auth** | `login`, `logout`, `whoami`, `auth setup-link`, `auth secret` | Yes (remote) |
346
+ | **Content** | `content list/get/create/update/delete/publish/unpublish/schedule` | Yes |
347
+ | **Schema** | `schema list/get/create/delete/add-field/remove-field` | Yes |
348
+ | **Media** | `media list/get/upload/delete` | Yes |
349
+ | **Search** | `search` | Yes |
350
+ | **Taxonomy** | `taxonomy list/terms/add-term` | Yes |
351
+ | **Menu** | `menu list/get` | Yes |
352
+ | **Types** | `types` | Yes |
353
+
354
+ ### Field Types for Schema
355
+
356
+ When adding fields to collections, use these types:
357
+
358
+ | Type | Use For |
359
+ | --- | --- |
360
+ | `string` | Short text (titles, names) |
361
+ | `text` | Long plain text |
362
+ | `number` | Decimal numbers (prices) |
363
+ | `integer` | Whole numbers (counts, calories) |
364
+ | `boolean` | Yes/No flags |
365
+ | `datetime` | Dates and times |
366
+ | `image` | Photos and images |
367
+ | `reference` | Link to another content item |
368
+ | `portableText` | Rich text with formatting |
369
+ | `json` | Structured data |
370
+
371
+ ### Authentication Flow
372
+
373
+ The CLI resolves authentication automatically:
374
+
375
+ 1. `--token` flag (highest priority)
376
+ 2. `DINEWAY_TOKEN` from shell environment or `.env` file
377
+ 3. Stored credentials from `dineway login`
378
+ 4. Dev bypass — localhost only, no auth needed
379
+
380
+ For local development, just run commands — auth is handled automatically.
381
+
382
+ ---
383
+
384
+ ## Common Questions
385
+
386
+ ### How do I access the admin panel?
387
+
388
+ 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.
389
+
390
+ ### How do I reset my admin account?
391
+
392
+ Generate a new one-time setup link:
393
+
394
+ ```bash
395
+ npx dineway auth setup-link
248
396
  ```
249
397
 
250
- ## Querying Content in Astro Pages
398
+ Open the link in your browser to register a new passkey.
399
+
400
+ ### Can I edit the site design after it's built?
251
401
 
252
- Use Dineway's query functions in your Astro components:
402
+ 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.
253
403
 
254
- ```typescript
255
- import {
256
- getDinewayCollection,
257
- getDinewayEntry,
258
- getSiteSettings,
259
- getMenu,
260
- getTaxonomyTerms,
261
- getWidgetArea,
262
- search,
263
- } from "dineway";
404
+ ### What data does the agent use to build my site?
264
405
 
265
- // Content
266
- const { entries } = await getDinewayCollection("posts");
267
- const { entry } = await getDinewayEntry("posts", "hello-world");
406
+ 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.
268
407
 
269
- // Site settings
270
- const settings = await getSiteSettings();
408
+ ### Can I use Dineway for non-restaurant businesses?
271
409
 
272
- // Navigation
273
- const menu = await getMenu("primary");
410
+ 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`.
274
411
 
275
- // Taxonomies
276
- const categories = await getTaxonomyTerms("categories");
412
+ ---
277
413
 
278
- // Widgets
279
- const sidebar = await getWidgetArea("sidebar");
414
+ ## Agent Automation Reference
280
415
 
281
- // Search
282
- const results = await search("hello world", { collections: ["posts"] });
416
+ > This section is for AI agents that read this README to automate site creation. Human readers can skip this.
417
+
418
+ ### Automated Restaurant Site Build
419
+
420
+ ```text
421
+ STEP 1: Install skills
422
+ RUN: npx skills add https://github.com/dineway/dineway-skills
423
+
424
+ STEP 2: Build the site
425
+ INVOKE SKILL: building-restaurant-site
426
+ INPUTS: restaurant name, city/country
427
+ The skill internally invokes:
428
+ - enrich-place-details (fetch real place data)
429
+ - brainstorming (design decisions)
430
+ - frontend-design (visual implementation)
431
+ - building-dineway-site (CMS integration)
432
+ - dineway-cli (content seeding, media upload)
433
+
434
+ STEP 3: Validate
435
+ RUN: npx dineway dev
436
+ VERIFY: Site loads at http://localhost:4321
437
+ VERIFY: Admin panel loads at http://localhost:4321/_dineway/admin
438
+ VERIFY: Blog, News, Menu, Reviews, Gallery pages exist and render
439
+
440
+ STEP 4: Deploy
441
+ RUN: npx dineway deploy forgeway
442
+ CAPTURE: Setup link from output
443
+ PRESENT: Setup link to user for admin account creation
283
444
  ```
284
445
 
446
+ ### Automated Content Management
447
+
448
+ ```text
449
+ # List content in a collection
450
+ RUN: npx dineway content list {collection} --json
451
+
452
+ # Create content (auto-publishes)
453
+ RUN: npx dineway content create {collection} --data '{...}' --json
454
+
455
+ # Update content (requires --rev from a prior get)
456
+ RUN: npx dineway content get {collection} {id} --json
457
+ # Extract _rev from response
458
+ RUN: npx dineway content update {collection} {id} --rev {_rev} --data '{...}' --json
459
+
460
+ # Upload media
461
+ RUN: npx dineway media upload {filepath} --alt "{description}" --json
462
+
463
+ # Deploy changes
464
+ RUN: npx dineway deploy forgeway
465
+ ```
466
+
467
+ ### Key Files in a Dineway Project
468
+
469
+ ```
470
+ my-restaurant/
471
+ ├── astro.config.mjs # Astro + Dineway configuration
472
+ ├── src/
473
+ │ ├── live.config.ts # Dineway content loader (boilerplate)
474
+ │ ├── pages/ # Site pages (server-rendered)
475
+ │ ├── layouts/ # Layout components
476
+ │ └── components/ # Reusable UI components
477
+ ├── seed/
478
+ │ └── seed.json # Schema + demo content seed file
479
+ ├── .dineway/
480
+ │ ├── types.ts # Generated TypeScript types
481
+ │ └── schema.json # Generated schema
482
+ └── package.json
483
+ ```
484
+
485
+ ---
486
+
285
487
  ## Documentation
286
488
 
287
- Full documentation, guides, and API reference: [docs](https://docs.dineway.ai)
489
+ Full documentation, guides, and API reference: [docs.dineway.ai](https://docs.dineway.ai)