@org.ai/examples 0.0.1

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 (40) hide show
  1. package/.turbo/turbo-build.log +4 -0
  2. package/LICENSE +21 -0
  3. package/README.md +147 -0
  4. package/api-business/index.ts +1179 -0
  5. package/directory/index.ts +1118 -0
  6. package/dist/api-business/index.d.ts +221 -0
  7. package/dist/api-business/index.d.ts.map +1 -0
  8. package/dist/api-business/index.js +1132 -0
  9. package/dist/api-business/index.js.map +1 -0
  10. package/dist/directory/index.d.ts +202 -0
  11. package/dist/directory/index.d.ts.map +1 -0
  12. package/dist/directory/index.js +1073 -0
  13. package/dist/directory/index.js.map +1 -0
  14. package/dist/index.d.ts +75 -0
  15. package/dist/index.d.ts.map +1 -0
  16. package/dist/index.js +127 -0
  17. package/dist/index.js.map +1 -0
  18. package/dist/marketplace/index.d.ts +242 -0
  19. package/dist/marketplace/index.d.ts.map +1 -0
  20. package/dist/marketplace/index.js +1249 -0
  21. package/dist/marketplace/index.js.map +1 -0
  22. package/dist/saas/index.d.ts +151 -0
  23. package/dist/saas/index.d.ts.map +1 -0
  24. package/dist/saas/index.js +1142 -0
  25. package/dist/saas/index.js.map +1 -0
  26. package/dist/startup-studio/index.d.ts +285 -0
  27. package/dist/startup-studio/index.d.ts.map +1 -0
  28. package/dist/startup-studio/index.js +1252 -0
  29. package/dist/startup-studio/index.js.map +1 -0
  30. package/dist/vc-firm/index.d.ts +248 -0
  31. package/dist/vc-firm/index.d.ts.map +1 -0
  32. package/dist/vc-firm/index.js +1335 -0
  33. package/dist/vc-firm/index.js.map +1 -0
  34. package/index.ts +151 -0
  35. package/marketplace/index.ts +1295 -0
  36. package/package.json +58 -0
  37. package/saas/index.ts +1188 -0
  38. package/startup-studio/index.ts +1324 -0
  39. package/tsconfig.json +12 -0
  40. package/vc-firm/index.ts +1430 -0
