oneie 3.4.2 → 3.6.0

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 (143) hide show
  1. package/.claude/agents/agent-director.md +902 -22
  2. package/.claude/agents/agent-onboard-example-output.md +600 -0
  3. package/.claude/agents/agent-onboard.md +576 -0
  4. package/.claude/commands/ONBOARDING_ENHANCEMENT_SUMMARY.md +266 -0
  5. package/.claude/commands/one.md +411 -10
  6. package/.claude/commands/release.md +64 -3
  7. package/CLAUDE.md +55 -69
  8. package/dist/commands/init.d.ts +5 -6
  9. package/dist/commands/init.d.ts.map +1 -1
  10. package/dist/commands/init.js +101 -101
  11. package/dist/commands/init.js.map +1 -1
  12. package/dist/index.js +6 -5
  13. package/dist/index.js.map +1 -1
  14. package/dist/utils/installation-setup.d.ts +24 -1
  15. package/dist/utils/installation-setup.d.ts.map +1 -1
  16. package/dist/utils/installation-setup.js +85 -1
  17. package/dist/utils/installation-setup.js.map +1 -1
  18. package/dist/utils/launch-claude.d.ts +6 -0
  19. package/dist/utils/launch-claude.d.ts.map +1 -0
  20. package/dist/utils/launch-claude.js +51 -0
  21. package/dist/utils/launch-claude.js.map +1 -0
  22. package/dist/utils/validation.d.ts +48 -0
  23. package/dist/utils/validation.d.ts.map +1 -0
  24. package/dist/utils/validation.js +73 -0
  25. package/dist/utils/validation.js.map +1 -0
  26. package/folders.yaml +1 -1
  27. package/one/.obsidian/app.json +8 -0
  28. package/one/.obsidian/appearance.json +1 -0
  29. package/one/.obsidian/community-plugins.json +3 -0
  30. package/one/.obsidian/core-plugins.json +33 -0
  31. package/one/.obsidian/plugins/easy-bake/main.js +361 -0
  32. package/one/.obsidian/plugins/easy-bake/manifest.json +11 -0
  33. package/one/.obsidian/plugins/easy-bake/styles.css +10 -0
  34. package/one/.obsidian/workspace.json +240 -0
  35. package/one/connections/workflow-onboarding.md +683 -0
  36. package/one/events/CART-DRAWER-INTEGRATION-GUIDE.md +354 -0
  37. package/one/events/CRITICAL-FIXES-COMPLETE.md +504 -0
  38. package/one/events/DEPLOYMENT.md +178 -0
  39. package/one/events/ECOMMERCE-DEMO-PLAN.md +225 -0
  40. package/one/events/ECOMMERCE-LIVE-DEMO.md +363 -0
  41. package/one/events/ECOMMERCE-TEMPLATE-COMPLETE.md +735 -0
  42. package/one/events/ECOMMERCE-TEMPLATES-SUMMARY.md +923 -0
  43. package/one/events/GRADIENT-TEXT-PERMANENT-FIX.md +223 -0
  44. package/one/events/HANDOFF.md +313 -0
  45. package/one/events/IMPLEMENTATION-SUMMARY-FINAL.md +503 -0
  46. package/one/events/IMPLEMENTATION_SUMMARY.md +529 -0
  47. package/one/events/LANDING-PAGE-EXAMPLE-OUTPUT.md +666 -0
  48. package/one/events/LANDING-PAGE-IMPLEMENTATION.md +642 -0
  49. package/one/events/LANDING-PAGE-QUICKSTART.md +407 -0
  50. package/one/events/MULTI-ONTOLOGY-COMPLETE-GUIDE.md +1627 -0
  51. package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +573 -0
  52. package/one/events/ONBOARDING-IMPLEMENTATION-COMPLETE copy.md +398 -0
  53. package/one/events/ONTOLOGY-TUTORIALS-SUMMARY.md +525 -0
  54. package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +455 -0
  55. package/one/events/ONTOLOGY_DISCOVERY_IMPLEMENTATION.md +486 -0
  56. package/one/events/ONTOLOGY_DISCOVERY_QUICKSTART.md +203 -0
  57. package/one/events/SECURITY-AUDIT-FIXES.md +376 -0
  58. package/one/events/SECURITY-SCAN-COMPLETE.md +281 -0
  59. package/one/events/SHOP-BUILD-STATUS.md +114 -0
  60. package/one/events/SHOP-PREMIUM-UPDATE.md +149 -0
  61. package/one/events/SITE-WIDE-GRADIENT-FIX.md +299 -0
  62. package/one/events/STORE-PRODUCTION-READY-STATUS.md +359 -0
  63. package/one/events/STRIPE-PAYMENT-METHODS-GUIDE.md +429 -0
  64. package/one/events/agent-director-enhancement-summary.md +386 -0
  65. package/one/events/agent-onboard-implementation-summary.md +457 -0
  66. package/one/events/clean-agent-ontology-cleanup-report.md +353 -0
  67. package/one/events/landing-page-generator.md +458 -0
  68. package/one/events/onboarding-implementation-complete.md +505 -0
  69. package/one/events/release.md +254 -0
  70. package/one/events/separate-implementation-status.md +537 -0
  71. package/one/groups/nine-padle-contents.baked.md +1252 -0
  72. package/one/groups/nine-padle-contents.md +6 -0
  73. package/one/knowledge/100-inference-quick-reference.md +431 -0
  74. package/one/knowledge/agent-onboard-usage.md +612 -0
  75. package/one/knowledge/cli-claude-handoff.md +718 -0
  76. package/one/knowledge/installation-folders.md +45 -1
  77. package/one/knowledge/ontology-blog.yaml +31 -0
  78. package/one/knowledge/ontology-cheatsheet.md +591 -0
  79. package/one/knowledge/ontology-community.yaml +42 -0
  80. package/one/knowledge/ontology-core-universal.md +722 -0
  81. package/one/knowledge/ontology-core.yaml +50 -0
  82. package/one/knowledge/ontology-courses.yaml +53 -0
  83. package/one/knowledge/ontology-creator.md +376 -0
  84. package/one/knowledge/ontology-developer-guide.md +789 -0
  85. package/one/knowledge/ontology-education.md +920 -0
  86. package/one/knowledge/ontology-index.md +354 -0
  87. package/one/knowledge/ontology-migration-guide.md +811 -0
  88. package/one/knowledge/ontology-minimal.yaml +1 -1
  89. package/one/knowledge/ontology-portfolio.yaml +31 -0
  90. package/one/knowledge/ontology-quickstart.md +576 -0
  91. package/one/knowledge/ontology-shop.yaml +121 -0
  92. package/one/knowledge/ontology-tokens.yaml +32 -0
  93. package/one/knowledge/ontology-tutorial.md +434 -0
  94. package/one/knowledge/ontology-video-script.md +890 -0
  95. package/one/things/docs/ecommerce/ARCHITECTURE-DIAGRAM.md +467 -0
  96. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-IMPLEMENTATION.md +408 -0
  97. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-SUMMARY.md +369 -0
  98. package/one/things/docs/ecommerce/CONVERSION-UX-IMPLEMENTATION-SUMMARY.md +396 -0
  99. package/one/things/docs/ecommerce/FEATURE-SUMMARY.md +468 -0
  100. package/one/things/docs/ecommerce/IMPLEMENTATION-NOTES.md +582 -0
  101. package/one/things/docs/ecommerce/INTEGRATION-EXAMPLE.md +449 -0
  102. package/one/things/docs/ecommerce/QUICK-START.md +368 -0
  103. package/one/things/docs/ecommerce/URGENCY-IMPLEMENTATION-SUMMARY.md +498 -0
  104. package/one/things/docs/ecommerce/URGENCY-QUICK-REFERENCE.md +237 -0
  105. package/one/things/docs/ecommerce/USAGE-EXAMPLE.astro +171 -0
  106. package/one/things/docs/ecommerce/demo.astro +309 -0
  107. package/one/things/plans/agent-director-100-inference-plans.md +410 -0
  108. package/one/things/plans/dual-website-strategy.md +612 -0
  109. package/one/things/plans/feature-based-sites.md +821 -0
  110. package/one/things/plans/multi-ontology-architecture.md +836 -0
  111. package/one/things/plans/onboarding.md +32 -0
  112. package/one/things/plans/separate.md +15 -17
  113. package/one/things/plans/start-new.md +738 -0
  114. package/one/things/templates.md +254 -0
  115. package/one/things/todo.md +23 -5
  116. package/package.json +2 -2
  117. package/one/things/claude/hooks/agent-hook-manager.js +0 -525
  118. package/one/things/claude/hooks/agent-load-balancer.js +0 -271
  119. package/one/things/claude/hooks/agent-request-interceptor.js +0 -70
  120. package/one/things/claude/hooks/cascade-feedback.js +0 -297
  121. package/one/things/claude/hooks/cascade-integration-hooks.js +0 -648
  122. package/one/things/claude/hooks/continuous-improvement-monitor.js +0 -510
  123. package/one/things/claude/hooks/file-organization-engine.js +0 -427
  124. package/one/things/claude/hooks/file-organization-monitor.js +0 -269
  125. package/one/things/claude/hooks/hook-config-manager.js +0 -202
  126. package/one/things/claude/hooks/hook-orchestrator.js +0 -662
  127. package/one/things/claude/hooks/hook-performance-report.js +0 -120
  128. package/one/things/claude/hooks/mcp-cascade-integration.js +0 -816
  129. package/one/things/claude/hooks/memory-optimizer.js +0 -510
  130. package/one/things/claude/hooks/ontology-compliance.js +0 -394
  131. package/one/things/claude/hooks/ontology-hook-manager.js +0 -316
  132. package/one/things/claude/hooks/ontology-validation-engine.js +0 -317
  133. package/one/things/claude/hooks/performance-monitoring-hook.js +0 -422
  134. package/one/things/claude/hooks/quality-scoring-engine.js +0 -834
  135. package/one/things/claude/hooks/simple-load-balancer.js +0 -238
  136. package/one/things/claude/hooks/startup-optimizer.js +0 -625
  137. package/one/things/claude/hooks/story-scoring-system.js +0 -445
  138. package/one/things/claude/hooks/story-validation-engine.js +0 -473
  139. package/one/things/claude/hooks/structure-synchronizer.js +0 -194
  140. package/one/things/claude/hooks/sub-agent-output-validator.js +0 -647
  141. package/one/things/claude/hooks/sub-agent-validation-hook.js +0 -343
  142. package/one/things/claude/hooks/trinity-validation-system.js +0 -392
  143. package/one/things/plans/organizations-to-groups.md +0 -705
