oneie 3.6.0 → 3.6.4
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.
- package/.claude/agents/agent-lawyer.md +7 -0
- package/.claude/agents/agent-onboard.md +7 -0
- package/.claude/commands/deploy.md +77 -150
- package/.mcp.json +68 -0
- package/CREATE-WEBSITE.md +442 -0
- package/SECURITY.md +31 -0
- package/TESTING-ONBOARDING.md +185 -0
- package/dist/commands/create-website.d.ts +19 -0
- package/dist/commands/create-website.d.ts.map +1 -0
- package/dist/commands/create-website.js +231 -0
- package/dist/commands/create-website.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +116 -6
- package/dist/commands/init.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/folders.yaml +1 -1
- package/package.json +8 -2
- package/.claude/agents/agent-onboard-example-output.md +0 -600
- package/.claude/commands/ONBOARDING_ENHANCEMENT_SUMMARY.md +0 -266
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
# Create Website with ONE Platform CLI
|
|
2
|
+
|
|
3
|
+
**New in v3.6.1:** The CLI now includes a complete platform setup integrated directly into the onboarding flow. When you run `npx oneie`, the CLI will:
|
|
4
|
+
|
|
5
|
+
1. **Set up the platform** - Copy `/one` (ontology, docs), `.claude/` (agents, commands), and all documentation files
|
|
6
|
+
2. **Create your organization folder** - Custom folder for your organization-specific content
|
|
7
|
+
3. **Optionally enhance your website** - Clone the complete Astro + React website template configured with your branding
|
|
8
|
+
|
|
9
|
+
## Quick Start
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Run onboarding (interactive mode)
|
|
13
|
+
npx oneie
|
|
14
|
+
|
|
15
|
+
# Answer questions:
|
|
16
|
+
# 1. Your name
|
|
17
|
+
# 2. Organization name
|
|
18
|
+
# 3. Website URL
|
|
19
|
+
# 4. "Would you like to enhance your website?" → Yes
|
|
20
|
+
# 5. Email
|
|
21
|
+
|
|
22
|
+
# Result: Complete environment ready to use!
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## What Gets Created
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
your-project/
|
|
29
|
+
├── one/ # Ontology, documentation, specifications
|
|
30
|
+
├── .claude/ # AI agents, commands, hooks
|
|
31
|
+
│ ├── agents/ # Agent definitions
|
|
32
|
+
│ ├── commands/ # Slash commands
|
|
33
|
+
│ └── hooks/ # Git hooks
|
|
34
|
+
├── web/ # Astro + React website (if opted in)
|
|
35
|
+
├── your-org/ # Your organization folder
|
|
36
|
+
├── CLAUDE.md # Claude Code instructions
|
|
37
|
+
├── AGENTS.md # Agent coordination rules
|
|
38
|
+
├── README.md # Platform overview
|
|
39
|
+
├── LICENSE.md # Free license
|
|
40
|
+
├── SECURITY.md # Security policy
|
|
41
|
+
└── .mcp.json # MCP server configuration
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## What You Get
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
my-website/
|
|
48
|
+
├── src/
|
|
49
|
+
│ ├── components/ # React components + shadcn/ui (50+)
|
|
50
|
+
│ ├── pages/ # Astro pages
|
|
51
|
+
│ ├── layouts/ # Page layouts
|
|
52
|
+
│ └── styles/ # Tailwind CSS v4
|
|
53
|
+
├── .env.local # Configured with your org settings
|
|
54
|
+
├── astro.config.mjs # React 19 + Cloudflare edge
|
|
55
|
+
├── wrangler.toml # Cloudflare Pages config
|
|
56
|
+
└── package.json # All dependencies
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Features:**
|
|
60
|
+
- ✅ Astro 5 + React 19 with edge SSR
|
|
61
|
+
- ✅ Tailwind CSS v4 (CSS-based config)
|
|
62
|
+
- ✅ shadcn/ui components (50+ pre-installed)
|
|
63
|
+
- ✅ Branded with your organization name
|
|
64
|
+
- ✅ Conditional homepage (ONE vs Customer)
|
|
65
|
+
- ✅ Backend on/off switch
|
|
66
|
+
- ✅ Ready to deploy to Cloudflare Pages
|
|
67
|
+
|
|
68
|
+
## How It Works
|
|
69
|
+
|
|
70
|
+
When you run `npx oneie` and answer "Yes" to "Would you like to enhance your website?", the CLI:
|
|
71
|
+
|
|
72
|
+
1. **Clones template** from github.com/one-ie/web to `./web`
|
|
73
|
+
2. **Configures environment** with your org settings in `web/.env.local`:
|
|
74
|
+
```bash
|
|
75
|
+
ORG_NAME=acme
|
|
76
|
+
ORG_WEBSITE=https://acme.com
|
|
77
|
+
ORG_FOLDER=acme
|
|
78
|
+
ONE_BACKEND=off
|
|
79
|
+
```
|
|
80
|
+
3. **Removes .git** directory so you can initialize your own repo
|
|
81
|
+
4. **Ready to customize** and run with `bun install && bun run dev`
|
|
82
|
+
|
|
83
|
+
## Frontend-Only vs Full Platform
|
|
84
|
+
|
|
85
|
+
### Frontend Only (Recommended to Start)
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
ONE_BACKEND=off
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Features:**
|
|
92
|
+
- Static site generation
|
|
93
|
+
- No database required
|
|
94
|
+
- Deploy anywhere (Cloudflare, Vercel, Netlify)
|
|
95
|
+
- Zero backend costs
|
|
96
|
+
- Simple "Get Started" prompt on homepage
|
|
97
|
+
|
|
98
|
+
**Perfect for:**
|
|
99
|
+
- Landing pages
|
|
100
|
+
- Marketing sites
|
|
101
|
+
- Blogs
|
|
102
|
+
- Static documentation
|
|
103
|
+
|
|
104
|
+
### Full Platform
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
ONE_BACKEND=on
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Features:**
|
|
111
|
+
- Real-time database (Convex)
|
|
112
|
+
- User authentication (Better Auth)
|
|
113
|
+
- Backend API
|
|
114
|
+
- Real-time subscriptions
|
|
115
|
+
- Complete ONE Platform homepage
|
|
116
|
+
|
|
117
|
+
**Requires:**
|
|
118
|
+
- Convex account (free tier available)
|
|
119
|
+
- Backend configuration in `.env.local`
|
|
120
|
+
|
|
121
|
+
## Environment Configuration
|
|
122
|
+
|
|
123
|
+
### Automatically Created (.env.local)
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Organization Configuration
|
|
127
|
+
ORG_NAME=acme
|
|
128
|
+
ORG_WEBSITE=https://acme.com
|
|
129
|
+
ORG_FOLDER=acme
|
|
130
|
+
ONE_BACKEND=off
|
|
131
|
+
|
|
132
|
+
# Backend Configuration (only if ONE_BACKEND=on)
|
|
133
|
+
# PUBLIC_CONVEX_URL=https://your-deployment.convex.cloud
|
|
134
|
+
# CONVEX_DEPLOYMENT=prod:your-deployment-name
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Reserved Values
|
|
138
|
+
|
|
139
|
+
**These are protected and cannot be used:**
|
|
140
|
+
- `ORG_NAME="one"` - Reserved for ONE Platform
|
|
141
|
+
- `ORG_WEBSITE="https://one.ie"` - Reserved for ONE Platform
|
|
142
|
+
- `ORG_FOLDER="onegroup"` - Reserved for ONE Platform
|
|
143
|
+
|
|
144
|
+
**The CLI will reject these during setup.**
|
|
145
|
+
|
|
146
|
+
## Homepage Behavior
|
|
147
|
+
|
|
148
|
+
### For ONE Platform (ORG_NAME=one)
|
|
149
|
+
|
|
150
|
+
**Shows:**
|
|
151
|
+
- Full marketing homepage
|
|
152
|
+
- Complete navigation
|
|
153
|
+
- All features
|
|
154
|
+
- Platform branding
|
|
155
|
+
|
|
156
|
+
### For Customer Orgs (ORG_NAME=acme)
|
|
157
|
+
|
|
158
|
+
**Shows:**
|
|
159
|
+
- "Welcome to acme" header
|
|
160
|
+
- Simple "Get Started" prompt
|
|
161
|
+
- Minimal sidebar (Blog + License)
|
|
162
|
+
- Organization website link
|
|
163
|
+
|
|
164
|
+
## Development
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
# Navigate to web directory
|
|
168
|
+
cd web
|
|
169
|
+
|
|
170
|
+
# Install dependencies (if not already done)
|
|
171
|
+
bun install
|
|
172
|
+
|
|
173
|
+
# Start dev server
|
|
174
|
+
bun run dev
|
|
175
|
+
|
|
176
|
+
# Visit http://localhost:4321
|
|
177
|
+
# See: "Welcome to [your-org]" with GetStartedPrompt
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Deployment
|
|
181
|
+
|
|
182
|
+
### Build
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
bun run build
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**Output:** `dist/` directory with optimized static site
|
|
189
|
+
|
|
190
|
+
### Deploy to Cloudflare Pages
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
wrangler pages deploy dist --project-name=acme
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Live at:** `https://acme.pages.dev`
|
|
197
|
+
|
|
198
|
+
### Custom Domain
|
|
199
|
+
|
|
200
|
+
Add in Cloudflare Pages dashboard:
|
|
201
|
+
1. Go to Settings → Domains
|
|
202
|
+
2. Add `www.acme.com`
|
|
203
|
+
3. Configure DNS (automatic with Cloudflare DNS)
|
|
204
|
+
|
|
205
|
+
## Examples
|
|
206
|
+
|
|
207
|
+
### Example 1: Complete Platform Setup with Website
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
npx oneie
|
|
211
|
+
|
|
212
|
+
# Answer prompts:
|
|
213
|
+
Name: John Doe
|
|
214
|
+
Organization: TechCorp
|
|
215
|
+
Website: https://techcorp.com
|
|
216
|
+
Enhance website? Yes
|
|
217
|
+
Email: john@techcorp.com
|
|
218
|
+
|
|
219
|
+
# Result - Complete environment created:
|
|
220
|
+
# ✅ /one/ → Ontology and documentation
|
|
221
|
+
# ✅ /.claude/ → AI agents and commands
|
|
222
|
+
# ✅ /techcorp/ → Your organization folder
|
|
223
|
+
# ✅ /web/ → Branded Astro + React website
|
|
224
|
+
# ✅ CLAUDE.md, AGENTS.md → AI instructions
|
|
225
|
+
# ✅ README.md, LICENSE.md → Documentation
|
|
226
|
+
# ✅ .mcp.json → MCP configuration
|
|
227
|
+
|
|
228
|
+
# Next: cd web && bun install && bun run dev
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Example 2: Add Backend Later
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
# Start with frontend-only (from Example 1)
|
|
235
|
+
cd web
|
|
236
|
+
|
|
237
|
+
# Enable backend in .env.local
|
|
238
|
+
# Change: ONE_BACKEND=off → ONE_BACKEND=on
|
|
239
|
+
|
|
240
|
+
# Configure Convex:
|
|
241
|
+
npx convex deploy
|
|
242
|
+
|
|
243
|
+
# Add to .env.local:
|
|
244
|
+
PUBLIC_CONVEX_URL=https://your-deployment.convex.cloud
|
|
245
|
+
CONVEX_DEPLOYMENT=prod:your-deployment-name
|
|
246
|
+
|
|
247
|
+
# Restart dev server
|
|
248
|
+
bun run dev
|
|
249
|
+
|
|
250
|
+
# Result: Full platform with auth & database
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Example 3: Platform Setup Without Website
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
npx oneie
|
|
257
|
+
|
|
258
|
+
# Answer prompts:
|
|
259
|
+
Name: Jane Smith
|
|
260
|
+
Organization: StartupCo
|
|
261
|
+
Website: https://startupco.com
|
|
262
|
+
Enhance website? No # <-- Skip website creation
|
|
263
|
+
Email: jane@startupco.com
|
|
264
|
+
|
|
265
|
+
# Result - Platform files without website:
|
|
266
|
+
# ✅ /one/ → Ontology and documentation
|
|
267
|
+
# ✅ /.claude/ → AI agents and commands
|
|
268
|
+
# ✅ /startupco/ → Your organization folder
|
|
269
|
+
# ✅ CLAUDE.md, AGENTS.md → AI instructions
|
|
270
|
+
# ✅ README.md, LICENSE.md → Documentation
|
|
271
|
+
# ✅ .mcp.json → MCP configuration
|
|
272
|
+
# ❌ /web/ → Skipped (can add later)
|
|
273
|
+
|
|
274
|
+
# Next: Run Claude Code and type /one
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
## What Makes It Different
|
|
278
|
+
|
|
279
|
+
### Integrated Onboarding
|
|
280
|
+
|
|
281
|
+
**Traditional CLIs:**
|
|
282
|
+
```bash
|
|
283
|
+
create-react-app my-app
|
|
284
|
+
# Generic template, manual configuration
|
|
285
|
+
# No branding, no customization
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
**ONE Platform:**
|
|
289
|
+
```bash
|
|
290
|
+
npx oneie
|
|
291
|
+
# Interactive onboarding collects your info
|
|
292
|
+
# Automatically brands website with your org
|
|
293
|
+
# Everything configured and ready to run!
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### Smart Defaults
|
|
297
|
+
|
|
298
|
+
**ONE Platform provides:**
|
|
299
|
+
- ✅ Fully branded with your organization name and website
|
|
300
|
+
- ✅ Backend toggle (ONE_BACKEND=off for static, =on for full platform)
|
|
301
|
+
- ✅ Pre-configured for Cloudflare Pages deployment
|
|
302
|
+
- ✅ 50+ shadcn/ui components pre-installed
|
|
303
|
+
- ✅ Tailwind CSS v4 with modern CSS-based config
|
|
304
|
+
- ✅ React 19 edge-compatible for Cloudflare Workers
|
|
305
|
+
- ✅ Conditional homepage (different UI for ONE vs customer orgs)
|
|
306
|
+
- ✅ Minimal sidebar for customer orgs (Blog + License only)
|
|
307
|
+
|
|
308
|
+
### Progressive Enhancement
|
|
309
|
+
|
|
310
|
+
Start simple, scale when ready:
|
|
311
|
+
1. **Frontend-only** (ONE_BACKEND=off): Static site, no database
|
|
312
|
+
2. **Add backend** (ONE_BACKEND=on): Real-time DB, auth, Convex
|
|
313
|
+
3. **Deploy** (wrangler pages deploy): Production on Cloudflare Edge
|
|
314
|
+
|
|
315
|
+
## Customization
|
|
316
|
+
|
|
317
|
+
### Change Organization Settings
|
|
318
|
+
|
|
319
|
+
Edit `.env.local`:
|
|
320
|
+
```bash
|
|
321
|
+
ORG_NAME=new-name
|
|
322
|
+
ORG_WEBSITE=https://new-site.com
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
Restart dev server to see changes.
|
|
326
|
+
|
|
327
|
+
### Add Backend Later
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
# 1. Enable backend in .env.local
|
|
331
|
+
ONE_BACKEND=on
|
|
332
|
+
|
|
333
|
+
# 2. Create Convex deployment
|
|
334
|
+
npx convex deploy
|
|
335
|
+
|
|
336
|
+
# 3. Add backend URL
|
|
337
|
+
PUBLIC_CONVEX_URL=https://your-deployment.convex.cloud
|
|
338
|
+
CONVEX_DEPLOYMENT=prod:your-deployment-name
|
|
339
|
+
|
|
340
|
+
# 4. Restart dev server
|
|
341
|
+
bun run dev
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
### Customize Homepage
|
|
345
|
+
|
|
346
|
+
Edit `src/pages/index.astro`:
|
|
347
|
+
```astro
|
|
348
|
+
---
|
|
349
|
+
const isONE = import.meta.env.ORG_NAME === "one";
|
|
350
|
+
const orgName = import.meta.env.ORG_NAME;
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
{!isONE ? (
|
|
354
|
+
<!-- Your custom homepage here -->
|
|
355
|
+
<MyCustomHomepage orgName={orgName} />
|
|
356
|
+
) : (
|
|
357
|
+
<!-- ONE Platform homepage -->
|
|
358
|
+
<ONEHomepage />
|
|
359
|
+
)}
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
## Troubleshooting
|
|
363
|
+
|
|
364
|
+
### Directory already exists
|
|
365
|
+
|
|
366
|
+
```
|
|
367
|
+
Error: Directory "acme-website" already exists
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
**Solution:** Choose a different directory name or remove the existing one
|
|
371
|
+
|
|
372
|
+
### Git clone failed
|
|
373
|
+
|
|
374
|
+
```
|
|
375
|
+
Error: Failed to clone template
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
**Solution:** Check internet connection and retry
|
|
379
|
+
|
|
380
|
+
### Dependencies installation failed
|
|
381
|
+
|
|
382
|
+
```
|
|
383
|
+
Warning: Failed to install dependencies
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
**Solution:** Run manually:
|
|
387
|
+
```bash
|
|
388
|
+
cd acme-website
|
|
389
|
+
bun install
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
## File Structure
|
|
393
|
+
|
|
394
|
+
### Core Files
|
|
395
|
+
|
|
396
|
+
```
|
|
397
|
+
acme-website/
|
|
398
|
+
├── .env.local # Your org configuration ✓
|
|
399
|
+
├── .env.local.example # Template for reference
|
|
400
|
+
├── astro.config.mjs # Astro + React 19 edge config
|
|
401
|
+
├── wrangler.toml # Cloudflare Pages config
|
|
402
|
+
├── package.json # Dependencies
|
|
403
|
+
├── tailwind.config.js # Tailwind CSS v4
|
|
404
|
+
└── tsconfig.json # TypeScript config
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
### Source Files
|
|
408
|
+
|
|
409
|
+
```
|
|
410
|
+
src/
|
|
411
|
+
├── components/
|
|
412
|
+
│ ├── GetStartedPrompt.tsx # Customer org homepage ✓
|
|
413
|
+
│ ├── MinimalSidebar.tsx # Customer org sidebar ✓
|
|
414
|
+
│ ├── Sidebar.tsx # Full navigation
|
|
415
|
+
│ └── ui/ # shadcn/ui components (50+)
|
|
416
|
+
├── layouts/
|
|
417
|
+
│ └── Layout.astro # Main layout
|
|
418
|
+
├── pages/
|
|
419
|
+
│ └── index.astro # Homepage (conditional) ✓
|
|
420
|
+
└── styles/
|
|
421
|
+
└── global.css # Tailwind CSS v4
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
## Next Steps
|
|
425
|
+
|
|
426
|
+
After creating your website:
|
|
427
|
+
|
|
428
|
+
1. **Customize content** in `src/pages/`
|
|
429
|
+
2. **Add blog posts** to `src/content/blog/`
|
|
430
|
+
3. **Configure Cloudflare** for deployment
|
|
431
|
+
4. **Add custom domain** in Cloudflare dashboard
|
|
432
|
+
5. **Enable backend** when you need it
|
|
433
|
+
|
|
434
|
+
## Support
|
|
435
|
+
|
|
436
|
+
- **Documentation:** https://one.ie
|
|
437
|
+
- **GitHub:** https://github.com/one-ie/web
|
|
438
|
+
- **Issues:** https://github.com/one-ie/web/issues
|
|
439
|
+
|
|
440
|
+
---
|
|
441
|
+
|
|
442
|
+
**Built for instant gratification and gradual complexity.**
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
If you discover a security vulnerability in this project, **please help us by reporting it responsibly**. We appreciate your efforts to make the open-source community a safer place!
|
|
2
|
+
|
|
3
|
+
**How to report:**
|
|
4
|
+
|
|
5
|
+
1. **Do Not Create a Public Issue**
|
|
6
|
+
To protect users, please do **not** disclose vulnerabilities publicly in issue trackers, discussions, or forums.
|
|
7
|
+
|
|
8
|
+
2. **Contact Us Privately**
|
|
9
|
+
Email us at [agent@one.ie](mailto:agent@one.ie) with the following details:
|
|
10
|
+
- A clear description of the vulnerability
|
|
11
|
+
- Steps to reproduce the issue
|
|
12
|
+
- Any proof-of-concept code or screenshots, if available
|
|
13
|
+
- Your contact information for follow-up
|
|
14
|
+
|
|
15
|
+
3. **Response Expectations**
|
|
16
|
+
- We aim to respond within **3 business days**.
|
|
17
|
+
- After confirming the issue, we will work with you to remediate it as quickly as possible.
|
|
18
|
+
- We may request additional information to better understand and address the vulnerability.
|
|
19
|
+
|
|
20
|
+
4. **Responsible Disclosure**
|
|
21
|
+
- We ask that you do **not** publicly disclose the vulnerability until we have had a chance to address it.
|
|
22
|
+
- We greatly value responsible reporters and may provide public acknowledgment for your contribution (with your permission).
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## :handshake: Thank You
|
|
27
|
+
|
|
28
|
+
Your efforts help improve the security of the project and the community at large.
|
|
29
|
+
If you have any other questions or concerns about security, feel free to reach out to us.
|
|
30
|
+
|
|
31
|
+
Stay safe and secure!
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# Testing Frontend-First Onboarding
|
|
2
|
+
|
|
3
|
+
## Quick Test Guide
|
|
4
|
+
|
|
5
|
+
### Test 1: ONE Platform Mode (Default)
|
|
6
|
+
|
|
7
|
+
**Setup:**
|
|
8
|
+
```bash
|
|
9
|
+
cd web
|
|
10
|
+
cp .env.local.example .env.local
|
|
11
|
+
# Edit .env.local:
|
|
12
|
+
# ORG_NAME=one (or leave blank)
|
|
13
|
+
# ORG_WEBSITE=https://one.ie (or leave blank)
|
|
14
|
+
bun run dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Expected Result:**
|
|
18
|
+
- Visit http://localhost:4321
|
|
19
|
+
- Should see full ONE Platform homepage
|
|
20
|
+
- Sidebar should show all navigation items (Stream, Language, Ontology, CLI, etc.)
|
|
21
|
+
- Logo should be ONE graphic logo
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
### Test 2: Customer Org Mode
|
|
26
|
+
|
|
27
|
+
**Setup:**
|
|
28
|
+
```bash
|
|
29
|
+
cd web
|
|
30
|
+
# Edit .env.local:
|
|
31
|
+
ORG_NAME=acme
|
|
32
|
+
ORG_WEBSITE=https://acme.com
|
|
33
|
+
ORG_FOLDER=acme
|
|
34
|
+
ONE_BACKEND=off
|
|
35
|
+
|
|
36
|
+
bun run dev
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Expected Result:**
|
|
40
|
+
- Visit http://localhost:4321
|
|
41
|
+
- Should see "Welcome to acme" with GetStartedPrompt
|
|
42
|
+
- Simple prompt: "What would you like to build?"
|
|
43
|
+
- 4 quick start buttons (Ecommerce, Blog, Community, Dashboard)
|
|
44
|
+
- Sidebar should only show:
|
|
45
|
+
- "acme" text logo
|
|
46
|
+
- Blog link
|
|
47
|
+
- License link
|
|
48
|
+
- acme.com website link
|
|
49
|
+
- "Built with ONE Platform" footer
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
### Test 3: Reserved Name Validation
|
|
54
|
+
|
|
55
|
+
**Setup:**
|
|
56
|
+
```bash
|
|
57
|
+
cd cli
|
|
58
|
+
bun run build
|
|
59
|
+
node dist/index.js
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Test Cases:**
|
|
63
|
+
|
|
64
|
+
1. **Reserved Organization Name:**
|
|
65
|
+
```
|
|
66
|
+
Organization name: one
|
|
67
|
+
Expected: ❌ Error: Organization name "one" is reserved for ONE Platform
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
2. **Reserved Website:**
|
|
71
|
+
```
|
|
72
|
+
Website: https://one.ie
|
|
73
|
+
Expected: ❌ Error: Website one.ie is reserved for ONE Platform
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
3. **Valid Names:**
|
|
77
|
+
```
|
|
78
|
+
Organization name: acme ✓
|
|
79
|
+
Website: https://acme.com ✓
|
|
80
|
+
Expected: Creates .env.local with proper configuration
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
### Test 4: Environment Variables Created
|
|
86
|
+
|
|
87
|
+
**After running `npx oneie`:**
|
|
88
|
+
|
|
89
|
+
Check that `.env.local` contains:
|
|
90
|
+
```bash
|
|
91
|
+
# Organization Configuration
|
|
92
|
+
ORG_NAME=acme
|
|
93
|
+
ORG_WEBSITE=https://acme.com
|
|
94
|
+
ORG_FOLDER=acme
|
|
95
|
+
ONE_BACKEND=off
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
### Test 5: Mobile Responsiveness
|
|
101
|
+
|
|
102
|
+
**Customer Org Mode:**
|
|
103
|
+
1. Resize browser to mobile width (< 768px)
|
|
104
|
+
2. Hamburger menu should appear
|
|
105
|
+
3. Click to open sidebar
|
|
106
|
+
4. Should see minimal navigation (Blog + License)
|
|
107
|
+
5. Sidebar should close when clicking outside
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
### Test 6: Backend On/Off Switch
|
|
112
|
+
|
|
113
|
+
**Frontend-Only Mode (`ONE_BACKEND=off`):**
|
|
114
|
+
- No Convex connection attempts
|
|
115
|
+
- No auth flows
|
|
116
|
+
- All pages work statically
|
|
117
|
+
- No console errors about missing backend
|
|
118
|
+
|
|
119
|
+
**Full Platform Mode (`ONE_BACKEND=on`):**
|
|
120
|
+
- Convex client initializes
|
|
121
|
+
- Auth flows available
|
|
122
|
+
- Real-time subscriptions work
|
|
123
|
+
- (Note: Requires valid `PUBLIC_CONVEX_URL` to be set)
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Known Issues
|
|
128
|
+
|
|
129
|
+
### PerformanceChart Hydration Error
|
|
130
|
+
```
|
|
131
|
+
[astro-island] Error hydrating /src/components/features/PerformanceChart.tsx
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Status:** Pre-existing issue, unrelated to onboarding changes
|
|
135
|
+
**Impact:** Does not affect onboarding functionality
|
|
136
|
+
**Fix:** Will be addressed separately
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Files Modified
|
|
141
|
+
|
|
142
|
+
### CLI
|
|
143
|
+
- `cli/src/utils/validation.ts` - Reserved name validation
|
|
144
|
+
- `cli/src/commands/init.ts` - Validation in prompts
|
|
145
|
+
- `cli/src/utils/installation-setup.ts` - `updateOrgEnvFile` function
|
|
146
|
+
|
|
147
|
+
### Frontend
|
|
148
|
+
- `web/src/components/Sidebar.tsx` - Conditional rendering based on ORG_NAME
|
|
149
|
+
- `web/src/components/MinimalSidebar.tsx` - Complete layout for customer orgs
|
|
150
|
+
- `web/src/components/GetStartedPrompt.tsx` - Prompt interface
|
|
151
|
+
- `web/src/layouts/Layout.astro` - Removed custom conditional logic
|
|
152
|
+
- `web/src/pages/index.astro` - Conditional homepage rendering
|
|
153
|
+
|
|
154
|
+
### Documentation
|
|
155
|
+
- `one/things/plans/start-new.md` - Complete implementation guide
|
|
156
|
+
- `web/.env.local.example` - Configuration template
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Success Criteria
|
|
161
|
+
|
|
162
|
+
- [ ] ONE Platform mode shows full homepage ✓
|
|
163
|
+
- [ ] Customer org mode shows GetStartedPrompt ✓
|
|
164
|
+
- [ ] Reserved names are rejected ✓
|
|
165
|
+
- [ ] MinimalSidebar renders correctly ✓
|
|
166
|
+
- [ ] Mobile navigation works ✓
|
|
167
|
+
- [ ] Environment variables created correctly ✓
|
|
168
|
+
- [ ] No TypeScript errors ✓
|
|
169
|
+
- [ ] No console errors (except known PerformanceChart issue) ✓
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Next Steps
|
|
174
|
+
|
|
175
|
+
1. **Test with real organization** (not just "acme")
|
|
176
|
+
2. **Implement AI prompt handling** in GetStartedPrompt
|
|
177
|
+
3. **Create template system** (`web/src/templates/`)
|
|
178
|
+
4. **Add analytics** to track usage patterns
|
|
179
|
+
5. **User testing** with 3-5 beta customers
|
|
180
|
+
6. **Production release** announcement
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
**Status:** Ready for testing ✅
|
|
185
|
+
**Date:** 2025-01-22
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create Website Command
|
|
3
|
+
*
|
|
4
|
+
* Scaffolds a complete website with:
|
|
5
|
+
* - Astro 5 + React 19
|
|
6
|
+
* - Tailwind CSS v4
|
|
7
|
+
* - shadcn/ui components
|
|
8
|
+
* - Configured with organization branding
|
|
9
|
+
*/
|
|
10
|
+
interface WebsiteOptions {
|
|
11
|
+
name?: string;
|
|
12
|
+
orgName?: string;
|
|
13
|
+
orgWebsite?: string;
|
|
14
|
+
directory?: string;
|
|
15
|
+
backendEnabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function createWebsite(options?: WebsiteOptions): Promise<void>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=create-website.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-website.d.ts","sourceRoot":"","sources":["../../src/commands/create-website.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAkBH,UAAU,cAAc;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAsB,aAAa,CAAC,OAAO,GAAE,cAAmB,iBA8B/D"}
|