@@ -0,0 +1,1073 @@
1
+ /**
2
+ * Directory Business Example
3
+ *
4
+ * A complete example of a directory/listing business modeled using primitives.org.ai
5
+ * Think: ProductHunt, Crunchbase, G2, Capterra, Yellow Pages, Yelp for B2B
6
+ *
7
+ * @example TechDirectory - A curated directory of SaaS tools
8
+ * @packageDocumentation
9
+ */
10
+ /**
11
+ * NOTE: These examples demonstrate the DESIRED API shape for business-as-code.
12
+ * Some types may not exist yet in the actual package. The examples serve as
13
+ * documentation and specification for the ideal primitives API.
14
+ */
15
+ // Use any for flexibility - these examples define the ideal API shape
16
+ const Business = (def) => def;
17
+ const Product = (def) => def;
18
+ const Service = (def) => def;
19
+ const Goals = (defs) => defs;
20
+ const Vision = (def) => def;
21
+ const kpis = (defs) => defs;
22
+ const okrs = (defs) => defs;
23
+ const financials = (def) => def;
24
+ const Process = (def) => def;
25
+ const Workflow = (def) => def;
26
+ const createBusinessRole = (def) => def;
27
+ // $ helper placeholder
28
+ const $ = {
29
+ format: (n) => `$${n.toLocaleString()}`,
30
+ growth: (current, previous) => ((current - previous) / previous * 100).toFixed(1),
31
+ margin: (revenue, cost) => ((revenue - cost) / revenue * 100).toFixed(1),
32
+ };
33
+ // =============================================================================
34
+ // 1. BUSINESS DEFINITION
35
+ // =============================================================================
36
+ /**
37
+ * TechDirectory - Curated SaaS Tools Directory
38
+ */
39
+ export const TechDirectoryBusiness = Business({
40
+ name: 'TechDirectory Inc.',
41
+ mission: 'Help businesses discover and compare the best software tools',
42
+ values: ['Curation Quality', 'User Trust', 'Vendor Fairness', 'Community'],
43
+ industry: 'Media / Information Services',
44
+ founded: new Date('2020-03-15'),
45
+ stage: 'growth',
46
+ structure: {
47
+ departments: [
48
+ {
49
+ name: 'Product & Engineering',
50
+ headcount: 18,
51
+ budget: 2200000,
52
+ teams: [
53
+ { name: 'Platform', headcount: 6, focus: 'Core directory platform' },
54
+ { name: 'Search & Discovery', headcount: 4, focus: 'Search, recommendations' },
55
+ { name: 'Data', headcount: 4, focus: 'Data pipelines, enrichment' },
56
+ { name: 'Growth', headcount: 4, focus: 'Acquisition, engagement' },
57
+ ],
58
+ },
59
+ {
60
+ name: 'Content & Curation',
61
+ headcount: 12,
62
+ budget: 900000,
63
+ teams: [
64
+ { name: 'Editorial', headcount: 4, focus: 'Reviews, guides, comparisons' },
65
+ { name: 'Curation', headcount: 4, focus: 'Listing quality, verification' },
66
+ { name: 'Community', headcount: 4, focus: 'User reviews, Q&A' },
67
+ ],
68
+ },
69
+ {
70
+ name: 'Sales & Partnerships',
71
+ headcount: 10,
72
+ budget: 1200000,
73
+ teams: [
74
+ { name: 'Vendor Sales', headcount: 5, focus: 'Premium listings' },
75
+ { name: 'Partnerships', headcount: 3, focus: 'Affiliate, integrations' },
76
+ { name: 'Account Management', headcount: 2, focus: 'Vendor success' },
77
+ ],
78
+ },
79
+ {
80
+ name: 'Marketing',
81
+ headcount: 6,
82
+ budget: 800000,
83
+ teams: [
84
+ { name: 'SEO & Content', headcount: 3 },
85
+ { name: 'Demand Gen', headcount: 3 },
86
+ ],
87
+ },
88
+ ],
89
+ },
90
+ });
91
+ // =============================================================================
92
+ // 2. VISION & GOALS
93
+ // =============================================================================
94
+ export const TechDirectoryVision = Vision({
95
+ statement: 'Be the most trusted source for software discovery worldwide',
96
+ timeHorizon: '2027',
97
+ pillars: [
98
+ 'Content Quality',
99
+ 'User Trust',
100
+ 'Vendor Ecosystem',
101
+ 'Data Excellence',
102
+ ],
103
+ successIndicators: [
104
+ { name: 'Monthly Visitors', target: 10000000 },
105
+ { name: 'Listed Tools', target: 50000 },
106
+ { name: 'Verified Reviews', target: 500000 },
107
+ { name: 'Vendor NPS', target: 50 },
108
+ ],
109
+ });
110
+ export const TechDirectoryGoals = Goals([
111
+ {
112
+ name: 'Reach 3M Monthly Visitors',
113
+ category: 'growth',
114
+ status: 'in-progress',
115
+ progress: 70,
116
+ dueDate: new Date('2024-12-31'),
117
+ owner: 'VP Marketing',
118
+ },
119
+ {
120
+ name: 'Launch AI-Powered Recommendations',
121
+ category: 'product',
122
+ status: 'in-progress',
123
+ progress: 45,
124
+ dueDate: new Date('2024-06-30'),
125
+ owner: 'VP Product',
126
+ },
127
+ {
128
+ name: 'Expand to 25K Listed Tools',
129
+ category: 'content',
130
+ status: 'in-progress',
131
+ progress: 60,
132
+ dueDate: new Date('2024-09-30'),
133
+ owner: 'Content Lead',
134
+ },
135
+ {
136
+ name: '1000 Paying Vendors',
137
+ category: 'revenue',
138
+ status: 'in-progress',
139
+ progress: 65,
140
+ dueDate: new Date('2024-12-31'),
141
+ owner: 'VP Sales',
142
+ },
143
+ {
144
+ name: '$5M ARR',
145
+ category: 'financial',
146
+ status: 'in-progress',
147
+ progress: 55,
148
+ dueDate: new Date('2024-12-31'),
149
+ owner: 'CEO',
150
+ },
151
+ ]);
152
+ // =============================================================================
153
+ // 3. PRODUCTS & SERVICES
154
+ // =============================================================================
155
+ export const DirectoryPlatform = Product({
156
+ name: 'TechDirectory Platform',
157
+ description: 'The core directory platform for discovering software tools',
158
+ pricingModel: 'freemium',
159
+ features: [
160
+ 'Tool search & discovery',
161
+ 'Category browsing',
162
+ 'Comparison tables',
163
+ 'User reviews & ratings',
164
+ 'Tool profiles',
165
+ 'Alternatives finder',
166
+ 'Stack builder',
167
+ ],
168
+ roadmap: [
169
+ { name: 'AI Recommendations', status: 'in-progress', priority: 'high', targetDate: new Date('2024-Q2') },
170
+ { name: 'Integration Directory', status: 'planned', priority: 'medium', targetDate: new Date('2024-Q3') },
171
+ { name: 'Pricing Intelligence', status: 'planned', priority: 'high', targetDate: new Date('2024-Q4') },
172
+ ],
173
+ });
174
+ /**
175
+ * Vendor Products (B2B Revenue)
176
+ */
177
+ export const VendorProducts = {
178
+ basicListing: Product({
179
+ name: 'Basic Listing',
180
+ description: 'Free listing with verified profile',
181
+ pricingModel: 'free',
182
+ features: [
183
+ 'Basic profile',
184
+ 'Logo & description',
185
+ 'Category listing',
186
+ 'User reviews',
187
+ 'Basic analytics',
188
+ ],
189
+ }),
190
+ premiumListing: Product({
191
+ name: 'Premium Listing',
192
+ description: 'Enhanced visibility and features',
193
+ pricingModel: 'subscription',
194
+ price: 299, // /month
195
+ features: [
196
+ 'Everything in Basic',
197
+ 'Featured placement',
198
+ 'Rich media gallery',
199
+ 'Lead capture form',
200
+ 'Review response',
201
+ 'Competitor insights',
202
+ 'Advanced analytics',
203
+ ],
204
+ }),
205
+ sponsoredPlacement: Product({
206
+ name: 'Sponsored Placement',
207
+ description: 'Top visibility in search and categories',
208
+ pricingModel: 'usage-based',
209
+ price: 5, // per click
210
+ features: [
211
+ 'Category top placement',
212
+ 'Search result boost',
213
+ 'Comparison table feature',
214
+ 'Homepage showcase',
215
+ ],
216
+ }),
217
+ enterpriseProfile: Product({
218
+ name: 'Enterprise Profile',
219
+ description: 'Full-featured vendor presence',
220
+ pricingModel: 'subscription',
221
+ price: 999, // /month
222
+ features: [
223
+ 'Everything in Premium',
224
+ 'Dedicated landing page',
225
+ 'Case study publishing',
226
+ 'Integration showcase',
227
+ 'Custom badges',
228
+ 'API access',
229
+ 'Dedicated support',
230
+ ],
231
+ }),
232
+ };
233
+ /**
234
+ * Affiliate & Lead Services
235
+ */
236
+ export const AffiliateServices = Service({
237
+ name: 'Affiliate Partnerships',
238
+ description: 'Revenue share on qualified leads',
239
+ pricingModel: 'performance-based',
240
+ deliverables: [
241
+ 'Click tracking',
242
+ 'Conversion attribution',
243
+ 'Monthly reporting',
244
+ 'Dedicated affiliate link',
245
+ ],
246
+ });
247
+ // =============================================================================
248
+ // 4. ORGANIZATION & ROLES
249
+ // =============================================================================
250
+ export const TechDirectoryOrg = {
251
+ id: 'techdirectory',
252
+ name: 'TechDirectory Inc.',
253
+ settings: {
254
+ timezone: 'America/New_York',
255
+ currency: 'USD',
256
+ fiscalYearStart: 1,
257
+ },
258
+ departments: [
259
+ {
260
+ id: 'content',
261
+ name: 'Content & Curation',
262
+ permissions: {
263
+ listings: ['read', 'write', 'publish', 'feature'],
264
+ reviews: ['read', 'write', 'moderate'],
265
+ content: ['read', 'write', 'publish'],
266
+ },
267
+ teams: [
268
+ {
269
+ id: 'editorial',
270
+ name: 'Editorial',
271
+ positions: [
272
+ { id: 'editor-chief', title: 'Editor in Chief', roleId: 'content-lead', reportsTo: 'ceo' },
273
+ { id: 'senior-editor', title: 'Senior Editor', roleId: 'editor', reportsTo: 'editor-chief' },
274
+ ],
275
+ },
276
+ {
277
+ id: 'curation',
278
+ name: 'Curation',
279
+ positions: [
280
+ { id: 'curation-lead', title: 'Curation Lead', roleId: 'curator', reportsTo: 'editor-chief' },
281
+ { id: 'curator-1', title: 'Curator', roleId: 'curator', reportsTo: 'curation-lead' },
282
+ ],
283
+ },
284
+ ],
285
+ },
286
+ {
287
+ id: 'sales',
288
+ name: 'Sales & Partnerships',
289
+ permissions: {
290
+ vendors: ['read', 'write', 'manage'],
291
+ deals: ['read', 'write', 'negotiate'],
292
+ partnerships: ['read', 'write', 'manage'],
293
+ },
294
+ },
295
+ {
296
+ id: 'engineering',
297
+ name: 'Engineering',
298
+ permissions: {
299
+ code: ['read', 'write', 'deploy'],
300
+ data: ['read', 'write', 'manage'],
301
+ infrastructure: ['read', 'write'],
302
+ },
303
+ },
304
+ ],
305
+ roles: [
306
+ createBusinessRole({
307
+ id: 'content-lead',
308
+ name: 'Content Lead',
309
+ type: 'manager',
310
+ level: 6,
311
+ permissions: {
312
+ listings: ['read', 'write', 'publish', 'feature', 'delete'],
313
+ reviews: ['read', 'write', 'moderate', 'delete'],
314
+ content: ['read', 'write', 'publish'],
315
+ },
316
+ canHandle: ['content-strategy', 'editorial-review', 'quality-control'],
317
+ canApprove: ['listing-publish', 'feature-decision', 'content-removal'],
318
+ }),
319
+ createBusinessRole({
320
+ id: 'editor',
321
+ name: 'Editor',
322
+ type: 'support',
323
+ level: 4,
324
+ permissions: {
325
+ listings: ['read', 'write', 'publish'],
326
+ reviews: ['read', 'write', 'moderate'],
327
+ content: ['read', 'write'],
328
+ },
329
+ canHandle: ['listing-review', 'content-editing', 'comparison-writing'],
330
+ }),
331
+ createBusinessRole({
332
+ id: 'curator',
333
+ name: 'Curator',
334
+ type: 'support',
335
+ level: 3,
336
+ permissions: {
337
+ listings: ['read', 'write'],
338
+ reviews: ['read', 'moderate'],
339
+ },
340
+ canHandle: ['listing-verification', 'data-enrichment', 'categorization'],
341
+ }),
342
+ createBusinessRole({
343
+ id: 'community-mod',
344
+ name: 'Community Moderator',
345
+ type: 'support',
346
+ level: 2,
347
+ workerType: 'hybrid', // AI + human
348
+ permissions: {
349
+ reviews: ['read', 'moderate'],
350
+ comments: ['read', 'moderate'],
351
+ },
352
+ canHandle: ['review-moderation', 'spam-detection', 'community-response'],
353
+ }),
354
+ createBusinessRole({
355
+ id: 'vendor-success',
356
+ name: 'Vendor Success Manager',
357
+ type: 'support',
358
+ level: 4,
359
+ permissions: {
360
+ vendors: ['read', 'write'],
361
+ listings: ['read'],
362
+ analytics: ['read'],
363
+ },
364
+ canHandle: ['vendor-onboarding', 'listing-optimization', 'renewal-management'],
365
+ }),
366
+ createBusinessRole({
367
+ id: 'data-enrichment-bot',
368
+ name: 'Data Enrichment Bot',
369
+ type: 'agent',
370
+ level: 1,
371
+ workerType: 'ai',
372
+ permissions: {
373
+ listings: ['read', 'write'],
374
+ data: ['read', 'write'],
375
+ },
376
+ canHandle: ['data-scraping', 'profile-enrichment', 'pricing-updates'],
377
+ }),
378
+ ],
379
+ routingRules: [
380
+ {
381
+ id: 'new-listing-review',
382
+ taskType: 'listing-review',
383
+ priority: 1,
384
+ assignTo: { roleId: 'curator' },
385
+ },
386
+ {
387
+ id: 'review-moderation',
388
+ taskType: 'review-moderation',
389
+ priority: 1,
390
+ assignTo: { roleId: 'community-mod' },
391
+ },
392
+ {
393
+ id: 'vendor-inquiry',
394
+ taskType: 'vendor-inquiry',
395
+ priority: 2,
396
+ assignTo: { roleId: 'vendor-success' },
397
+ },
398
+ ],
399
+ };
400
+ // =============================================================================
401
+ // 5. KPIs & METRICS
402
+ // =============================================================================
403
+ export const TechDirectoryKPIs = kpis([
404
+ // Traffic & Engagement
405
+ {
406
+ name: 'Monthly Unique Visitors',
407
+ category: 'operational',
408
+ target: 3000000,
409
+ current: 2100000,
410
+ frequency: 'monthly',
411
+ owner: 'VP Marketing',
412
+ },
413
+ {
414
+ name: 'Pages per Session',
415
+ category: 'operational',
416
+ target: 4.5,
417
+ current: 3.8,
418
+ frequency: 'weekly',
419
+ owner: 'VP Product',
420
+ },
421
+ {
422
+ name: 'Time on Site',
423
+ category: 'operational',
424
+ target: 5,
425
+ current: 4.2,
426
+ unit: 'minutes',
427
+ frequency: 'weekly',
428
+ owner: 'VP Product',
429
+ },
430
+ {
431
+ name: 'Bounce Rate',
432
+ category: 'operational',
433
+ target: 40,
434
+ current: 48,
435
+ unit: '%',
436
+ frequency: 'weekly',
437
+ owner: 'VP Marketing',
438
+ },
439
+ // Content Metrics
440
+ {
441
+ name: 'Listed Tools',
442
+ category: 'content',
443
+ target: 25000,
444
+ current: 15000,
445
+ frequency: 'monthly',
446
+ owner: 'Content Lead',
447
+ },
448
+ {
449
+ name: 'Verified Reviews',
450
+ category: 'content',
451
+ target: 200000,
452
+ current: 125000,
453
+ frequency: 'monthly',
454
+ owner: 'Community Lead',
455
+ },
456
+ {
457
+ name: 'Data Completeness Score',
458
+ category: 'content',
459
+ target: 90,
460
+ current: 78,
461
+ unit: '%',
462
+ frequency: 'monthly',
463
+ owner: 'Data Lead',
464
+ },
465
+ // Revenue Metrics
466
+ {
467
+ name: 'Paying Vendors',
468
+ category: 'financial',
469
+ target: 1000,
470
+ current: 650,
471
+ frequency: 'monthly',
472
+ owner: 'VP Sales',
473
+ },
474
+ {
475
+ name: 'MRR',
476
+ category: 'financial',
477
+ target: 400000,
478
+ current: 275000,
479
+ unit: 'USD',
480
+ frequency: 'monthly',
481
+ owner: 'CEO',
482
+ },
483
+ {
484
+ name: 'Affiliate Revenue',
485
+ category: 'financial',
486
+ target: 80000,
487
+ current: 55000,
488
+ unit: 'USD',
489
+ frequency: 'monthly',
490
+ owner: 'Partnerships Lead',
491
+ },
492
+ {
493
+ name: 'Vendor Churn Rate',
494
+ category: 'customer',
495
+ target: 3,
496
+ current: 4.5,
497
+ unit: '%',
498
+ frequency: 'monthly',
499
+ owner: 'VP Sales',
500
+ },
501
+ // SEO Metrics
502
+ {
503
+ name: 'Organic Traffic Share',
504
+ category: 'marketing',
505
+ target: 70,
506
+ current: 62,
507
+ unit: '%',
508
+ frequency: 'monthly',
509
+ owner: 'SEO Lead',
510
+ },
511
+ {
512
+ name: 'Ranking Keywords',
513
+ category: 'marketing',
514
+ target: 50000,
515
+ current: 32000,
516
+ frequency: 'monthly',
517
+ owner: 'SEO Lead',
518
+ },
519
+ ]);
520
+ // =============================================================================
521
+ // 6. OKRs
522
+ // =============================================================================
523
+ export const TechDirectoryOKRs = okrs([
524
+ {
525
+ objective: 'Become the Go-To Resource for Software Discovery',
526
+ owner: 'CEO',
527
+ period: 'Q1 2024',
528
+ keyResults: [
529
+ {
530
+ description: 'Reach 2.5M monthly visitors',
531
+ metric: 'Monthly Visitors',
532
+ targetValue: 2500000,
533
+ currentValue: 2100000,
534
+ },
535
+ {
536
+ description: 'Achieve 4+ pages per session',
537
+ metric: 'Pages per Session',
538
+ targetValue: 4,
539
+ currentValue: 3.8,
540
+ },
541
+ {
542
+ description: 'Grow to 20K listed tools',
543
+ metric: 'Listed Tools',
544
+ targetValue: 20000,
545
+ currentValue: 15000,
546
+ },
547
+ ],
548
+ },
549
+ {
550
+ objective: 'Build Trust Through Quality Content',
551
+ owner: 'Content Lead',
552
+ period: 'Q1 2024',
553
+ keyResults: [
554
+ {
555
+ description: 'Achieve 85% data completeness',
556
+ metric: 'Data Completeness',
557
+ targetValue: 85,
558
+ currentValue: 78,
559
+ unit: '%',
560
+ },
561
+ {
562
+ description: 'Publish 100 in-depth comparisons',
563
+ metric: 'Comparisons Published',
564
+ targetValue: 100,
565
+ currentValue: 45,
566
+ },
567
+ {
568
+ description: 'Verify 50K new reviews',
569
+ metric: 'Verified Reviews',
570
+ targetValue: 50000,
571
+ currentValue: 28000,
572
+ },
573
+ ],
574
+ },
575
+ {
576
+ objective: 'Scale Vendor Revenue',
577
+ owner: 'VP Sales',
578
+ period: 'Q1 2024',
579
+ keyResults: [
580
+ {
581
+ description: 'Reach 800 paying vendors',
582
+ metric: 'Paying Vendors',
583
+ targetValue: 800,
584
+ currentValue: 650,
585
+ },
586
+ {
587
+ description: 'Achieve $350K MRR',
588
+ metric: 'MRR',
589
+ targetValue: 350000,
590
+ currentValue: 275000,
591
+ unit: 'USD',
592
+ },
593
+ {
594
+ description: 'Reduce vendor churn to 3%',
595
+ metric: 'Vendor Churn',
596
+ targetValue: 3,
597
+ currentValue: 4.5,
598
+ unit: '%',
599
+ },
600
+ ],
601
+ },
602
+ {
603
+ objective: 'Dominate Organic Search',
604
+ owner: 'VP Marketing',
605
+ period: 'Q1 2024',
606
+ keyResults: [
607
+ {
608
+ description: 'Rank for 40K keywords',
609
+ metric: 'Ranking Keywords',
610
+ targetValue: 40000,
611
+ currentValue: 32000,
612
+ },
613
+ {
614
+ description: 'Achieve 65% organic traffic share',
615
+ metric: 'Organic Traffic',
616
+ targetValue: 65,
617
+ currentValue: 62,
618
+ unit: '%',
619
+ },
620
+ {
621
+ description: 'Top 3 ranking for 500 key terms',
622
+ metric: 'Top 3 Rankings',
623
+ targetValue: 500,
624
+ currentValue: 320,
625
+ },
626
+ ],
627
+ },
628
+ ]);
629
+ // =============================================================================
630
+ // 7. PROCESSES
631
+ // =============================================================================
632
+ export const ListingSubmissionProcess = Process({
633
+ name: 'Listing Submission',
634
+ description: 'Process for new tool listings',
635
+ owner: 'Content Lead',
636
+ steps: [
637
+ {
638
+ order: 1,
639
+ name: 'Submission',
640
+ description: 'Vendor submits listing request',
641
+ automationLevel: 'automated',
642
+ duration: 'instant',
643
+ },
644
+ {
645
+ order: 2,
646
+ name: 'Initial Validation',
647
+ description: 'Automated validation of submission data',
648
+ automationLevel: 'automated',
649
+ duration: '5 minutes',
650
+ },
651
+ {
652
+ order: 3,
653
+ name: 'Data Enrichment',
654
+ description: 'AI enriches profile with public data',
655
+ automationLevel: 'automated',
656
+ duration: '30 minutes',
657
+ },
658
+ {
659
+ order: 4,
660
+ name: 'Human Review',
661
+ description: 'Curator reviews and verifies listing',
662
+ automationLevel: 'manual',
663
+ duration: '1 day',
664
+ owner: 'Curator',
665
+ },
666
+ {
667
+ order: 5,
668
+ name: 'Categorization',
669
+ description: 'Assign categories and tags',
670
+ automationLevel: 'semi-automated',
671
+ duration: '15 minutes',
672
+ owner: 'Curator',
673
+ },
674
+ {
675
+ order: 6,
676
+ name: 'Publication',
677
+ description: 'Publish listing to directory',
678
+ automationLevel: 'automated',
679
+ duration: 'instant',
680
+ },
681
+ {
682
+ order: 7,
683
+ name: 'Notification',
684
+ description: 'Notify vendor of publication',
685
+ automationLevel: 'automated',
686
+ duration: 'instant',
687
+ },
688
+ ],
689
+ metrics: [
690
+ { name: 'Time to Publish', target: 48, unit: 'hours' },
691
+ { name: 'Approval Rate', target: 85, unit: '%' },
692
+ { name: 'Data Quality Score', target: 90, unit: '%' },
693
+ ],
694
+ });
695
+ export const ReviewModerationProcess = Process({
696
+ name: 'Review Moderation',
697
+ description: 'Moderate user reviews for quality and authenticity',
698
+ owner: 'Community Lead',
699
+ steps: [
700
+ {
701
+ order: 1,
702
+ name: 'Submission',
703
+ description: 'User submits review',
704
+ automationLevel: 'automated',
705
+ duration: 'instant',
706
+ },
707
+ {
708
+ order: 2,
709
+ name: 'Spam Check',
710
+ description: 'AI filters obvious spam',
711
+ automationLevel: 'automated',
712
+ duration: 'instant',
713
+ },
714
+ {
715
+ order: 3,
716
+ name: 'Sentiment Analysis',
717
+ description: 'Analyze review sentiment and flag outliers',
718
+ automationLevel: 'automated',
719
+ duration: '1 minute',
720
+ },
721
+ {
722
+ order: 4,
723
+ name: 'Verification',
724
+ description: 'Verify reviewer identity and usage',
725
+ automationLevel: 'semi-automated',
726
+ duration: '5 minutes',
727
+ },
728
+ {
729
+ order: 5,
730
+ name: 'Human Review',
731
+ description: 'Moderator reviews flagged reviews',
732
+ automationLevel: 'manual',
733
+ duration: '30 minutes',
734
+ owner: 'Community Moderator',
735
+ },
736
+ {
737
+ order: 6,
738
+ name: 'Publication',
739
+ description: 'Publish approved review',
740
+ automationLevel: 'automated',
741
+ duration: 'instant',
742
+ },
743
+ ],
744
+ metrics: [
745
+ { name: 'Auto-Approval Rate', target: 80, unit: '%' },
746
+ { name: 'Moderation Time', target: 2, unit: 'hours' },
747
+ { name: 'Fake Review Detection', target: 99, unit: '%' },
748
+ ],
749
+ });
750
+ export const VendorOnboardingProcess = Process({
751
+ name: 'Vendor Onboarding',
752
+ description: 'Onboard new paying vendors',
753
+ owner: 'VP Sales',
754
+ steps: [
755
+ {
756
+ order: 1,
757
+ name: 'Welcome',
758
+ description: 'Send welcome email with credentials',
759
+ automationLevel: 'automated',
760
+ duration: 'instant',
761
+ },
762
+ {
763
+ order: 2,
764
+ name: 'Kickoff Call',
765
+ description: 'Introduction call with vendor',
766
+ automationLevel: 'manual',
767
+ duration: '30 minutes',
768
+ owner: 'Vendor Success Manager',
769
+ },
770
+ {
771
+ order: 3,
772
+ name: 'Profile Setup',
773
+ description: 'Help vendor complete premium profile',
774
+ automationLevel: 'semi-automated',
775
+ duration: '1 week',
776
+ owner: 'Vendor Success Manager',
777
+ },
778
+ {
779
+ order: 4,
780
+ name: 'Badge Assignment',
781
+ description: 'Assign verified badges',
782
+ automationLevel: 'semi-automated',
783
+ duration: '1 day',
784
+ },
785
+ {
786
+ order: 5,
787
+ name: 'Training',
788
+ description: 'Train on analytics and lead management',
789
+ automationLevel: 'manual',
790
+ duration: '1 hour',
791
+ owner: 'Vendor Success Manager',
792
+ },
793
+ {
794
+ order: 6,
795
+ name: 'Go Live',
796
+ description: 'Activate premium features',
797
+ automationLevel: 'automated',
798
+ duration: 'instant',
799
+ },
800
+ ],
801
+ metrics: [
802
+ { name: 'Time to Value', target: 7, unit: 'days' },
803
+ { name: 'Profile Completion Rate', target: 95, unit: '%' },
804
+ { name: 'Vendor CSAT', target: 90, unit: '%' },
805
+ ],
806
+ });
807
+ // =============================================================================
808
+ // 8. WORKFLOWS
809
+ // =============================================================================
810
+ export const NewListingWorkflow = Workflow({
811
+ name: 'New Listing Processing',
812
+ description: 'Automated processing of new listing submissions',
813
+ trigger: { type: 'event', event: 'listing.submitted' },
814
+ actions: [
815
+ {
816
+ order: 1,
817
+ type: 'compute',
818
+ name: 'Validate Submission',
819
+ config: {
820
+ checks: ['url_valid', 'name_unique', 'description_length', 'category_valid'],
821
+ },
822
+ },
823
+ {
824
+ order: 2,
825
+ type: 'condition',
826
+ name: 'Check Validation',
827
+ condition: 'validation.passed == true',
828
+ },
829
+ {
830
+ order: 3,
831
+ type: 'api',
832
+ name: 'Enrich Data',
833
+ config: {
834
+ sources: ['clearbit', 'linkedin', 'crunchbase'],
835
+ fields: ['logo', 'employees', 'funding', 'social'],
836
+ },
837
+ },
838
+ {
839
+ order: 4,
840
+ type: 'compute',
841
+ name: 'Auto-Categorize',
842
+ config: {
843
+ model: 'category-classifier',
844
+ confidence_threshold: 0.8,
845
+ },
846
+ },
847
+ {
848
+ order: 5,
849
+ type: 'condition',
850
+ name: 'Check Auto-Approval',
851
+ condition: 'enrichment.score >= 80 && categorization.confidence >= 0.9',
852
+ },
853
+ {
854
+ order: 6,
855
+ type: 'task',
856
+ name: 'Queue for Review',
857
+ config: {
858
+ type: 'listing-review',
859
+ assignTo: 'curator',
860
+ priority: 'normal',
861
+ },
862
+ },
863
+ ],
864
+ });
865
+ export const ReviewVerificationWorkflow = Workflow({
866
+ name: 'Review Verification',
867
+ description: 'Verify authenticity of user reviews',
868
+ trigger: { type: 'event', event: 'review.submitted' },
869
+ actions: [
870
+ {
871
+ order: 1,
872
+ type: 'compute',
873
+ name: 'Spam Detection',
874
+ config: {
875
+ model: 'spam-classifier',
876
+ checks: ['content', 'user_history', 'ip_reputation'],
877
+ },
878
+ },
879
+ {
880
+ order: 2,
881
+ type: 'condition',
882
+ name: 'Check Spam',
883
+ condition: 'spam.score < 0.3',
884
+ },
885
+ {
886
+ order: 3,
887
+ type: 'compute',
888
+ name: 'Verify User',
889
+ config: {
890
+ checks: ['email_verified', 'linked_profile', 'usage_signals'],
891
+ },
892
+ },
893
+ {
894
+ order: 4,
895
+ type: 'compute',
896
+ name: 'Analyze Content',
897
+ config: {
898
+ checks: ['sentiment', 'specificity', 'helpful_vote_prediction'],
899
+ },
900
+ },
901
+ {
902
+ order: 5,
903
+ type: 'condition',
904
+ name: 'Check Auto-Approve',
905
+ condition: 'verification.score >= 70 && content.score >= 60',
906
+ },
907
+ {
908
+ order: 6,
909
+ type: 'api',
910
+ name: 'Publish Review',
911
+ config: { action: 'publish', notify_vendor: true },
912
+ },
913
+ {
914
+ order: 7,
915
+ type: 'task',
916
+ name: 'Queue Manual Review',
917
+ config: {
918
+ type: 'review-moderation',
919
+ assignTo: 'community-mod',
920
+ reason: 'auto_approval_failed',
921
+ },
922
+ },
923
+ ],
924
+ });
925
+ export const VendorEngagementWorkflow = Workflow({
926
+ name: 'Vendor Engagement',
927
+ description: 'Engage free vendors for conversion',
928
+ trigger: { type: 'schedule', cron: '0 10 * * 1' }, // Weekly Monday 10am
929
+ actions: [
930
+ {
931
+ order: 1,
932
+ type: 'compute',
933
+ name: 'Identify High-Value Free Vendors',
934
+ config: {
935
+ criteria: {
936
+ profile_views: '> 1000',
937
+ review_count: '> 10',
938
+ days_since_signup: '> 30',
939
+ has_premium: false,
940
+ },
941
+ },
942
+ },
943
+ {
944
+ order: 2,
945
+ type: 'notification',
946
+ name: 'Send Upgrade Email',
947
+ config: {
948
+ template: 'vendor_upgrade_offer',
949
+ channel: 'email',
950
+ personalize: ['profile_views', 'competitor_comparison'],
951
+ },
952
+ },
953
+ {
954
+ order: 3,
955
+ type: 'wait',
956
+ name: 'Wait 3 Days',
957
+ duration: '3 days',
958
+ },
959
+ {
960
+ order: 4,
961
+ type: 'condition',
962
+ name: 'Check Not Converted',
963
+ condition: 'vendor.plan == "free"',
964
+ },
965
+ {
966
+ order: 5,
967
+ type: 'task',
968
+ name: 'Assign Sales Outreach',
969
+ config: {
970
+ type: 'vendor-outreach',
971
+ assignTo: 'vendor-sales',
972
+ data: ['vendor.id', 'engagement_score'],
973
+ },
974
+ },
975
+ ],
976
+ });
977
+ // =============================================================================
978
+ // 9. FINANCIALS
979
+ // =============================================================================
980
+ export const TechDirectoryFinancials = financials({
981
+ revenue: 3960000, // ARR
982
+ cogs: 594000, // 15% (mostly hosting/data)
983
+ operatingExpenses: 2800000,
984
+ depreciation: 50000,
985
+ interestExpense: 0,
986
+ otherIncome: 30000,
987
+ taxes: 100000,
988
+ });
989
+ export const DirectoryMetrics = {
990
+ mrr: 275000,
991
+ arr: 3300000,
992
+ affiliateRevenue: 660000, // yearly
993
+ totalRevenue: 3960000,
994
+ visitors: {
995
+ monthly: 2100000,
996
+ organic: 1302000, // 62%
997
+ pagesPerSession: 3.8,
998
+ bounceRate: 48,
999
+ },
1000
+ content: {
1001
+ listedTools: 15000,
1002
+ verifiedReviews: 125000,
1003
+ comparisons: 450,
1004
+ guides: 200,
1005
+ },
1006
+ vendors: {
1007
+ total: 15000,
1008
+ paying: 650,
1009
+ premium: 450,
1010
+ enterprise: 50,
1011
+ sponsored: 150,
1012
+ conversionRate: 4.3, // %
1013
+ },
1014
+ arpu: 423, // MRR / paying vendors
1015
+ vendorChurn: 4.5, // %
1016
+ cac: 1200,
1017
+ ltv: 9500, // 22 months avg
1018
+ };
1019
+ // =============================================================================
1020
+ // 10. UTILITY FUNCTIONS
1021
+ // =============================================================================
1022
+ export function getBusinessSummary() {
1023
+ return {
1024
+ company: TechDirectoryBusiness,
1025
+ vision: TechDirectoryVision,
1026
+ goals: TechDirectoryGoals,
1027
+ products: { platform: DirectoryPlatform, vendor: VendorProducts },
1028
+ kpis: TechDirectoryKPIs,
1029
+ okrs: TechDirectoryOKRs,
1030
+ financials: TechDirectoryFinancials,
1031
+ metrics: DirectoryMetrics,
1032
+ };
1033
+ }
1034
+ export function getTrafficMetrics() {
1035
+ return {
1036
+ visitors: DirectoryMetrics.visitors.monthly.toLocaleString(),
1037
+ organic: `${((DirectoryMetrics.visitors.organic / DirectoryMetrics.visitors.monthly) * 100).toFixed(0)}%`,
1038
+ pagesPerSession: DirectoryMetrics.visitors.pagesPerSession,
1039
+ bounceRate: `${DirectoryMetrics.visitors.bounceRate}%`,
1040
+ };
1041
+ }
1042
+ export function getVendorMetrics() {
1043
+ return {
1044
+ total: DirectoryMetrics.vendors.total.toLocaleString(),
1045
+ paying: DirectoryMetrics.vendors.paying,
1046
+ conversionRate: `${DirectoryMetrics.vendors.conversionRate}%`,
1047
+ mrr: $.format(DirectoryMetrics.mrr),
1048
+ arpu: $.format(DirectoryMetrics.arpu),
1049
+ };
1050
+ }
1051
+ export default {
1052
+ business: TechDirectoryBusiness,
1053
+ vision: TechDirectoryVision,
1054
+ goals: TechDirectoryGoals,
1055
+ products: { platform: DirectoryPlatform, vendor: VendorProducts },
1056
+ services: { affiliate: AffiliateServices },
1057
+ organization: TechDirectoryOrg,
1058
+ kpis: TechDirectoryKPIs,
1059
+ okrs: TechDirectoryOKRs,
1060
+ processes: {
1061
+ listingSubmission: ListingSubmissionProcess,
1062
+ reviewModeration: ReviewModerationProcess,
1063
+ vendorOnboarding: VendorOnboardingProcess,
1064
+ },
1065
+ workflows: {
1066
+ newListing: NewListingWorkflow,
1067
+ reviewVerification: ReviewVerificationWorkflow,
1068
+ vendorEngagement: VendorEngagementWorkflow,
1069
+ },
1070
+ financials: TechDirectoryFinancials,
1071
+ metrics: DirectoryMetrics,
1072
+ };
1073
+ //# sourceMappingURL=index.js.map