@@ -0,0 +1,821 @@
1
+ # Feature-Based Multi-Site Architecture
2
+
3
+ **Status:** 🎯 Active Plan
4
+ **Created:** 2025-10-19
5
+ **Ontology:** Things (Infrastructure Planning)
6
+
7
+ ---
8
+
9
+ ## Vision
10
+
11
+ Build websites by **enabling features**, not selecting templates. Users mix and match features to create exactly what they need.
12
+
13
+ ### The Shift: From Templates to Features
14
+
15
+ **❌ Template-Based (Rigid):**
16
+ ```bash
17
+ PUBLIC_SITE_TEMPLATE=creator # Gets: portfolio, blog, courses
18
+ PUBLIC_SITE_TEMPLATE=ecommerce # Gets: shop, cart, checkout
19
+ # Problem: What if you want portfolio + shop + courses?
20
+ ```
21
+
22
+ **✅ Feature-Based (Flexible):**
23
+ ```bash
24
+ # Enable exactly what you need
25
+ PUBLIC_FEATURES=blog,portfolio,shop,courses,community,tokens
26
+ # Or start blank and add features one at a time
27
+ PUBLIC_FEATURES=blank # Minimal starter, add features later
28
+ ```
29
+
30
+ ---
31
+
32
+ ## Core Concept: Feature Flags
33
+
34
+ ### Environment Variables Control Features
35
+
36
+ ```bash
37
+ # .env.local or Cloudflare environment
38
+ PUBLIC_SITE_NAME="Jane Doe"
39
+ PUBLIC_FEATURES=portfolio,blog,courses,shop,community,tokens
40
+
41
+ # Each feature adds:
42
+ # - Routes (/courses, /shop, etc.)
43
+ # - Components (CourseCard, ProductGrid, etc.)
44
+ # - Navigation items
45
+ # - Database tables/functions
46
+ ```
47
+
48
+ ### How Features Work
49
+
50
+ ```typescript
51
+ // src/config/features.ts
52
+ export type Feature =
53
+ | 'blank' // Minimal starter (homepage, about, contact)
54
+ | 'blog' // Content hub
55
+ | 'portfolio' // Project showcase
56
+ | 'courses' // Course platform
57
+ | 'shop' // Ecommerce
58
+ | 'community' // Forums/chat
59
+ | 'tokens' // Creator tokens
60
+ | 'library' // Resource library
61
+ | 'events' // Event management
62
+ | 'booking' // Appointment scheduling
63
+ | 'membership' // Subscription tiers
64
+ | 'analytics'; // Dashboard & insights
65
+
66
+ export const FEATURES = (
67
+ import.meta.env.PUBLIC_FEATURES || 'blank'
68
+ ).split(',').map(f => f.trim()) as Feature[];
69
+
70
+ export const hasFeature = (feature: Feature) =>
71
+ FEATURES.includes(feature) || FEATURES.includes('all');
72
+ ```
73
+
74
+ ---
75
+
76
+ ## Feature Catalog
77
+
78
+ ### 1. Blank (Starter)
79
+
80
+ **Perfect for:** Starting from scratch, custom builds
81
+
82
+ **Includes:**
83
+ - Homepage (hero + CTA)
84
+ - About page
85
+ - Contact page
86
+ - Basic navigation
87
+
88
+ **Routes:**
89
+ - `/`
90
+ - `/about`
91
+ - `/contact`
92
+
93
+ **No backend needed** - Pure static pages
94
+
95
+ ---
96
+
97
+ ### 2. Blog
98
+
99
+ **Perfect for:** Content creators, writers, marketers
100
+
101
+ **Includes:**
102
+ - Blog listing (grid/list views)
103
+ - Individual blog posts
104
+ - Categories & tags
105
+ - Search & filtering
106
+ - RSS feed
107
+
108
+ **Routes:**
109
+ - `/blog`
110
+ - `/blog/[slug]`
111
+ - `/blog/category/[category]`
112
+
113
+ **Backend needs:** `things` table (type: `blog_post`)
114
+
115
+ ---
116
+
117
+ ### 3. Portfolio
118
+
119
+ **Perfect for:** Artists, designers, developers
120
+
121
+ **Includes:**
122
+ - Project showcase
123
+ - Case studies
124
+ - Image galleries
125
+ - Client testimonials
126
+
127
+ **Routes:**
128
+ - `/portfolio`
129
+ - `/portfolio/[project-slug]`
130
+
131
+ **Backend needs:** `things` table (type: `project`)
132
+
133
+ ---
134
+
135
+ ### 4. Courses
136
+
137
+ **Perfect for:** Educators, coaches, trainers
138
+
139
+ **Includes:**
140
+ - Course catalog
141
+ - Lesson pages
142
+ - Progress tracking
143
+ - Quizzes & assessments
144
+ - Certificates
145
+
146
+ **Routes:**
147
+ - `/courses`
148
+ - `/courses/[slug]`
149
+ - `/courses/[slug]/lessons/[lesson]`
150
+ - `/dashboard` (student progress)
151
+
152
+ **Backend needs:**
153
+ - `things` table (type: `course`, `lesson`)
154
+ - `connections` table (relationshipType: `enrolled_in`)
155
+ - `events` table (type: `lesson_completed`)
156
+
157
+ ---
158
+
159
+ ### 5. Shop
160
+
161
+ **Perfect for:** Product sellers, brands, merchants
162
+
163
+ **Includes:**
164
+ - Product catalog
165
+ - Product pages
166
+ - Shopping cart
167
+ - Checkout flow
168
+ - Order management
169
+
170
+ **Routes:**
171
+ - `/shop`
172
+ - `/shop/[product-slug]`
173
+ - `/cart`
174
+ - `/checkout`
175
+ - `/orders`
176
+
177
+ **Backend needs:**
178
+ - `things` table (type: `product`)
179
+ - `connections` table (relationshipType: `purchased`)
180
+ - `events` table (type: `order_placed`)
181
+ - Stripe integration
182
+
183
+ ---
184
+
185
+ ### 6. Community
186
+
187
+ **Perfect for:** Building engaged audiences
188
+
189
+ **Includes:**
190
+ - Discussion forums
191
+ - Chat rooms
192
+ - Member directory
193
+ - Direct messaging
194
+
195
+ **Routes:**
196
+ - `/community`
197
+ - `/community/topics/[topic]`
198
+ - `/community/members`
199
+ - `/community/messages`
200
+
201
+ **Backend needs:**
202
+ - `things` table (type: `forum_topic`, `message`)
203
+ - `connections` table (relationshipType: `follows`, `member_of`)
204
+ - Real-time subscriptions
205
+
206
+ ---
207
+
208
+ ### 7. Tokens
209
+
210
+ **Perfect for:** Creator economy, fan engagement
211
+
212
+ **Includes:**
213
+ - Token overview
214
+ - Buy/sell interface
215
+ - Holder benefits
216
+ - Token-gated content
217
+
218
+ **Routes:**
219
+ - `/tokens`
220
+ - `/tokens/buy`
221
+ - `/tokens/holders`
222
+
223
+ **Backend needs:**
224
+ - `things` table (type: `token`)
225
+ - `connections` table (relationshipType: `holds_tokens`)
226
+ - `events` table (type: `tokens_purchased`)
227
+ - Blockchain integration
228
+
229
+ ---
230
+
231
+ ### 8. Library
232
+
233
+ **Perfect for:** Resource hubs, knowledge bases
234
+
235
+ **Includes:**
236
+ - Document library
237
+ - File uploads
238
+ - Search & categories
239
+ - Download tracking
240
+
241
+ **Routes:**
242
+ - `/library`
243
+ - `/library/[category]`
244
+ - `/library/[slug]`
245
+
246
+ **Backend needs:**
247
+ - `things` table (type: `document`)
248
+ - `events` table (type: `document_downloaded`)
249
+
250
+ ---
251
+
252
+ ### 9. Events
253
+
254
+ **Perfect for:** Event organizers, conferences
255
+
256
+ **Includes:**
257
+ - Event calendar
258
+ - Event pages
259
+ - RSVP/ticketing
260
+ - Attendee list
261
+
262
+ **Routes:**
263
+ - `/events`
264
+ - `/events/[slug]`
265
+ - `/events/[slug]/register`
266
+
267
+ **Backend needs:**
268
+ - `things` table (type: `event`)
269
+ - `connections` table (relationshipType: `registered_for`)
270
+ - `events` table (type: `event_registered`)
271
+
272
+ ---
273
+
274
+ ### 10. Booking
275
+
276
+ **Perfect for:** Consultants, coaches, service providers
277
+
278
+ **Includes:**
279
+ - Calendar availability
280
+ - Appointment booking
281
+ - Payment integration
282
+ - Reminders
283
+
284
+ **Routes:**
285
+ - `/book`
286
+ - `/book/confirm`
287
+ - `/appointments`
288
+
289
+ **Backend needs:**
290
+ - `things` table (type: `appointment`)
291
+ - `events` table (type: `appointment_booked`)
292
+ - Calendar integration
293
+
294
+ ---
295
+
296
+ ### 11. Membership
297
+
298
+ **Perfect for:** Subscription businesses
299
+
300
+ **Includes:**
301
+ - Membership tiers
302
+ - Subscription management
303
+ - Member-only content
304
+ - Recurring billing
305
+
306
+ **Routes:**
307
+ - `/membership`
308
+ - `/membership/[tier]`
309
+ - `/members/dashboard`
310
+
311
+ **Backend needs:**
312
+ - `things` table (type: `membership_tier`)
313
+ - `connections` table (relationshipType: `subscribed_to`)
314
+ - `events` table (type: `subscription_created`)
315
+ - Stripe subscriptions
316
+
317
+ ---
318
+
319
+ ### 12. Analytics
320
+
321
+ **Perfect for:** Data-driven creators
322
+
323
+ **Includes:**
324
+ - Traffic dashboard
325
+ - Revenue analytics
326
+ - User insights
327
+ - Export reports
328
+
329
+ **Routes:**
330
+ - `/analytics`
331
+ - `/analytics/revenue`
332
+ - `/analytics/audience`
333
+
334
+ **Backend needs:**
335
+ - `events` table (all event types)
336
+ - Aggregation queries
337
+
338
+ ---
339
+
340
+ ## Feature Combinations
341
+
342
+ ### Starter Pack (Blank)
343
+
344
+ ```bash
345
+ PUBLIC_FEATURES=blank
346
+ ```
347
+
348
+ **Use case:** Simple landing page, portfolio
349
+
350
+ ---
351
+
352
+ ### Content Creator
353
+
354
+ ```bash
355
+ PUBLIC_FEATURES=blog,portfolio,community,tokens
356
+ ```
357
+
358
+ **Use case:** Influencer, artist, writer with engaged fans
359
+
360
+ **Routes unlocked:**
361
+ - `/` - Homepage
362
+ - `/blog` - Content hub
363
+ - `/portfolio` - Work showcase
364
+ - `/community` - Fan forum
365
+ - `/tokens` - Creator economy
366
+
367
+ ---
368
+
369
+ ### Online Educator
370
+
371
+ ```bash
372
+ PUBLIC_FEATURES=courses,library,community,membership
373
+ ```
374
+
375
+ **Use case:** Teacher, coach, trainer with paid content
376
+
377
+ **Routes unlocked:**
378
+ - `/` - Homepage
379
+ - `/courses` - Course catalog
380
+ - `/library` - Resources
381
+ - `/community` - Student forum
382
+ - `/membership` - Subscription tiers
383
+
384
+ ---
385
+
386
+ ### Ecommerce + Content
387
+
388
+ ```bash
389
+ PUBLIC_FEATURES=shop,blog,membership
390
+ ```
391
+
392
+ **Use case:** Brand with products + content marketing
393
+
394
+ **Routes unlocked:**
395
+ - `/` - Homepage
396
+ - `/shop` - Product catalog
397
+ - `/blog` - Content marketing
398
+ - `/membership` - Loyalty program
399
+
400
+ ---
401
+
402
+ ### Full Stack Creator
403
+
404
+ ```bash
405
+ PUBLIC_FEATURES=blog,portfolio,courses,shop,community,tokens,events,library
406
+ ```
407
+
408
+ **Use case:** Power creator with multiple revenue streams
409
+
410
+ **Routes unlocked:** Everything!
411
+
412
+ ---
413
+
414
+ ## File Structure
415
+
416
+ ```
417
+ /web/
418
+ ├── src/
419
+ │ ├── features/
420
+ │ │ ├── blank/
421
+ │ │ │ ├── pages/
422
+ │ │ │ │ ├── index.astro
423
+ │ │ │ │ ├── about.astro
424
+ │ │ │ │ └── contact.astro
425
+ │ │ │ └── components/
426
+ │ │ │ └── Hero.astro
427
+ │ │ │
428
+ │ │ ├── blog/
429
+ │ │ │ ├── pages/
430
+ │ │ │ │ ├── index.astro
431
+ │ │ │ │ └── [...slug].astro
432
+ │ │ │ └── components/
433
+ │ │ │ ├── BlogList.astro
434
+ │ │ │ └── BlogPost.astro
435
+ │ │ │
436
+ │ │ ├── portfolio/
437
+ │ │ │ ├── pages/
438
+ │ │ │ │ ├── index.astro
439
+ │ │ │ │ └── [...slug].astro
440
+ │ │ │ └── components/
441
+ │ │ │ └── ProjectGrid.astro
442
+ │ │ │
443
+ │ │ ├── courses/
444
+ │ │ │ ├── pages/
445
+ │ │ │ │ ├── index.astro
446
+ │ │ │ │ ├── [slug]/index.astro
447
+ │ │ │ │ └── [slug]/lessons/[lesson].astro
448
+ │ │ │ └── components/
449
+ │ │ │ ├── CourseCard.astro
450
+ │ │ │ └── LessonList.astro
451
+ │ │ │
452
+ │ │ ├── shop/
453
+ │ │ │ ├── pages/
454
+ │ │ │ │ ├── index.astro
455
+ │ │ │ │ ├── [slug].astro
456
+ │ │ │ │ ├── cart.astro
457
+ │ │ │ │ └── checkout.astro
458
+ │ │ │ └── components/
459
+ │ │ │ ├── ProductGrid.astro
460
+ │ │ │ └── ShoppingCart.tsx
461
+ │ │ │
462
+ │ │ ├── community/
463
+ │ │ ├── tokens/
464
+ │ │ ├── library/
465
+ │ │ ├── events/
466
+ │ │ ├── booking/
467
+ │ │ ├── membership/
468
+ │ │ └── analytics/
469
+ │ │
470
+ │ ├── config/
471
+ │ │ ├── features.ts # Feature detection
472
+ │ │ ├── navigation.ts # Dynamic nav based on features
473
+ │ │ └── site.ts # Site metadata
474
+ │ │
475
+ │ ├── components/ui/ # Shared shadcn/ui
476
+ │ │
477
+ │ └── pages/
478
+ │ └── [...feature].astro # Dynamic router
479
+ │
480
+ ├── astro.config.mjs
481
+ └── .env
482
+ ```
483
+
484
+ ---
485
+
486
+ ## Dynamic Routing
487
+
488
+ ### Feature-Based Page Resolution
489
+
490
+ ```astro
491
+ ---
492
+ // src/pages/[...route].astro
493
+ import { FEATURES, hasFeature } from '@/config/features';
494
+
495
+ const route = Astro.params.route || '';
496
+
497
+ // Resolve feature from route
498
+ const featureMap = {
499
+ '': 'blank', // Homepage
500
+ 'blog': 'blog',
501
+ 'portfolio': 'portfolio',
502
+ 'courses': 'courses',
503
+ 'shop': 'shop',
504
+ 'community': 'community',
505
+ 'tokens': 'tokens',
506
+ 'library': 'library',
507
+ 'events': 'events',
508
+ 'book': 'booking',
509
+ 'membership': 'membership',
510
+ 'analytics': 'analytics',
511
+ };
512
+
513
+ const feature = featureMap[route.split('/')[0]];
514
+
515
+ // Check if feature is enabled
516
+ if (!hasFeature(feature)) {
517
+ return Astro.redirect('/404');
518
+ }
519
+
520
+ // Import feature page dynamically
521
+ const Page = await import(`@/features/${feature}/pages/${route}.astro`);
522
+ ---
523
+
524
+ <Page.default {...Astro.props} />
525
+ ```
526
+
527
+ ---
528
+
529
+ ## Navigation Generation
530
+
531
+ ### Dynamic Nav Based on Enabled Features
532
+
533
+ ```typescript
534
+ // src/config/navigation.ts
535
+ import { hasFeature } from './features';
536
+
537
+ export const generateNavigation = () => {
538
+ const nav = [];
539
+
540
+ // Always include home
541
+ nav.push({ label: 'Home', href: '/' });
542
+
543
+ // Add feature-specific nav items
544
+ if (hasFeature('blog')) {
545
+ nav.push({ label: 'Blog', href: '/blog' });
546
+ }
547
+
548
+ if (hasFeature('portfolio')) {
549
+ nav.push({ label: 'Portfolio', href: '/portfolio' });
550
+ }
551
+
552
+ if (hasFeature('courses')) {
553
+ nav.push({ label: 'Courses', href: '/courses' });
554
+ }
555
+
556
+ if (hasFeature('shop')) {
557
+ nav.push({ label: 'Shop', href: '/shop' });
558
+ }
559
+
560
+ if (hasFeature('community')) {
561
+ nav.push({ label: 'Community', href: '/community' });
562
+ }
563
+
564
+ if (hasFeature('events')) {
565
+ nav.push({ label: 'Events', href: '/events' });
566
+ }
567
+
568
+ // Always include about & contact
569
+ nav.push({ label: 'About', href: '/about' });
570
+ nav.push({ label: 'Contact', href: '/contact' });
571
+
572
+ return nav;
573
+ };
574
+ ```
575
+
576
+ ---
577
+
578
+ ## NPX OneIE Integration
579
+
580
+ ### Feature Selection UI
581
+
582
+ ```bash
583
+ npx oneie init
584
+
585
+ # Interactive prompts:
586
+ ✓ What's your name? Jane Doe
587
+ ✓ Site tagline? Artist, Educator, Creator
588
+
589
+ ? Select features (space to select, enter to continue):
590
+ ◯ Blank (minimal starter)
591
+ ◉ Blog (content hub)
592
+ ◉ Portfolio (project showcase)
593
+ ◉ Courses (course platform)
594
+ ◉ Shop (ecommerce)
595
+ ◯ Community (forums/chat)
596
+ ◉ Tokens (creator economy)
597
+ ◯ Library (resources)
598
+ ◯ Events (event management)
599
+ ◯ Booking (appointments)
600
+ ◯ Membership (subscriptions)
601
+ ◯ Analytics (dashboard)
602
+
603
+ ✓ Deploy now? y
604
+ ```
605
+
606
+ ### Generated .env.local
607
+
608
+ ```bash
609
+ # Site Configuration
610
+ PUBLIC_SITE_NAME="Jane Doe"
611
+ PUBLIC_SITE_TAGLINE="Artist, Educator, Creator"
612
+
613
+ # Features (comma-separated)
614
+ PUBLIC_FEATURES=blog,portfolio,courses,shop,tokens
615
+
616
+ # Backend Connection
617
+ PUBLIC_CONVEX_URL=https://shocking-falcon-870.convex.cloud
618
+ CONVEX_DEPLOYMENT=prod:shocking-falcon-870
619
+
620
+ # Authentication
621
+ BETTER_AUTH_SECRET=generated-secret-key
622
+ BETTER_AUTH_URL=https://janedoe.pages.dev
623
+ ```
624
+
625
+ ---
626
+
627
+ ## Development Workflow
628
+
629
+ ### Local Development
630
+
631
+ ```bash
632
+ # Start with blank template
633
+ PUBLIC_FEATURES=blank bun run dev
634
+
635
+ # Add blog feature
636
+ PUBLIC_FEATURES=blank,blog bun run dev
637
+
638
+ # Add multiple features
639
+ PUBLIC_FEATURES=blog,portfolio,courses,shop bun run dev
640
+
641
+ # Enable everything
642
+ PUBLIC_FEATURES=all bun run dev
643
+ ```
644
+
645
+ ### Build for Production
646
+
647
+ ```bash
648
+ # Build with specific features
649
+ PUBLIC_FEATURES=blog,courses,shop bun run build
650
+
651
+ # Deploy to Cloudflare
652
+ wrangler pages deploy dist --project-name=janedoe-creator
653
+ ```
654
+
655
+ ---
656
+
657
+ ## Benefits
658
+
659
+ ### Maximum Flexibility
660
+
661
+ - ✅ **Mix & match** any features
662
+ - ✅ **Start minimal** (blank template)
663
+ - ✅ **Add features** as you grow
664
+ - ✅ **Remove features** you don't need
665
+
666
+ ### No Rigid Templates
667
+
668
+ - ❌ No "creator" vs "ecommerce" choice
669
+ - ✅ Enable exactly what you need
670
+ - ✅ Creator + ecommerce + courses? Yes!
671
+ - ✅ Portfolio + shop + events? Yes!
672
+
673
+ ### Easy Customization
674
+
675
+ ```bash
676
+ # Start blank
677
+ PUBLIC_FEATURES=blank
678
+
679
+ # Add blog
680
+ PUBLIC_FEATURES=blank,blog
681
+
682
+ # Add shop later
683
+ PUBLIC_FEATURES=blank,blog,shop
684
+
685
+ # Add courses when ready
686
+ PUBLIC_FEATURES=blank,blog,shop,courses
687
+ ```
688
+
689
+ ### Backend Efficiency
690
+
691
+ Only loads/generates code for enabled features:
692
+
693
+ ```typescript
694
+ // Conditionally load feature services
695
+ if (hasFeature('shop')) {
696
+ const { ProductService } = await import('@/features/shop/services/ProductService');
697
+ }
698
+
699
+ if (hasFeature('courses')) {
700
+ const { CourseService } = await import('@/features/courses/services/CourseService');
701
+ }
702
+ ```
703
+
704
+ ---
705
+
706
+ ## Feature Dependencies
707
+
708
+ Some features depend on others:
709
+
710
+ ```typescript
711
+ // src/config/features.ts
712
+ export const FEATURE_DEPENDENCIES: Record<Feature, Feature[]> = {
713
+ membership: ['shop'], // Memberships need payment
714
+ tokens: ['community'], // Tokens need community
715
+ analytics: [], // No dependencies
716
+ booking: ['shop'], // Booking needs payment
717
+ library: [], // No dependencies
718
+ events: ['shop'], // Events may need ticketing
719
+ // etc.
720
+ };
721
+
722
+ // Auto-enable dependencies
723
+ export const resolveFeatures = (requested: Feature[]): Feature[] => {
724
+ const enabled = new Set(requested);
725
+
726
+ for (const feature of requested) {
727
+ const deps = FEATURE_DEPENDENCIES[feature] || [];
728
+ deps.forEach(dep => enabled.add(dep));
729
+ }
730
+
731
+ return Array.from(enabled);
732
+ };
733
+ ```
734
+
735
+ ---
736
+
737
+ ## Pre-Built Feature Combinations
738
+
739
+ For convenience, offer pre-built combos:
740
+
741
+ ```typescript
742
+ // src/config/presets.ts
743
+ export const PRESETS = {
744
+ blank: ['blank'],
745
+
746
+ blogger: ['blog', 'portfolio'],
747
+
748
+ creator: ['blog', 'portfolio', 'community', 'tokens'],
749
+
750
+ educator: ['courses', 'library', 'community', 'membership'],
751
+
752
+ ecommerce: ['shop', 'blog'],
753
+
754
+ powerhouse: ['blog', 'portfolio', 'courses', 'shop', 'community', 'tokens', 'events'],
755
+ };
756
+
757
+ // Usage
758
+ PUBLIC_FEATURES_PRESET=creator
759
+ // Expands to: blog,portfolio,community,tokens
760
+ ```
761
+
762
+ ---
763
+
764
+ ## Implementation Timeline
765
+
766
+ ### Week 1: Core Infrastructure
767
+ - Create feature system
768
+ - Build blank template
769
+ - Add feature detection logic
770
+
771
+ ### Week 2: Core Features
772
+ - Build blog feature
773
+ - Build portfolio feature
774
+ - Test feature combinations
775
+
776
+ ### Week 3-4: Additional Features
777
+ - Build courses feature
778
+ - Build shop feature
779
+ - Build community feature
780
+
781
+ ### Week 5-6: Advanced Features
782
+ - Build tokens feature
783
+ - Build events feature
784
+ - Build membership feature
785
+
786
+ ### Week 7: CLI Integration
787
+ - Update `npx oneie` to support features
788
+ - Add feature selection UI
789
+ - Test end-to-end
790
+
791
+ ---
792
+
793
+ ## Success Metrics
794
+
795
+ - [ ] Blank template works (homepage, about, contact)
796
+ - [ ] Feature flags control routes correctly
797
+ - [ ] Navigation updates based on enabled features
798
+ - [ ] Can combine any features without conflicts
799
+ - [ ] Bundle only includes enabled feature code
800
+ - [ ] `npx oneie` allows feature selection
801
+ - [ ] Users can start blank and add features later
802
+
803
+ ---
804
+
805
+ ## Next Steps
806
+
807
+ 1. **Create blank template** (Day 1)
808
+ 2. **Build feature system** (Day 2)
809
+ 3. **Add blog feature** (Day 3)
810
+ 4. **Add portfolio feature** (Day 4)
811
+ 5. **Test feature combinations** (Day 5)
812
+ 6. **Add shop & courses features** (Week 2)
813
+ 7. **Integrate with npx oneie** (Week 3)
814
+
815
+ ---
816
+
817
+ **This is way more flexible than templates!** 🚀
818
+
819
+ Users start blank, then enable exactly what they need. Want blog + shop? Done. Want courses + community + tokens? Done. Want everything? Enable `all`!
820
+
821
+ No more rigid templates - just features you can mix and match infinitely.