@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.
- package/.turbo/turbo-build.log +4 -0
- package/LICENSE +21 -0
- package/README.md +147 -0
- package/api-business/index.ts +1179 -0
- package/directory/index.ts +1118 -0
- package/dist/api-business/index.d.ts +221 -0
- package/dist/api-business/index.d.ts.map +1 -0
- package/dist/api-business/index.js +1132 -0
- package/dist/api-business/index.js.map +1 -0
- package/dist/directory/index.d.ts +202 -0
- package/dist/directory/index.d.ts.map +1 -0
- package/dist/directory/index.js +1073 -0
- package/dist/directory/index.js.map +1 -0
- package/dist/index.d.ts +75 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +127 -0
- package/dist/index.js.map +1 -0
- package/dist/marketplace/index.d.ts +242 -0
- package/dist/marketplace/index.d.ts.map +1 -0
- package/dist/marketplace/index.js +1249 -0
- package/dist/marketplace/index.js.map +1 -0
- package/dist/saas/index.d.ts +151 -0
- package/dist/saas/index.d.ts.map +1 -0
- package/dist/saas/index.js +1142 -0
- package/dist/saas/index.js.map +1 -0
- package/dist/startup-studio/index.d.ts +285 -0
- package/dist/startup-studio/index.d.ts.map +1 -0
- package/dist/startup-studio/index.js +1252 -0
- package/dist/startup-studio/index.js.map +1 -0
- package/dist/vc-firm/index.d.ts +248 -0
- package/dist/vc-firm/index.d.ts.map +1 -0
- package/dist/vc-firm/index.js +1335 -0
- package/dist/vc-firm/index.js.map +1 -0
- package/index.ts +151 -0
- package/marketplace/index.ts +1295 -0
- package/package.json +58 -0
- package/saas/index.ts +1188 -0
- package/startup-studio/index.ts +1324 -0
- package/tsconfig.json +12 -0
- package/vc-firm/index.ts +1430 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 .org.ai
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# @primitives/examples
|
|
2
|
+
|
|
3
|
+
Real-world examples of digital businesses built with primitives.org.ai packages.
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { saas, marketplace, vcFirm } from '@primitives/examples'
|
|
7
|
+
|
|
8
|
+
// Complete SaaS business model
|
|
9
|
+
const { business, kpis, metrics } = saas.getBusinessSummary()
|
|
10
|
+
console.log(business.name) // 'CloudMetrics Inc.'
|
|
11
|
+
console.log(metrics.mrr) // 780000
|
|
12
|
+
|
|
13
|
+
// VC firm with portfolio
|
|
14
|
+
const portfolio = vcFirm.getPortfolioSummary()
|
|
15
|
+
console.log(portfolio.unicorns) // 6
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pnpm add @primitives/examples
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Available Examples
|
|
25
|
+
|
|
26
|
+
| Example | Business Type | Description |
|
|
27
|
+
|---------|---------------|-------------|
|
|
28
|
+
| `saas` | SaaS | B2B analytics platform (CloudMetrics) |
|
|
29
|
+
| `apiPlatform` | API Business | Developer-focused API platform (APIHub) |
|
|
30
|
+
| `directory` | Directory | Curated software tools directory (TechDirectory) |
|
|
31
|
+
| `marketplace` | Marketplace | Two-sided freelance marketplace (TalentHub) |
|
|
32
|
+
| `startupStudio` | Startup Studio | B2B SaaS venture builder (VentureForge) |
|
|
33
|
+
| `vcFirm` | VC Firm | Early-stage enterprise VC (Catalyst Ventures) |
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
### Import Individual Examples
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
import { saas, marketplace, vcFirm } from '@primitives/examples'
|
|
41
|
+
|
|
42
|
+
// Each example is a complete business model
|
|
43
|
+
const saasModel = saas
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### List Available Examples
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
import { listExamples } from '@primitives/examples'
|
|
50
|
+
|
|
51
|
+
const examples = listExamples()
|
|
52
|
+
// [
|
|
53
|
+
// { id: 'saas', name: 'SaaS Business', description: '...' },
|
|
54
|
+
// { id: 'marketplace', name: 'Marketplace', description: '...' },
|
|
55
|
+
// ...
|
|
56
|
+
// ]
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Dynamic Loading
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
import { loadExample } from '@primitives/examples'
|
|
63
|
+
|
|
64
|
+
const example = await loadExample('saas')
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## What Each Example Includes
|
|
68
|
+
|
|
69
|
+
Every example is a complete business model with:
|
|
70
|
+
|
|
71
|
+
- **Business Definition** — Mission, values, structure
|
|
72
|
+
- **Vision & Goals** — Strategic direction
|
|
73
|
+
- **Products & Services** — What the business offers
|
|
74
|
+
- **Organization & Roles** — Team structure with FGA/RBAC
|
|
75
|
+
- **KPIs & OKRs** — Key metrics and objectives
|
|
76
|
+
- **Processes & Workflows** — How work gets done
|
|
77
|
+
- **Financials & Metrics** — Revenue, costs, projections
|
|
78
|
+
|
|
79
|
+
## Example: SaaS Business
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
import { saas } from '@primitives/examples'
|
|
83
|
+
|
|
84
|
+
// Get business overview
|
|
85
|
+
const summary = saas.getBusinessSummary()
|
|
86
|
+
console.log(summary.business.name) // CloudMetrics Inc.
|
|
87
|
+
console.log(summary.business.mission) // Help companies understand their data
|
|
88
|
+
console.log(summary.metrics.mrr) // 780000
|
|
89
|
+
console.log(summary.metrics.customers) // 156
|
|
90
|
+
|
|
91
|
+
// Access specific domains
|
|
92
|
+
const { products, organization, kpis } = summary
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Example: VC Firm
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
import { vcFirm } from '@primitives/examples'
|
|
99
|
+
|
|
100
|
+
const portfolio = vcFirm.getPortfolioSummary()
|
|
101
|
+
console.log(portfolio.aum) // Assets under management
|
|
102
|
+
console.log(portfolio.companies) // Number of portfolio companies
|
|
103
|
+
console.log(portfolio.unicorns) // Number of unicorns
|
|
104
|
+
console.log(portfolio.irr) // Internal rate of return
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Example: Marketplace
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
import { marketplace } from '@primitives/examples'
|
|
111
|
+
|
|
112
|
+
const summary = marketplace.getBusinessSummary()
|
|
113
|
+
console.log(summary.metrics.gmv) // Gross merchandise value
|
|
114
|
+
console.log(summary.metrics.sellers) // Active sellers
|
|
115
|
+
console.log(summary.metrics.buyers) // Active buyers
|
|
116
|
+
console.log(summary.metrics.takeRate) // Platform take rate
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Used Packages
|
|
120
|
+
|
|
121
|
+
These examples demonstrate integration of:
|
|
122
|
+
|
|
123
|
+
- [`business-as-code`](../business-as-code) — Business definitions
|
|
124
|
+
- [`ai-database`](../ai-database) — Data modeling
|
|
125
|
+
- [`digital-workers`](../digital-workers) — Worker definitions
|
|
126
|
+
- [`ai-functions`](../ai-functions) — AI capabilities
|
|
127
|
+
|
|
128
|
+
## Use Cases
|
|
129
|
+
|
|
130
|
+
- **Learning** — Understand how to structure digital businesses
|
|
131
|
+
- **Templates** — Starting points for new projects
|
|
132
|
+
- **Testing** — Reference implementations for testing
|
|
133
|
+
- **Demos** — Showcase platform capabilities
|
|
134
|
+
|
|
135
|
+
## API Reference
|
|
136
|
+
|
|
137
|
+
| Export | Description |
|
|
138
|
+
|--------|-------------|
|
|
139
|
+
| `saas` | SaaS business model |
|
|
140
|
+
| `apiPlatform` | API platform model |
|
|
141
|
+
| `directory` | Directory business model |
|
|
142
|
+
| `marketplace` | Marketplace model |
|
|
143
|
+
| `startupStudio` | Startup studio model |
|
|
144
|
+
| `vcFirm` | VC firm model |
|
|
145
|
+
| `listExamples()` | List all available examples |
|
|
146
|
+
| `loadExample(id)` | Dynamically load an example |
|
|
147
|
+
| `examples` | Object with lazy loaders |
|