oneie 3.5.0 → 3.6.3
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-director.md +902 -22
- package/.claude/agents/agent-onboard-example-output.md +600 -0
- package/.claude/agents/agent-onboard.md +576 -0
- package/.claude/commands/ONBOARDING_ENHANCEMENT_SUMMARY.md +266 -0
- package/.claude/commands/deploy.md +77 -150
- package/.claude/commands/one.md +375 -5
- package/.claude/commands/release.md +64 -3
- package/.mcp.json +57 -0
- package/CLAUDE.md +55 -69
- 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 +5 -6
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +213 -103
- package/dist/commands/init.js.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/utils/installation-setup.d.ts +24 -1
- package/dist/utils/installation-setup.d.ts.map +1 -1
- package/dist/utils/installation-setup.js +85 -1
- package/dist/utils/installation-setup.js.map +1 -1
- package/dist/utils/launch-claude.d.ts +6 -0
- package/dist/utils/launch-claude.d.ts.map +1 -0
- package/dist/utils/launch-claude.js +51 -0
- package/dist/utils/launch-claude.js.map +1 -0
- package/dist/utils/validation.d.ts +48 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +73 -0
- package/dist/utils/validation.js.map +1 -0
- package/folders.yaml +1 -1
- package/one/.obsidian/core-plugins.json +33 -0
- package/one/.obsidian/workspace.json +20 -20
- package/one/connections/workflow-onboarding.md +683 -0
- package/one/events/CART-DRAWER-INTEGRATION-GUIDE.md +354 -0
- package/one/events/CRITICAL-FIXES-COMPLETE.md +504 -0
- package/one/events/DEPLOYMENT.md +178 -0
- package/one/events/ECOMMERCE-DEMO-PLAN.md +225 -0
- package/one/events/ECOMMERCE-LIVE-DEMO.md +363 -0
- package/one/events/ECOMMERCE-TEMPLATE-COMPLETE.md +735 -0
- package/one/events/ECOMMERCE-TEMPLATES-SUMMARY.md +923 -0
- package/one/events/GRADIENT-TEXT-PERMANENT-FIX.md +223 -0
- package/one/events/HANDOFF.md +313 -0
- package/one/events/IMPLEMENTATION-SUMMARY-FINAL.md +503 -0
- package/one/events/IMPLEMENTATION_SUMMARY.md +529 -0
- package/one/events/LANDING-PAGE-EXAMPLE-OUTPUT.md +666 -0
- package/one/events/LANDING-PAGE-IMPLEMENTATION.md +642 -0
- package/one/events/LANDING-PAGE-QUICKSTART.md +407 -0
- package/one/events/MULTI-ONTOLOGY-COMPLETE-GUIDE.md +1627 -0
- package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +573 -0
- package/one/events/ONBOARDING-IMPLEMENTATION-COMPLETE copy.md +398 -0
- package/one/events/ONTOLOGY-TUTORIALS-SUMMARY.md +525 -0
- package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +455 -0
- package/one/events/ONTOLOGY_DISCOVERY_IMPLEMENTATION.md +486 -0
- package/one/events/ONTOLOGY_DISCOVERY_QUICKSTART.md +203 -0
- package/one/events/SECURITY-AUDIT-FIXES.md +376 -0
- package/one/events/SECURITY-SCAN-COMPLETE.md +281 -0
- package/one/events/SHOP-BUILD-STATUS.md +114 -0
- package/one/events/SHOP-PREMIUM-UPDATE.md +149 -0
- package/one/events/SITE-WIDE-GRADIENT-FIX.md +299 -0
- package/one/events/STORE-PRODUCTION-READY-STATUS.md +359 -0
- package/one/events/STRIPE-PAYMENT-METHODS-GUIDE.md +429 -0
- package/one/events/agent-director-enhancement-summary.md +386 -0
- package/one/events/agent-onboard-implementation-summary.md +457 -0
- package/one/events/clean-agent-ontology-cleanup-report.md +353 -0
- package/one/events/landing-page-generator.md +458 -0
- package/one/events/onboarding-implementation-complete.md +505 -0
- package/one/events/release.md +254 -0
- package/one/events/separate-implementation-status.md +537 -0
- package/one/knowledge/100-inference-quick-reference.md +431 -0
- package/one/knowledge/agent-onboard-usage.md +612 -0
- package/one/knowledge/cli-claude-handoff.md +718 -0
- package/one/knowledge/ontology-blog.yaml +31 -0
- package/one/knowledge/ontology-cheatsheet.md +591 -0
- package/one/knowledge/ontology-community.yaml +42 -0
- package/one/knowledge/ontology-core-universal.md +722 -0
- package/one/knowledge/ontology-core.yaml +50 -0
- package/one/knowledge/ontology-courses.yaml +53 -0
- package/one/knowledge/ontology-creator.md +376 -0
- package/one/knowledge/ontology-developer-guide.md +789 -0
- package/one/knowledge/ontology-education.md +920 -0
- package/one/knowledge/ontology-index.md +354 -0
- package/one/knowledge/ontology-migration-guide.md +811 -0
- package/one/knowledge/ontology-minimal.yaml +1 -1
- package/one/knowledge/ontology-portfolio.yaml +31 -0
- package/one/knowledge/ontology-quickstart.md +576 -0
- package/one/knowledge/ontology-shop.yaml +121 -0
- package/one/knowledge/ontology-tokens.yaml +32 -0
- package/one/knowledge/ontology-tutorial.md +434 -0
- package/one/knowledge/ontology-video-script.md +890 -0
- package/one/things/docs/ecommerce/ARCHITECTURE-DIAGRAM.md +467 -0
- package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-IMPLEMENTATION.md +408 -0
- package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-SUMMARY.md +369 -0
- package/one/things/docs/ecommerce/CONVERSION-UX-IMPLEMENTATION-SUMMARY.md +396 -0
- package/one/things/docs/ecommerce/FEATURE-SUMMARY.md +468 -0
- package/one/things/docs/ecommerce/IMPLEMENTATION-NOTES.md +582 -0
- package/one/things/docs/ecommerce/INTEGRATION-EXAMPLE.md +449 -0
- package/one/things/docs/ecommerce/QUICK-START.md +368 -0
- package/one/things/docs/ecommerce/URGENCY-IMPLEMENTATION-SUMMARY.md +498 -0
- package/one/things/docs/ecommerce/URGENCY-QUICK-REFERENCE.md +237 -0
- package/one/things/docs/ecommerce/USAGE-EXAMPLE.astro +171 -0
- package/one/things/docs/ecommerce/demo.astro +309 -0
- package/one/things/plans/agent-director-100-inference-plans.md +410 -0
- package/one/things/plans/dual-website-strategy.md +612 -0
- package/one/things/plans/feature-based-sites.md +821 -0
- package/one/things/plans/multi-ontology-architecture.md +836 -0
- package/one/things/plans/onboarding.md +32 -0
- package/one/things/plans/separate.md +15 -17
- package/one/things/plans/start-new.md +738 -0
- package/package.json +7 -2
- package/one/things/claude/hooks/agent-hook-manager.js +0 -525
- package/one/things/claude/hooks/agent-load-balancer.js +0 -271
- package/one/things/claude/hooks/agent-request-interceptor.js +0 -70
- package/one/things/claude/hooks/cascade-feedback.js +0 -297
- package/one/things/claude/hooks/cascade-integration-hooks.js +0 -648
- package/one/things/claude/hooks/continuous-improvement-monitor.js +0 -510
- package/one/things/claude/hooks/file-organization-engine.js +0 -427
- package/one/things/claude/hooks/file-organization-monitor.js +0 -269
- package/one/things/claude/hooks/hook-config-manager.js +0 -202
- package/one/things/claude/hooks/hook-orchestrator.js +0 -662
- package/one/things/claude/hooks/hook-performance-report.js +0 -120
- package/one/things/claude/hooks/mcp-cascade-integration.js +0 -816
- package/one/things/claude/hooks/memory-optimizer.js +0 -510
- package/one/things/claude/hooks/ontology-compliance.js +0 -394
- package/one/things/claude/hooks/ontology-hook-manager.js +0 -316
- package/one/things/claude/hooks/ontology-validation-engine.js +0 -317
- package/one/things/claude/hooks/performance-monitoring-hook.js +0 -422
- package/one/things/claude/hooks/quality-scoring-engine.js +0 -834
- package/one/things/claude/hooks/simple-load-balancer.js +0 -238
- package/one/things/claude/hooks/startup-optimizer.js +0 -625
- package/one/things/claude/hooks/story-scoring-system.js +0 -445
- package/one/things/claude/hooks/story-validation-engine.js +0 -473
- package/one/things/claude/hooks/structure-synchronizer.js +0 -194
- package/one/things/claude/hooks/sub-agent-output-validator.js +0 -647
- package/one/things/claude/hooks/sub-agent-validation-hook.js +0 -343
- package/one/things/claude/hooks/trinity-validation-system.js +0 -392
- package/one/things/plans/organizations-to-groups.md +0 -705
|
@@ -0,0 +1,612 @@
|
|
|
1
|
+
# Dual Website Strategy: one.ie + web.one.ie
|
|
2
|
+
|
|
3
|
+
**Status:** 🎯 Active Plan
|
|
4
|
+
**Created:** 2025-10-19
|
|
5
|
+
**Ontology:** Things (Infrastructure Planning)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Vision
|
|
10
|
+
|
|
11
|
+
Deploy two distinct websites from the ONE Platform codebase:
|
|
12
|
+
|
|
13
|
+
1. **one.ie** - Main marketing site (landing, pricing, features, about)
|
|
14
|
+
2. **web.one.ie** - Demo/playground site (interactive examples, docs, tutorials)
|
|
15
|
+
|
|
16
|
+
**Developer Experience Goal:** Develop both sites simultaneously with minimal context switching and maximum code reuse.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Current State Analysis
|
|
21
|
+
|
|
22
|
+
### Existing Architecture
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
/web/
|
|
26
|
+
├── src/
|
|
27
|
+
│ ├── pages/ # File-based routing
|
|
28
|
+
│ ├── components/ # React + shadcn/ui
|
|
29
|
+
│ ├── layouts/ # Shared layouts
|
|
30
|
+
│ └── content/ # Blog posts
|
|
31
|
+
├── astro.config.mjs # Single config
|
|
32
|
+
├── wrangler.toml # Single Cloudflare config
|
|
33
|
+
└── package.json # Single dependencies
|
|
34
|
+
|
|
35
|
+
Deployment:
|
|
36
|
+
- Project: "web"
|
|
37
|
+
- Current: web.one.ie
|
|
38
|
+
- Build: bun run build
|
|
39
|
+
- Deploy: wrangler pages deploy dist --project-name=web
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Current Limitations
|
|
43
|
+
|
|
44
|
+
- ❌ One domain per deployment
|
|
45
|
+
- ❌ No site-specific routing
|
|
46
|
+
- ❌ Single build output
|
|
47
|
+
- ❌ No way to distinguish marketing vs demo content
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Ultrathinking: 4 Possible Approaches
|
|
52
|
+
|
|
53
|
+
### Approach 1: Two Separate Projects
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
/web-marketing/ → one.ie
|
|
57
|
+
/web-demo/ → web.one.ie
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Pros:**
|
|
61
|
+
- ✅ Complete separation
|
|
62
|
+
- ✅ Different dependencies possible
|
|
63
|
+
- ✅ Clear boundaries
|
|
64
|
+
- ✅ Independent deploys
|
|
65
|
+
|
|
66
|
+
**Cons:**
|
|
67
|
+
- ❌ Code duplication
|
|
68
|
+
- ❌ Two component libraries to maintain
|
|
69
|
+
- ❌ Two build processes
|
|
70
|
+
- ❌ Design system drift risk
|
|
71
|
+
|
|
72
|
+
**Verdict:** ⚠️ Too much duplication for similar sites
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
### Approach 2: Monorepo with Workspaces
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
/web/
|
|
80
|
+
/apps/
|
|
81
|
+
/marketing/ → one.ie
|
|
82
|
+
/demo/ → web.one.ie
|
|
83
|
+
/packages/
|
|
84
|
+
/ui/ → shared components
|
|
85
|
+
/config/ → shared configuration
|
|
86
|
+
package.json → workspace root
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Pros:**
|
|
90
|
+
- ✅ Shared component library
|
|
91
|
+
- ✅ Single `node_modules`
|
|
92
|
+
- ✅ Consistent design system
|
|
93
|
+
- ✅ Independent builds
|
|
94
|
+
- ✅ Clear separation of concerns
|
|
95
|
+
|
|
96
|
+
**Cons:**
|
|
97
|
+
- ⚠️ More complex initial setup
|
|
98
|
+
- ⚠️ Need bun workspace configuration
|
|
99
|
+
- ⚠️ Requires restructuring
|
|
100
|
+
|
|
101
|
+
**Verdict:** ⭐ Best long-term solution (but not immediate)
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
### Approach 3: Single Project, Multi-Config
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
/web/
|
|
109
|
+
/src/
|
|
110
|
+
/sites/
|
|
111
|
+
/marketing/
|
|
112
|
+
/demo/
|
|
113
|
+
astro.config.marketing.mjs
|
|
114
|
+
astro.config.demo.mjs
|
|
115
|
+
package.json → scripts for each site
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Pros:**
|
|
119
|
+
- ✅ Single codebase
|
|
120
|
+
- ✅ Shared components
|
|
121
|
+
- ✅ Environment-based builds
|
|
122
|
+
|
|
123
|
+
**Cons:**
|
|
124
|
+
- ❌ Complex build configuration
|
|
125
|
+
- ❌ Hard to reason about routing
|
|
126
|
+
- ❌ Risk of mixing concerns
|
|
127
|
+
- ❌ Two separate builds needed
|
|
128
|
+
|
|
129
|
+
**Verdict:** ⚠️ Clever but confusing
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
### Approach 4: Content-Based Routing (Shared Build)
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
/web/
|
|
137
|
+
/src/pages/
|
|
138
|
+
/index.astro → one.ie homepage
|
|
139
|
+
/pricing.astro → one.ie pricing
|
|
140
|
+
/demo/index.astro → web.one.ie homepage
|
|
141
|
+
/demo/playground.astro → web.one.ie playground
|
|
142
|
+
/src/config/
|
|
143
|
+
site.ts → PUBLIC_SITE_MODE env var
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Deploy same build to two Cloudflare projects:**
|
|
147
|
+
- Project "marketing" with domain one.ie
|
|
148
|
+
- Project "demo" with domain web.one.ie
|
|
149
|
+
|
|
150
|
+
**Routing Logic:**
|
|
151
|
+
```typescript
|
|
152
|
+
// src/config/site.ts
|
|
153
|
+
export const SITE_MODE = import.meta.env.PUBLIC_SITE_MODE || 'marketing';
|
|
154
|
+
|
|
155
|
+
// src/layouts/Layout.astro
|
|
156
|
+
const showDemoNav = Astro.url.hostname.startsWith('web.');
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**Pros:**
|
|
160
|
+
- ✅ **FASTEST** to implement (< 1 hour)
|
|
161
|
+
- ✅ Zero config changes
|
|
162
|
+
- ✅ One build process
|
|
163
|
+
- ✅ Maximum code reuse
|
|
164
|
+
- ✅ Same components everywhere
|
|
165
|
+
|
|
166
|
+
**Cons:**
|
|
167
|
+
- ⚠️ Sites must be similar architecturally
|
|
168
|
+
- ⚠️ Bundle includes both sites
|
|
169
|
+
- ⚠️ Less flexibility for divergent tech
|
|
170
|
+
|
|
171
|
+
**Verdict:** ⭐⭐⭐ **WINNER for Phase 1** (Quick Win)
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Recommended Strategy: Two-Phase Approach
|
|
176
|
+
|
|
177
|
+
### 🚀 Phase 1: Quick Win (Approach 4)
|
|
178
|
+
|
|
179
|
+
**Goal:** Get two separate sites live in < 1 hour
|
|
180
|
+
|
|
181
|
+
**Implementation:**
|
|
182
|
+
|
|
183
|
+
1. **Add Demo Routes**
|
|
184
|
+
```
|
|
185
|
+
/web/src/pages/demo/
|
|
186
|
+
index.astro # Demo homepage
|
|
187
|
+
playground.astro # Interactive playground
|
|
188
|
+
examples.astro # Code examples
|
|
189
|
+
docs.astro # Documentation
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
2. **Add Site Detection**
|
|
193
|
+
```typescript
|
|
194
|
+
// src/config/site.ts
|
|
195
|
+
export const getSiteConfig = (hostname: string) => {
|
|
196
|
+
if (hostname.startsWith('web.')) {
|
|
197
|
+
return {
|
|
198
|
+
mode: 'demo',
|
|
199
|
+
title: 'ONE Platform Demo',
|
|
200
|
+
nav: ['Playground', 'Examples', 'Docs'],
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
return {
|
|
204
|
+
mode: 'marketing',
|
|
205
|
+
title: 'ONE Platform',
|
|
206
|
+
nav: ['Features', 'Pricing', 'About'],
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
3. **Create Second Cloudflare Project**
|
|
212
|
+
```bash
|
|
213
|
+
# Deploy to marketing (one.ie)
|
|
214
|
+
wrangler pages deploy dist --project-name=marketing
|
|
215
|
+
|
|
216
|
+
# Deploy to demo (web.one.ie)
|
|
217
|
+
wrangler pages deploy dist --project-name=demo
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
4. **Configure Custom Domains**
|
|
221
|
+
- Cloudflare Dashboard → Pages → "marketing" → Add domain: one.ie
|
|
222
|
+
- Cloudflare Dashboard → Pages → "demo" → Keep domain: web.one.ie
|
|
223
|
+
|
|
224
|
+
**Time to Deploy:** ~30-60 minutes
|
|
225
|
+
|
|
226
|
+
**Result:**
|
|
227
|
+
- ✅ one.ie shows marketing content
|
|
228
|
+
- ✅ web.one.ie shows demo content
|
|
229
|
+
- ✅ Shared components, single build
|
|
230
|
+
- ✅ Easy to develop both simultaneously
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
### 🏗️ Phase 2: Scale to Monorepo (Approach 2)
|
|
235
|
+
|
|
236
|
+
**Goal:** When sites diverge significantly, migrate to proper monorepo
|
|
237
|
+
|
|
238
|
+
**Trigger Conditions:**
|
|
239
|
+
- Different dependencies needed
|
|
240
|
+
- Separate deployment cadences
|
|
241
|
+
- Different team ownership
|
|
242
|
+
- Significantly different page count (>50 pages each)
|
|
243
|
+
|
|
244
|
+
**Implementation:**
|
|
245
|
+
|
|
246
|
+
1. **Create Workspace Structure**
|
|
247
|
+
```
|
|
248
|
+
/web/
|
|
249
|
+
package.json # workspace root
|
|
250
|
+
/apps/
|
|
251
|
+
/marketing/
|
|
252
|
+
package.json
|
|
253
|
+
astro.config.mjs
|
|
254
|
+
src/
|
|
255
|
+
/demo/
|
|
256
|
+
package.json
|
|
257
|
+
astro.config.mjs
|
|
258
|
+
src/
|
|
259
|
+
/packages/
|
|
260
|
+
/ui/
|
|
261
|
+
package.json
|
|
262
|
+
src/components/
|
|
263
|
+
/config/
|
|
264
|
+
package.json
|
|
265
|
+
src/
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
2. **Bun Workspace Configuration**
|
|
269
|
+
```json
|
|
270
|
+
// /web/package.json
|
|
271
|
+
{
|
|
272
|
+
"name": "one-platform-web",
|
|
273
|
+
"workspaces": [
|
|
274
|
+
"apps/*",
|
|
275
|
+
"packages/*"
|
|
276
|
+
]
|
|
277
|
+
}
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
3. **Shared UI Package**
|
|
281
|
+
```json
|
|
282
|
+
// /web/packages/ui/package.json
|
|
283
|
+
{
|
|
284
|
+
"name": "@one/ui",
|
|
285
|
+
"exports": {
|
|
286
|
+
"./button": "./src/components/ui/button.tsx",
|
|
287
|
+
"./card": "./src/components/ui/card.tsx"
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
4. **Independent Deployments**
|
|
293
|
+
```bash
|
|
294
|
+
# Marketing site
|
|
295
|
+
cd apps/marketing && bun run build
|
|
296
|
+
wrangler pages deploy dist --project-name=marketing
|
|
297
|
+
|
|
298
|
+
# Demo site
|
|
299
|
+
cd apps/demo && bun run build
|
|
300
|
+
wrangler pages deploy dist --project-name=demo
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
**Time to Migrate:** ~4-8 hours
|
|
304
|
+
|
|
305
|
+
**Result:**
|
|
306
|
+
- ✅ Complete separation
|
|
307
|
+
- ✅ Shared component library
|
|
308
|
+
- ✅ Independent deploys
|
|
309
|
+
- ✅ Scalable architecture
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## Development Workflow (Phase 1)
|
|
314
|
+
|
|
315
|
+
### Daily Development
|
|
316
|
+
|
|
317
|
+
```bash
|
|
318
|
+
# Start dev server
|
|
319
|
+
cd web
|
|
320
|
+
bun run dev
|
|
321
|
+
|
|
322
|
+
# Browse both sites locally
|
|
323
|
+
open http://localhost:4321 # Marketing site
|
|
324
|
+
open http://localhost:4321/demo # Demo site
|
|
325
|
+
|
|
326
|
+
# Make changes to shared components
|
|
327
|
+
# Both sites update automatically
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
### Creating Marketing Pages
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
# Create new marketing page
|
|
334
|
+
touch web/src/pages/pricing.astro
|
|
335
|
+
|
|
336
|
+
# It's automatically available at:
|
|
337
|
+
# - http://localhost:4321/pricing
|
|
338
|
+
# - https://one.ie/pricing (after deploy)
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
### Creating Demo Pages
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
# Create new demo page
|
|
345
|
+
touch web/src/pages/demo/playground.astro
|
|
346
|
+
|
|
347
|
+
# It's automatically available at:
|
|
348
|
+
# - http://localhost:4321/demo/playground
|
|
349
|
+
# - https://web.one.ie/demo/playground (after deploy)
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### Deployment Workflow
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
# Build once
|
|
356
|
+
cd web
|
|
357
|
+
bun run build
|
|
358
|
+
|
|
359
|
+
# Deploy to both sites
|
|
360
|
+
wrangler pages deploy dist --project-name=marketing # → one.ie
|
|
361
|
+
wrangler pages deploy dist --project-name=demo # → web.one.ie
|
|
362
|
+
|
|
363
|
+
# Or use deploy script
|
|
364
|
+
./scripts/deploy-both-sites.sh
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
369
|
+
## Implementation Checklist
|
|
370
|
+
|
|
371
|
+
### Phase 1 Setup (< 1 Hour)
|
|
372
|
+
|
|
373
|
+
- [ ] Create `/web/src/pages/demo/` directory
|
|
374
|
+
- [ ] Add demo homepage (`demo/index.astro`)
|
|
375
|
+
- [ ] Add site detection to `src/config/site.ts`
|
|
376
|
+
- [ ] Update navigation component to show different menus
|
|
377
|
+
- [ ] Create Cloudflare Pages project "marketing"
|
|
378
|
+
- [ ] Configure custom domain one.ie on "marketing" project
|
|
379
|
+
- [ ] Deploy build to both projects
|
|
380
|
+
- [ ] Test both sites work independently
|
|
381
|
+
- [ ] Update documentation
|
|
382
|
+
|
|
383
|
+
### Phase 2 Migration (When Needed)
|
|
384
|
+
|
|
385
|
+
- [ ] Create workspace structure
|
|
386
|
+
- [ ] Extract shared components to `/packages/ui`
|
|
387
|
+
- [ ] Split pages into `/apps/marketing` and `/apps/demo`
|
|
388
|
+
- [ ] Configure bun workspaces
|
|
389
|
+
- [ ] Update build scripts
|
|
390
|
+
- [ ] Test independent deploys
|
|
391
|
+
- [ ] Migrate CI/CD pipelines
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
## File Structure (Phase 1)
|
|
396
|
+
|
|
397
|
+
```
|
|
398
|
+
/web/
|
|
399
|
+
├── src/
|
|
400
|
+
│ ├── pages/
|
|
401
|
+
│ │ ├── index.astro # one.ie homepage
|
|
402
|
+
│ │ ├── features.astro # one.ie features
|
|
403
|
+
│ │ ├── pricing.astro # one.ie pricing
|
|
404
|
+
│ │ └── demo/
|
|
405
|
+
│ │ ├── index.astro # web.one.ie homepage
|
|
406
|
+
│ │ ├── playground.astro # Interactive playground
|
|
407
|
+
│ │ ├── examples.astro # Code examples
|
|
408
|
+
│ │ └── docs/
|
|
409
|
+
│ │ └── [...slug].astro # Documentation pages
|
|
410
|
+
│ ├── components/
|
|
411
|
+
│ │ ├── marketing/ # Marketing-specific components
|
|
412
|
+
│ │ ├── demo/ # Demo-specific components
|
|
413
|
+
│ │ └── ui/ # Shared shadcn/ui components
|
|
414
|
+
│ ├── layouts/
|
|
415
|
+
│ │ ├── MarketingLayout.astro # Layout for one.ie
|
|
416
|
+
│ │ └── DemoLayout.astro # Layout for web.one.ie
|
|
417
|
+
│ └── config/
|
|
418
|
+
│ └── site.ts # Site detection logic
|
|
419
|
+
├── astro.config.mjs # Single config
|
|
420
|
+
├── wrangler.toml # Single config
|
|
421
|
+
└── package.json # Single dependencies
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
---
|
|
425
|
+
|
|
426
|
+
## Deployment Configuration
|
|
427
|
+
|
|
428
|
+
### Cloudflare Projects
|
|
429
|
+
|
|
430
|
+
```toml
|
|
431
|
+
# Project 1: "marketing"
|
|
432
|
+
name = "marketing"
|
|
433
|
+
pages_build_output_dir = "dist"
|
|
434
|
+
custom_domain = "one.ie"
|
|
435
|
+
|
|
436
|
+
# Project 2: "demo"
|
|
437
|
+
name = "demo"
|
|
438
|
+
pages_build_output_dir = "dist"
|
|
439
|
+
custom_domain = "web.one.ie"
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
### Environment Variables
|
|
443
|
+
|
|
444
|
+
Both projects use the same env vars:
|
|
445
|
+
|
|
446
|
+
```bash
|
|
447
|
+
PUBLIC_CONVEX_URL=https://shocking-falcon-870.convex.cloud
|
|
448
|
+
CONVEX_DEPLOYMENT=prod:shocking-falcon-870
|
|
449
|
+
BETTER_AUTH_URL=https://one.ie # or https://web.one.ie
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
### Deploy Script
|
|
453
|
+
|
|
454
|
+
```bash
|
|
455
|
+
#!/usr/bin/env bash
|
|
456
|
+
# scripts/deploy-both-sites.sh
|
|
457
|
+
|
|
458
|
+
set -e
|
|
459
|
+
|
|
460
|
+
echo "🔨 Building web app..."
|
|
461
|
+
cd web
|
|
462
|
+
bun run build
|
|
463
|
+
|
|
464
|
+
echo "🚀 Deploying to one.ie..."
|
|
465
|
+
wrangler pages deploy dist --project-name=marketing --branch=main
|
|
466
|
+
|
|
467
|
+
echo "🚀 Deploying to web.one.ie..."
|
|
468
|
+
wrangler pages deploy dist --project-name=demo --branch=main
|
|
469
|
+
|
|
470
|
+
echo "✅ Both sites deployed successfully!"
|
|
471
|
+
echo " • Marketing: https://one.ie"
|
|
472
|
+
echo " • Demo: https://web.one.ie"
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
---
|
|
476
|
+
|
|
477
|
+
## Benefits of This Strategy
|
|
478
|
+
|
|
479
|
+
### Immediate Benefits (Phase 1)
|
|
480
|
+
|
|
481
|
+
1. **Speed** - Live in < 1 hour
|
|
482
|
+
2. **Simplicity** - One build, two deploys
|
|
483
|
+
3. **Code Reuse** - Shared components automatically
|
|
484
|
+
4. **Easy Development** - See both sites at once
|
|
485
|
+
5. **Low Risk** - Minimal changes to existing setup
|
|
486
|
+
|
|
487
|
+
### Long-Term Benefits (Phase 2)
|
|
488
|
+
|
|
489
|
+
1. **Scalability** - Independent scaling per site
|
|
490
|
+
2. **Team Structure** - Different teams can own different sites
|
|
491
|
+
3. **Deploy Independence** - Deploy marketing without affecting demo
|
|
492
|
+
4. **Dependency Isolation** - Different tech stacks if needed
|
|
493
|
+
5. **Performance** - Smaller bundles per site
|
|
494
|
+
|
|
495
|
+
---
|
|
496
|
+
|
|
497
|
+
## Success Metrics
|
|
498
|
+
|
|
499
|
+
### Phase 1 Success
|
|
500
|
+
|
|
501
|
+
- [ ] one.ie resolves to marketing content
|
|
502
|
+
- [ ] web.one.ie resolves to demo content
|
|
503
|
+
- [ ] Both sites share same components
|
|
504
|
+
- [ ] Single `bun run dev` works for both
|
|
505
|
+
- [ ] Deploy time < 5 minutes for both sites
|
|
506
|
+
|
|
507
|
+
### Phase 2 Success
|
|
508
|
+
|
|
509
|
+
- [ ] Independent builds complete in parallel
|
|
510
|
+
- [ ] Shared UI package used by both apps
|
|
511
|
+
- [ ] Marketing deploy doesn't affect demo
|
|
512
|
+
- [ ] Bundle size reduced by 30%+
|
|
513
|
+
- [ ] Team velocity increases
|
|
514
|
+
|
|
515
|
+
---
|
|
516
|
+
|
|
517
|
+
## Migration Path
|
|
518
|
+
|
|
519
|
+
### Now → Phase 1 (Week 1)
|
|
520
|
+
|
|
521
|
+
```bash
|
|
522
|
+
# Day 1: Setup
|
|
523
|
+
- Create demo pages
|
|
524
|
+
- Add site detection
|
|
525
|
+
- Create marketing Cloudflare project
|
|
526
|
+
|
|
527
|
+
# Day 2: Deploy
|
|
528
|
+
- Deploy to both projects
|
|
529
|
+
- Configure custom domains
|
|
530
|
+
- Test both sites
|
|
531
|
+
|
|
532
|
+
# Day 3: Polish
|
|
533
|
+
- Update documentation
|
|
534
|
+
- Train team on workflow
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
### Phase 1 → Phase 2 (When Needed)
|
|
538
|
+
|
|
539
|
+
**Trigger:** Site complexity reaches threshold
|
|
540
|
+
|
|
541
|
+
**Process:**
|
|
542
|
+
1. Create workspace structure (1 day)
|
|
543
|
+
2. Extract shared components (2 days)
|
|
544
|
+
3. Split pages (1 day)
|
|
545
|
+
4. Update CI/CD (1 day)
|
|
546
|
+
5. Test & validate (1 day)
|
|
547
|
+
|
|
548
|
+
**Total:** ~1 week
|
|
549
|
+
|
|
550
|
+
---
|
|
551
|
+
|
|
552
|
+
## Decision Matrix
|
|
553
|
+
|
|
554
|
+
| Factor | Approach 1 | Approach 2 | Approach 3 | Approach 4 |
|
|
555
|
+
|--------|-----------|-----------|-----------|-----------|
|
|
556
|
+
| **Speed to Ship** | 🟡 Medium | 🔴 Slow | 🟡 Medium | 🟢 Fast |
|
|
557
|
+
| **Code Reuse** | 🔴 Low | 🟢 High | 🟢 High | 🟢 High |
|
|
558
|
+
| **Complexity** | 🟢 Low | 🟡 Medium | 🔴 High | 🟢 Low |
|
|
559
|
+
| **Scalability** | 🟡 Medium | 🟢 High | 🟡 Medium | 🔴 Low |
|
|
560
|
+
| **Maintenance** | 🔴 High | 🟢 Low | 🟡 Medium | 🟢 Low |
|
|
561
|
+
| **Team Velocity** | 🔴 Slow | 🟢 Fast | 🟡 Medium | 🟢 Fast |
|
|
562
|
+
|
|
563
|
+
**Winner:** Approach 4 now → Approach 2 later
|
|
564
|
+
|
|
565
|
+
---
|
|
566
|
+
|
|
567
|
+
## Open Questions
|
|
568
|
+
|
|
569
|
+
1. **Content Strategy**
|
|
570
|
+
- What pages go on one.ie vs web.one.ie?
|
|
571
|
+
- How much overlap is acceptable?
|
|
572
|
+
|
|
573
|
+
2. **User Journey**
|
|
574
|
+
- Should users seamlessly move between sites?
|
|
575
|
+
- Or keep them completely separate?
|
|
576
|
+
|
|
577
|
+
3. **Analytics**
|
|
578
|
+
- Separate tracking for each site?
|
|
579
|
+
- Or unified view?
|
|
580
|
+
|
|
581
|
+
4. **SEO**
|
|
582
|
+
- How to handle duplicate content?
|
|
583
|
+
- Canonical URLs strategy?
|
|
584
|
+
|
|
585
|
+
---
|
|
586
|
+
|
|
587
|
+
## Next Steps
|
|
588
|
+
|
|
589
|
+
1. **Review this plan** with team
|
|
590
|
+
2. **Answer open questions** above
|
|
591
|
+
3. **Create demo pages** structure
|
|
592
|
+
4. **Implement Phase 1** (< 1 day)
|
|
593
|
+
5. **Deploy and test** both sites
|
|
594
|
+
6. **Monitor** for 1-2 months
|
|
595
|
+
7. **Decide** on Phase 2 migration
|
|
596
|
+
|
|
597
|
+
---
|
|
598
|
+
|
|
599
|
+
## References
|
|
600
|
+
|
|
601
|
+
- [Astro Docs: Environment Variables](https://docs.astro.build/en/guides/environment-variables/)
|
|
602
|
+
- [Cloudflare Pages: Custom Domains](https://developers.cloudflare.com/pages/platform/custom-domains/)
|
|
603
|
+
- [Bun Workspaces](https://bun.sh/docs/install/workspaces)
|
|
604
|
+
- `/web/astro.config.mjs` - Current Astro config
|
|
605
|
+
- `/web/wrangler.toml` - Current Cloudflare config
|
|
606
|
+
- `/scripts/cloudflare-deploy.sh` - Deployment script
|
|
607
|
+
|
|
608
|
+
---
|
|
609
|
+
|
|
610
|
+
**Status:** 📝 Ready for Implementation
|
|
611
|
+
**Recommended:** Start with Phase 1 (Approach 4)
|
|
612
|
+
**Timeline:** Phase 1 in 1 day, Phase 2 when needed
|