oneie 2.0.3 → 2.0.6
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.md +220 -29
- package/LICENSE.md +84 -0
- package/README.md +489 -931
- package/dist/copy-claude-config.d.ts.map +1 -1
- package/dist/copy-claude-config.js +3 -1
- package/dist/copy-claude-config.js.map +1 -1
- package/dist/sync-agents.d.ts.map +1 -1
- package/dist/sync-agents.js +3 -1
- package/dist/sync-agents.js.map +1 -1
- package/dist/sync-ontology.d.ts.map +1 -1
- package/dist/sync-ontology.js +9 -7
- package/dist/sync-ontology.js.map +1 -1
- package/folders.yaml +78 -17
- package/one/.obsidian/workspace.json +6 -6
- package/one/events/CASCADE-2-BACKEND-AGNOSTIC.md +412 -0
- package/one/events/FEATURE-2-4-COMPLETE.md +302 -0
- package/one/events/FEATURE_2_3_COMPLETE.md +575 -0
- package/one/events/GROUPS-MIGRATION.md +625 -0
- package/one/events/INSTALL-TESTS.md +293 -0
- package/one/events/INTEGRATION-ARCHITECTURE.md +561 -0
- package/one/events/INTEGRATION-CHECKLIST.md +1234 -0
- package/one/events/INTEGRATION-ORCHESTRATION.md +2623 -0
- package/one/events/INTEGRATION-SUMMARY.md +653 -0
- package/one/events/MIGRATION-REPORT.md +435 -0
- package/one/events/MIGRATION.md +69 -0
- package/one/events/README-archived.md +519 -0
- package/one/events/TEST-SUMMARY.md +393 -0
- package/one/events/TESTS-QUICK-REF.md +262 -0
- package/one/groups/groups.md +543 -0
- package/one/knowledge/CLOUDFLARE_ENV_SETUP.md +49 -0
- package/one/knowledge/architecture-any-backend.md +1366 -0
- package/one/knowledge/docs/flow.md +0 -0
- package/one/knowledge/ontology-documentation.md +18 -18
- package/one/knowledge/ontology.md +154 -143
- package/one/knowledge/ontology.md.backup +2822 -0
- package/one/knowledge/ontology.yaml +87 -87
- package/one/knowledge/provider-creation-guide.md +1064 -0
- package/one/knowledge/todo.md +251 -0
- package/one/license.md +84 -0
- package/one/things/CHECKLIST.md +356 -0
- package/one/things/ONE.md +510 -0
- package/one/things/{cli.md → cli/cli.md} +27 -4
- package/one/things/features/2-1-dataprovider-interface.md +2358 -0
- package/one/things/features/2-2-config-system.md +3075 -0
- package/one/things/features/2-3-effectts-services.md +1498 -0
- package/one/things/features/2-4-react-hooks.md +2120 -0
- package/one/things/features/2-5-auth-migration.md +2046 -0
- package/one/things/features/2-6-dashboard-migration.md +1985 -0
- package/one/things/features/2-7-alternative-providers.md +2505 -0
- package/one/things/features/2-7-implementation-report.md +680 -0
- package/one/things/features/2-cli.md +39 -39
- package/one/things/features/2-design.md +1738 -0
- package/one/things/features/2-tests.md +520 -0
- package/one/things/features/AUTH_HOOKS_IMPLEMENTATION.md +521 -0
- package/one/things/features/DECOUPLING.md +272 -0
- package/one/things/features/DEPLOYMENT.md +452 -0
- package/one/things/features/IMPLEMENTATION_SUMMARY.md +316 -0
- package/one/things/features/dataprovider-interface/1-tests.md +1522 -0
- package/one/things/features/improve.md +843 -0
- package/one/things/features/remove-convex-deps.md +45 -0
- package/one/things/features/top-features.md +79 -0
- package/one/things/ideas/2-backend-agnostic-frontend.md +384 -0
- package/one/things/plans/2-backend-agnostic-frontend.md +543 -0
- package/one/things/plans/3-groups.md +502 -0
- package/one/things/plans/backend-agnostic-frontend.md +323 -0
- package/one/things/plans/deploy-to-cloudflare.md +581 -0
- package/one/things/plans/organizations-to-groups.md +705 -0
- package/one/things/plans/release.md +432 -0
- package/one/things/products/ontology.md +1 -1
- package/one/things/system.md +600 -0
- package/one/things/tests/2-1-dataprovider-interface.md +1144 -0
- package/one/things/tests/2-1-test-analysis.md +496 -0
- package/one/things/vision/elegant-interface.md +214 -0
- package/package.json +1 -1
- package/one/organisation/organisation.md +0 -438
- package/one/repomix-output.md +0 -92634
- /package/one/{things → connections}/agentkit.md +0 -0
- /package/one/{things → connections}/copilotkit.md +0 -0
- /package/one/{organisation → groups}/one.md +0 -0
- /package/one/{organisation → groups}/revenue.md +0 -0
- /package/one/{organisation → groups}/strategy.md +0 -0
- /package/one/{organisation → groups}/vision.md +0 -0
- /package/one/things/{cli-code.md → cli/cli-code.md} +0 -0
- /package/one/things/{cli-compiler-code.md → cli/cli-compiler-code.md} +0 -0
package/README.md
CHANGED
|
@@ -1,1048 +1,606 @@
|
|
|
1
|
-
# ONE
|
|
1
|
+
# ONE
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
```
|
|
4
|
+
██████╗ ███╗ ██╗███████╗
|
|
5
|
+
██╔═══██╗████╗ ██║██╔════╝
|
|
6
|
+
██║ ██║██╔██╗ ██║█████╗
|
|
7
|
+
██║ ██║██║╚██╗██║██╔══╝
|
|
8
|
+
╚██████╔╝██║ ╚████║███████╗
|
|
9
|
+
╚═════╝ ╚═╝ ╚═══╝╚══════╝
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
Make Your Ideas Real
|
|
12
|
+
https://one.ie
|
|
13
|
+
type
|
|
14
|
+
npx oneie
|
|
15
|
+
/claude
|
|
16
|
+
/one
|
|
17
|
+
start
|
|
18
|
+
```
|
|
11
19
|
|
|
12
|
-
|
|
20
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
21
|
+
`/now` `/next` `/todo` `/done` `/build` `/design` `/deploy` `/see`
|
|
22
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
13
23
|
|
|
14
|
-
|
|
15
|
-
- **CASCADE Workflow** - 8 AI agents that turn ideas into working code
|
|
16
|
-
- **Ontology-Driven Development** - Build once, scale infinitely
|
|
24
|
+
**Build apps, websites and AI agents in English and deploy at the edge. Free!**
|
|
17
25
|
|
|
18
26
|
---
|
|
19
27
|
|
|
20
|
-
##
|
|
28
|
+
## ✨ What is ONE?
|
|
21
29
|
|
|
22
|
-
|
|
23
|
-
# 1. Install the ontology (one-time setup)
|
|
24
|
-
npx oneie
|
|
30
|
+
ONE is the **6-dimension reality model** for building AI-native applications.
|
|
25
31
|
|
|
26
|
-
|
|
27
|
-
claude
|
|
32
|
+
Instead of creating dozens of database tables, ONE maps everything to **6 universal dimensions**:
|
|
28
33
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
1. **Groups** – Who owns what (multi-tenant isolation + hierarchical nesting)
|
|
35
|
+
2. **People** – Who can do what (authorization & governance)
|
|
36
|
+
3. **Things** – What exists (66 entity types)
|
|
37
|
+
4. **Connections** – How they relate (25 relationship types)
|
|
38
|
+
5. **Events** – What happened (67 event types, complete audit trail)
|
|
39
|
+
6. **Knowledge** – What it means (embeddings, vectors, RAG)
|
|
32
40
|
|
|
33
|
-
|
|
41
|
+
**Everything else is just data.**
|
|
34
42
|
|
|
35
43
|
---
|
|
36
44
|
|
|
37
|
-
##
|
|
45
|
+
## 🚀 Why ONE?
|
|
38
46
|
|
|
39
|
-
|
|
47
|
+
Traditional platforms create custom tables for every feature:
|
|
48
|
+
- Users table, Products table, Orders table, Messages table...
|
|
49
|
+
- 50+ tables, 200+ columns, endless complexity
|
|
50
|
+
- Schema changes break everything
|
|
51
|
+
- AI agents can't understand your database
|
|
40
52
|
|
|
41
|
-
|
|
53
|
+
**ONE's approach:**
|
|
42
54
|
|
|
43
|
-
|
|
55
|
+
Map every feature to the 6 dimensions → Scale infinitely without schema changes
|
|
44
56
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
│
|
|
52
|
-
├── things/ # Dimension 3: 66+ entity types
|
|
53
|
-
│ ├── agents/ # 8 AI agent definitions
|
|
54
|
-
│ ├── cascade/ # CASCADE workflow system
|
|
55
|
-
│ └── components.md # shadcn/ui components
|
|
56
|
-
│
|
|
57
|
-
├── connections/ # Dimension 4: 25+ relationship types
|
|
58
|
-
│ ├── workflows/ # How agents coordinate
|
|
59
|
-
│ └── protocols.md # Communication patterns
|
|
60
|
-
│
|
|
61
|
-
├── events/ # Dimension 5: 67+ event types
|
|
62
|
-
│ └── events.md # Complete event catalog
|
|
63
|
-
│
|
|
64
|
-
├── people/ # Dimension 2: Roles & authorization
|
|
65
|
-
│ └── {your-name}.md # Your profile (created by CLI)
|
|
66
|
-
│
|
|
67
|
-
└── organisation/ # Dimension 1: Multi-tenant isolation
|
|
68
|
-
└── {your-org}.md # Your organization (created by CLI)
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### 2. 🤖 Syncs 8 AI Agents to `.claude/agents/`
|
|
57
|
+
**Examples:**
|
|
58
|
+
- Lemonade stand? ✅ Works
|
|
59
|
+
- Enterprise SaaS? ✅ Works
|
|
60
|
+
- Social network? ✅ Works
|
|
61
|
+
- E-commerce? ✅ Works
|
|
62
|
+
- AI agent platform? ✅ Works
|
|
72
63
|
|
|
73
|
-
|
|
64
|
+
Same 6 dimensions. Different properties.
|
|
74
65
|
|
|
75
|
-
|
|
76
|
-
2. **Backend Specialist** - Database, APIs, business logic
|
|
77
|
-
3. **Frontend Specialist** - Pages, components, UI/UX
|
|
78
|
-
4. **Integration Specialist** - Connects everything together
|
|
79
|
-
5. **Quality Agent** - Tests, validation, acceptance criteria
|
|
80
|
-
6. **Design Agent** - Wireframes that enable tests to pass
|
|
81
|
-
7. **Problem Solver** - Fixes failures with ultrathink mode
|
|
82
|
-
8. **Documenter** - Complete documentation auto-generated
|
|
83
|
-
|
|
84
|
-
### 3. 👤 Creates Your Profile (Ontology-Mapped)
|
|
66
|
+
---
|
|
85
67
|
|
|
86
|
-
|
|
68
|
+
## 🎯 Simple Enough for Children
|
|
87
69
|
|
|
88
70
|
```typescript
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
71
|
+
// Emma's Lemonade Stand
|
|
72
|
+
|
|
73
|
+
// 1. Create your group
|
|
74
|
+
const myStand = await createGroup({
|
|
75
|
+
name: "Emma's Lemonade Stand",
|
|
76
|
+
slug: "emmas-lemonade",
|
|
77
|
+
type: "business"
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// 2. You are the owner (a person)
|
|
81
|
+
const me = await createPerson({
|
|
82
|
+
name: "Emma",
|
|
92
83
|
role: "org_owner",
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
### 5. 📖 (Optional) Clones Documentation for AI
|
|
130
|
-
|
|
131
|
-
Third-party docs for offline AI access:
|
|
132
|
-
|
|
133
|
-
- Astro documentation
|
|
134
|
-
- Convex documentation
|
|
135
|
-
- Effect.ts documentation
|
|
136
|
-
- React documentation
|
|
137
|
-
- Tailwind CSS documentation
|
|
84
|
+
groupId: myStand._id
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
// 3. Create lemonade (a thing)
|
|
88
|
+
const lemonade = await createThing({
|
|
89
|
+
type: "product",
|
|
90
|
+
name: "Fresh Lemonade",
|
|
91
|
+
groupId: myStand._id,
|
|
92
|
+
properties: {
|
|
93
|
+
price: 1.00,
|
|
94
|
+
inventory: 20
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// 4. Customer buys it (a connection)
|
|
99
|
+
await createConnection({
|
|
100
|
+
from: customer._id,
|
|
101
|
+
to: lemonade._id,
|
|
102
|
+
type: "purchased",
|
|
103
|
+
groupId: myStand._id
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
// 5. Log the sale (an event)
|
|
107
|
+
await createEvent({
|
|
108
|
+
type: "tokens_purchased",
|
|
109
|
+
actor: customer._id,
|
|
110
|
+
target: lemonade._id,
|
|
111
|
+
groupId: myStand._id,
|
|
112
|
+
metadata: { amount: 1.00, weather: "sunny" }
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
// 6. AI learns (knowledge)
|
|
116
|
+
// "Sunny days = more sales. Make 30 cups tomorrow!"
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**That's it.** 6 dimensions model reality completely.
|
|
138
120
|
|
|
139
121
|
---
|
|
140
122
|
|
|
141
|
-
##
|
|
142
|
-
|
|
143
|
-
ONE models reality through 6 universal dimensions:
|
|
144
|
-
|
|
145
|
-
### 1. Organizations (Dimension 1)
|
|
146
|
-
|
|
147
|
-
**Multi-tenant isolation** - Who owns what at the organization level
|
|
123
|
+
## 🏢 Powerful Enough for Enterprises
|
|
148
124
|
|
|
149
125
|
```typescript
|
|
150
|
-
//
|
|
151
|
-
{
|
|
152
|
-
type: "organization",
|
|
153
|
-
name: "Your Company",
|
|
154
|
-
plan: "enterprise", // Unlimited resources
|
|
155
|
-
status: "active"
|
|
156
|
-
}
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
### 2. People (Dimension 2)
|
|
126
|
+
// Acme Corporation - Enterprise SaaS with Hierarchical Groups
|
|
160
127
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
128
|
+
// Top-level organization group
|
|
129
|
+
const acmeCorp = await createGroup({
|
|
130
|
+
name: "Acme Corporation",
|
|
131
|
+
slug: "acme-corp",
|
|
132
|
+
type: "organization",
|
|
133
|
+
plan: "enterprise",
|
|
134
|
+
limits: {
|
|
135
|
+
users: 100,
|
|
136
|
+
storage: 1000, // GB
|
|
137
|
+
apiCalls: 1000000
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
// Department groups (nested)
|
|
142
|
+
const engineering = await createGroup({
|
|
143
|
+
name: "Engineering",
|
|
144
|
+
slug: "engineering",
|
|
145
|
+
type: "department",
|
|
146
|
+
parentGroupId: acmeCorp._id
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
const backend = await createGroup({
|
|
150
|
+
name: "Backend Team",
|
|
151
|
+
slug: "backend",
|
|
152
|
+
type: "team",
|
|
153
|
+
parentGroupId: engineering._id
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
// Role-based access control
|
|
157
|
+
const ceo = await createPerson({
|
|
158
|
+
name: "Jane CEO",
|
|
168
159
|
role: "org_owner",
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
160
|
+
groupId: acmeCorp._id
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
// AI sales agent (a thing)
|
|
164
|
+
const salesAgent = await createThing({
|
|
165
|
+
type: "sales_agent",
|
|
166
|
+
name: "Acme Sales AI",
|
|
167
|
+
groupId: acmeCorp._id,
|
|
168
|
+
properties: {
|
|
169
|
+
systemPrompt: "You are a friendly sales assistant...",
|
|
170
|
+
temperature: 0.7
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
// Lead management (things + connections)
|
|
175
|
+
const lead = await createThing({
|
|
176
|
+
type: "lead",
|
|
177
|
+
name: "John Smith - Enterprise Lead",
|
|
178
|
+
groupId: acmeCorp._id,
|
|
179
|
+
properties: {
|
|
180
|
+
email: "john@enterprise.com",
|
|
181
|
+
budget: 100000,
|
|
182
|
+
status: "qualified"
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
// AI agent follows up (connection + event)
|
|
187
|
+
await createConnection({
|
|
188
|
+
from: salesAgent._id,
|
|
189
|
+
to: lead._id,
|
|
190
|
+
type: "communicated",
|
|
191
|
+
groupId: acmeCorp._id,
|
|
192
|
+
metadata: {
|
|
193
|
+
protocol: "email",
|
|
194
|
+
subject: "Following up on our conversation"
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
await createEvent({
|
|
199
|
+
type: "communication_event",
|
|
200
|
+
actor: salesAgent._id,
|
|
201
|
+
target: lead._id,
|
|
202
|
+
groupId: acmeCorp._id,
|
|
203
|
+
metadata: {
|
|
204
|
+
protocol: "email",
|
|
205
|
+
sentiment: "positive"
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
// AI learns from all sales interactions (knowledge)
|
|
210
|
+
const context = await queryKnowledge({
|
|
211
|
+
groupId: acmeCorp._id,
|
|
212
|
+
query: "enterprise software objections pricing",
|
|
213
|
+
k: 10
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
const aiResponse = await generateResponse({
|
|
217
|
+
context,
|
|
218
|
+
prompt: "Address pricing concerns"
|
|
219
|
+
});
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**Perfect data isolation. Clear governance. Hierarchical structure. Infinite scale.**
|
|
201
223
|
|
|
202
|
-
|
|
203
|
-
// Events CASCADE logs automatically
|
|
204
|
-
{ type: "course_created", actor: creator }
|
|
205
|
-
{ type: "lesson_created", actor: creator }
|
|
206
|
-
{ type: "student_enrolled", actor: student }
|
|
207
|
-
{ type: "lesson_completed", actor: student }
|
|
208
|
-
{ type: "tokens_purchased", actor: student }
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
### 6. Knowledge (Dimension 6)
|
|
224
|
+
---
|
|
212
225
|
|
|
213
|
-
|
|
226
|
+
## 👥 Social: Friend Circles
|
|
214
227
|
|
|
215
228
|
```typescript
|
|
216
|
-
//
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
229
|
+
// Emma's Friend Circle - Social Groups
|
|
230
|
+
|
|
231
|
+
// Create friend circle
|
|
232
|
+
const emmasFriends = await createGroup({
|
|
233
|
+
name: "Emma's Friends",
|
|
234
|
+
slug: "emmas-friends",
|
|
235
|
+
type: "social"
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
// Create event group (nested under friend circle)
|
|
239
|
+
const birthdayParty = await createGroup({
|
|
240
|
+
name: "Birthday Party 2025",
|
|
241
|
+
slug: "birthday-party-2025",
|
|
242
|
+
type: "event",
|
|
243
|
+
parentGroupId: emmasFriends._id,
|
|
244
|
+
properties: {
|
|
245
|
+
date: "2025-12-15",
|
|
246
|
+
location: "Emma's House",
|
|
247
|
+
capacity: 20
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
// Add friends to the circle
|
|
252
|
+
const alice = await createPerson({
|
|
253
|
+
name: "Alice",
|
|
254
|
+
role: "org_user",
|
|
255
|
+
groupId: emmasFriends._id
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
// Share photos (things) in the event group
|
|
259
|
+
const photo = await createThing({
|
|
260
|
+
type: "media",
|
|
261
|
+
name: "Birthday Cake Photo",
|
|
262
|
+
groupId: birthdayParty._id,
|
|
263
|
+
properties: {
|
|
264
|
+
url: "https://cdn.example.com/photo.jpg",
|
|
265
|
+
takenAt: Date.now()
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
// Track RSVPs (connections)
|
|
270
|
+
await createConnection({
|
|
271
|
+
from: alice._id,
|
|
272
|
+
to: birthdayParty._id,
|
|
273
|
+
type: "member_of",
|
|
274
|
+
groupId: birthdayParty._id,
|
|
275
|
+
metadata: {
|
|
276
|
+
rsvp: "yes",
|
|
277
|
+
guestsCount: 1
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
**Nested groups enable rich social structures. Friends → Events → Photos → Memories.**
|
|
220
283
|
|
|
221
284
|
---
|
|
222
285
|
|
|
223
|
-
##
|
|
224
|
-
|
|
225
|
-
After running `npx oneie`, you can use CASCADE to build anything:
|
|
226
|
-
|
|
227
|
-
```bash
|
|
228
|
-
claude # Start Claude Code
|
|
229
|
-
/one # Open CASCADE interface
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
### The 6-Level Workflow
|
|
286
|
+
## 🪙 DAO: Decentralized Organizations
|
|
233
287
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
288
|
+
```typescript
|
|
289
|
+
// CoolDAO - Blockchain-Native Organization
|
|
290
|
+
|
|
291
|
+
// Create DAO group
|
|
292
|
+
const coolDAO = await createGroup({
|
|
293
|
+
name: "CoolDAO",
|
|
294
|
+
slug: "cool-dao",
|
|
295
|
+
type: "dao",
|
|
296
|
+
properties: {
|
|
297
|
+
blockchain: "base",
|
|
298
|
+
governanceToken: "COOL",
|
|
299
|
+
treasuryAddress: "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
|
|
303
|
+
// Create treasury committee (nested)
|
|
304
|
+
const treasury = await createGroup({
|
|
305
|
+
name: "Treasury",
|
|
306
|
+
slug: "treasury",
|
|
307
|
+
type: "committee",
|
|
308
|
+
parentGroupId: coolDAO._id
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
// Create governance committee (nested)
|
|
312
|
+
const governance = await createGroup({
|
|
313
|
+
name: "Governance Committee",
|
|
314
|
+
slug: "governance",
|
|
315
|
+
type: "committee",
|
|
316
|
+
parentGroupId: coolDAO._id
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
// DAO member with token holdings
|
|
320
|
+
const member = await createPerson({
|
|
321
|
+
name: "DAO Member",
|
|
322
|
+
role: "org_user",
|
|
323
|
+
groupId: coolDAO._id
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
// Track token holdings (thing + connection)
|
|
327
|
+
const tokenHolding = await createThing({
|
|
328
|
+
type: "token",
|
|
329
|
+
name: "COOL Token Holding",
|
|
330
|
+
groupId: coolDAO._id,
|
|
331
|
+
properties: {
|
|
332
|
+
symbol: "COOL",
|
|
333
|
+
amount: 1000,
|
|
334
|
+
chain: "base"
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
|
|
338
|
+
await createConnection({
|
|
339
|
+
from: member._id,
|
|
340
|
+
to: tokenHolding._id,
|
|
341
|
+
type: "holds_tokens",
|
|
342
|
+
groupId: coolDAO._id
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
// Governance proposal (thing)
|
|
346
|
+
const proposal = await createThing({
|
|
347
|
+
type: "proposal",
|
|
348
|
+
name: "Allocate 10% Treasury to Marketing",
|
|
349
|
+
groupId: governance._id,
|
|
350
|
+
properties: {
|
|
351
|
+
proposer: member._id,
|
|
352
|
+
status: "active",
|
|
353
|
+
votesFor: 5000,
|
|
354
|
+
votesAgainst: 2000,
|
|
355
|
+
quorum: 10000
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
|
|
359
|
+
// Vote event
|
|
360
|
+
await createEvent({
|
|
361
|
+
type: "vote_cast",
|
|
362
|
+
actor: member._id,
|
|
363
|
+
target: proposal._id,
|
|
364
|
+
groupId: governance._id,
|
|
365
|
+
metadata: {
|
|
366
|
+
choice: "for",
|
|
367
|
+
votingPower: 1000
|
|
368
|
+
}
|
|
369
|
+
});
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
**Groups model DAOs perfectly: Top-level DAO → Committees → Proposals → Votes.**
|
|
278
373
|
|
|
279
374
|
---
|
|
280
375
|
|
|
281
|
-
##
|
|
282
|
-
|
|
283
|
-
### Philosophy: Ontology-Driven Development
|
|
284
|
-
|
|
285
|
-
Traditional approach:
|
|
286
|
-
|
|
287
|
-
```
|
|
288
|
-
You write code → It works for this specific use case → Limited flexibility
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
ONE approach:
|
|
292
|
-
|
|
293
|
-
```
|
|
294
|
-
You describe reality → Ontology maps it → AI generates code → Works for ANY use case
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
### Examples of What You Can Build
|
|
376
|
+
## 🛠️ Technology Stack
|
|
298
377
|
|
|
299
|
-
**
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
**2. Creator Economy**
|
|
308
|
-
|
|
309
|
-
```
|
|
310
|
-
Things: creators, fans, tokens, content, ai_clones
|
|
311
|
-
Connections: owns, holds_tokens, following
|
|
312
|
-
Events: tokens_purchased, content_created, chat_interaction
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
**3. Marketplace**
|
|
316
|
-
|
|
317
|
-
```
|
|
318
|
-
Things: sellers, buyers, products, orders
|
|
319
|
-
Connections: owns, purchased, listed_on
|
|
320
|
-
Events: order_created, payment_completed, item_shipped
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
**4. Social Network**
|
|
324
|
-
|
|
325
|
-
```
|
|
326
|
-
Things: users, posts, comments, groups
|
|
327
|
-
Connections: following, member_of, commented_on
|
|
328
|
-
Events: post_created, user_followed, comment_added
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
**5. SaaS Platform**
|
|
332
|
-
|
|
333
|
-
```
|
|
334
|
-
Things: organizations, users, subscriptions, features
|
|
335
|
-
Connections: member_of, subscribed_to, has_access
|
|
336
|
-
Events: user_invited, subscription_upgraded, feature_used
|
|
337
|
-
```
|
|
338
|
-
|
|
339
|
-
### The Key Insight
|
|
378
|
+
**Frontend:**
|
|
379
|
+
- Astro 5.14+ (SSR + SSG)
|
|
380
|
+
- React 19 (Islands architecture)
|
|
381
|
+
- Tailwind v4 (CSS-based config)
|
|
382
|
+
- shadcn/ui (50+ components)
|
|
383
|
+
- TypeScript 5.9+ (Strict mode)
|
|
340
384
|
|
|
341
|
-
**
|
|
385
|
+
**Backend:**
|
|
386
|
+
- Convex (Real-time database)
|
|
387
|
+
- Better Auth (6 auth methods)
|
|
388
|
+
- Effect.ts (Functional services)
|
|
389
|
+
- Rate limiting & security
|
|
342
390
|
|
|
343
|
-
|
|
344
|
-
-
|
|
345
|
-
-
|
|
391
|
+
**AI Layer:**
|
|
392
|
+
- Vercel AI SDK (Multi-provider)
|
|
393
|
+
- OpenAI (GPT-4, GPT-3.5)
|
|
394
|
+
- Anthropic (Claude 3.5 Sonnet)
|
|
395
|
+
- OpenRouter (100+ models)
|
|
346
396
|
|
|
347
|
-
|
|
397
|
+
**Infrastructure:**
|
|
398
|
+
- Cloudflare Pages (Edge SSR)
|
|
399
|
+
- Convex Cloud (Backend)
|
|
400
|
+
- Stripe (Payments)
|
|
401
|
+
- Multi-chain (Sui, Base, Solana)
|
|
348
402
|
|
|
349
403
|
---
|
|
350
404
|
|
|
351
|
-
## Quick Start
|
|
352
|
-
|
|
353
|
-
### 1. Install ONE
|
|
405
|
+
## 📦 Quick Start
|
|
354
406
|
|
|
355
407
|
```bash
|
|
408
|
+
# Option 1: Bootstrap new project
|
|
356
409
|
npx oneie
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
**What it does:**
|
|
360
410
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
**Time:** 5 minutes (interactive prompts)
|
|
368
|
-
|
|
369
|
-
### 2. Start Claude Code
|
|
370
|
-
|
|
371
|
-
```bash
|
|
372
|
-
claude
|
|
411
|
+
# Option 2: Clone and develop
|
|
412
|
+
git clone https://github.com/one-platform/one
|
|
413
|
+
cd ONE
|
|
414
|
+
pnpm install
|
|
415
|
+
pnpm dev
|
|
373
416
|
```
|
|
374
417
|
|
|
375
|
-
**
|
|
376
|
-
|
|
377
|
-
- Starts Claude Code in your project
|
|
378
|
-
- Loads ontology context from `one/`
|
|
379
|
-
- Loads 8 agent definitions from `.claude/agents/`
|
|
380
|
-
- Ready to execute CASCADE workflow
|
|
381
|
-
|
|
382
|
-
**Time:** Instant
|
|
383
|
-
|
|
384
|
-
### 3. Build Your Website
|
|
418
|
+
**Development Commands:**
|
|
385
419
|
|
|
386
420
|
```bash
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
- Opens CASCADE interface
|
|
393
|
-
- You describe what you want to build
|
|
394
|
-
- 8 AI agents execute in parallel
|
|
395
|
-
- Working website with tests and docs
|
|
421
|
+
# Frontend
|
|
422
|
+
cd frontend/
|
|
423
|
+
bun run dev # localhost:4321
|
|
424
|
+
bun run build # Production build
|
|
425
|
+
bunx astro check # Type checking
|
|
396
426
|
|
|
397
|
-
|
|
427
|
+
# Backend
|
|
428
|
+
cd backend/
|
|
429
|
+
npx convex dev # Watch mode
|
|
430
|
+
npx convex deploy # Production
|
|
398
431
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
Your project will have this structure:
|
|
404
|
-
|
|
405
|
-
```
|
|
406
|
-
your-project/
|
|
407
|
-
├── one/ # 6-dimension ontology (100+ files)
|
|
408
|
-
│ ├── connections/ # Dimension 4: Relationships
|
|
409
|
-
│ ├── events/ # Dimension 5: Behavior patterns
|
|
410
|
-
│ ├── knowledge/ # Dimension 6: Embeddings & AI
|
|
411
|
-
│ ├── organisation/ # Dimension 1: Organizations
|
|
412
|
-
│ ├── people/ # Dimension 2: People & roles
|
|
413
|
-
│ └── things/ # Dimension 3: Entities
|
|
414
|
-
│
|
|
415
|
-
├── .claude/ # AI agent integration
|
|
416
|
-
│ ├── agents/ # 12 specialized agents
|
|
417
|
-
│ ├── commands/ # Custom commands
|
|
418
|
-
│ └── hooks/ # Pre/post hooks
|
|
419
|
-
│
|
|
420
|
-
├── frontend/ # (Optional) Astro + React website
|
|
421
|
-
└── docs/ # (Optional) Third-party docs
|
|
422
|
-
├── astro/
|
|
423
|
-
├── convex/
|
|
424
|
-
├── effect/
|
|
425
|
-
├── react/
|
|
426
|
-
└── tailwind/
|
|
432
|
+
# Testing
|
|
433
|
+
cd frontend/
|
|
434
|
+
bun test # All tests
|
|
435
|
+
bun test test/auth # Auth tests (50+ cases)
|
|
427
436
|
```
|
|
428
437
|
|
|
429
438
|
---
|
|
430
439
|
|
|
431
|
-
##
|
|
432
|
-
|
|
433
|
-
### Traditional Development
|
|
434
|
-
|
|
435
|
-
```
|
|
436
|
-
1. Learn frameworks (weeks)
|
|
437
|
-
2. Set up environment (hours)
|
|
438
|
-
3. Write boilerplate (days)
|
|
439
|
-
4. Implement features (weeks)
|
|
440
|
-
5. Write tests (days)
|
|
441
|
-
6. Write docs (days)
|
|
442
|
-
7. Debug (weeks)
|
|
443
|
-
```
|
|
444
|
-
|
|
445
|
-
**Total: 2-3 months per feature**
|
|
446
|
-
|
|
447
|
-
### ONE Development
|
|
448
|
-
|
|
449
|
-
```
|
|
450
|
-
1. npx oneie (5 minutes)
|
|
451
|
-
2. claude (instant)
|
|
452
|
-
3. /one "Build a course platform" (20 seconds)
|
|
453
|
-
4. Done ✅
|
|
454
|
-
```
|
|
455
|
-
|
|
456
|
-
**Total: 20 seconds per feature**
|
|
457
|
-
|
|
458
|
-
### The Secret: Ontology-Driven Development
|
|
440
|
+
## 📚 Documentation
|
|
459
441
|
|
|
460
|
-
**
|
|
461
|
-
|
|
442
|
+
**Core Concepts:**
|
|
443
|
+
- [6-Dimension Ontology](/one/knowledge/ontology.md) – Complete specification
|
|
444
|
+
- [Architecture](/one/knowledge/architecture.md) – How it all fits together
|
|
445
|
+
- [Workflow Guide](/one/connections/workflow.md) – Development process
|
|
462
446
|
|
|
463
|
-
|
|
447
|
+
**Dimensions:**
|
|
448
|
+
- [Groups](/one/connections/organisation.md) – Multi-tenancy & hierarchies
|
|
449
|
+
- [People](/one/connections/people.md) – Authorization & roles
|
|
450
|
+
- [Things](/one/connections/things.md) – 66 entity types
|
|
451
|
+
- [Connections](/one/connections/connections.md) – 25 relationship types
|
|
452
|
+
- [Events](/one/connections/events.md) – 67 event types
|
|
453
|
+
- [Knowledge](/one/connections/knowledge.md) – RAG & intelligence
|
|
464
454
|
|
|
465
|
-
|
|
466
|
-
-
|
|
467
|
-
-
|
|
468
|
-
-
|
|
469
|
-
- ✅ AI understands perfectly (ontology is machine-readable)
|
|
455
|
+
**Implementation:**
|
|
456
|
+
- [Frontend Guide](/one/things/frontend.md) – UI patterns
|
|
457
|
+
- [Backend Guide](/one/things/hono.md) – API & services
|
|
458
|
+
- [Examples](/one/things/implementation-examples.md) – Real-world patterns
|
|
470
459
|
|
|
471
460
|
---
|
|
472
461
|
|
|
473
|
-
##
|
|
474
|
-
|
|
475
|
-
### Step 1: Install ONE
|
|
476
|
-
|
|
477
|
-
```bash
|
|
478
|
-
npx oneie
|
|
479
|
-
# Enter your name, email, username
|
|
480
|
-
# Enter your organization name, slug, domain
|
|
481
|
-
# Choose to clone frontend (yes)
|
|
482
|
-
# Choose to clone docs (optional)
|
|
483
|
-
```
|
|
484
|
-
|
|
485
|
-
**What gets created:**
|
|
486
|
-
|
|
487
|
-
```
|
|
488
|
-
✓ Copied 112 ontology files
|
|
489
|
-
✓ Synced 8 agent definitions
|
|
490
|
-
✓ Created one/people/your-name.md
|
|
491
|
-
✓ Created one/organisation/your-company.md
|
|
492
|
-
✓ Cloned and configured frontend
|
|
493
|
-
```
|
|
494
|
-
|
|
495
|
-
### Step 2: Start Claude Code
|
|
496
|
-
|
|
497
|
-
```bash
|
|
498
|
-
claude
|
|
499
|
-
```
|
|
500
|
-
|
|
501
|
-
Claude loads:
|
|
462
|
+
## 🧪 Testing
|
|
502
463
|
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
464
|
+
**6 Authentication Methods:**
|
|
465
|
+
1. ✅ Email & Password
|
|
466
|
+
2. ✅ OAuth (GitHub, Google)
|
|
467
|
+
3. ✅ Magic Links
|
|
468
|
+
4. ✅ Password Reset
|
|
469
|
+
5. ✅ Email Verification
|
|
470
|
+
6. ✅ 2FA (TOTP + Backup codes)
|
|
507
471
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
```bash
|
|
511
|
-
/one
|
|
512
|
-
```
|
|
513
|
-
|
|
514
|
-
You see the CASCADE interface. Choose **"1. Start New Idea"**
|
|
515
|
-
|
|
516
|
-
You type:
|
|
517
|
-
|
|
518
|
-
```
|
|
519
|
-
Creators sell courses with lessons.
|
|
520
|
-
Students enroll and track progress.
|
|
521
|
-
Creators earn tokens when students complete lessons.
|
|
522
|
-
```
|
|
523
|
-
|
|
524
|
-
### Step 4: CASCADE Executes
|
|
525
|
-
|
|
526
|
-
**Engineering Director validates:**
|
|
527
|
-
|
|
528
|
-
```typescript
|
|
529
|
-
// Identifies things
|
|
530
|
-
courses (type: "course")
|
|
531
|
-
lessons (type: "lesson")
|
|
532
|
-
creators (type: "creator")
|
|
533
|
-
students (type: "user")
|
|
534
|
-
tokens (type: "token")
|
|
535
|
-
|
|
536
|
-
// Identifies connections
|
|
537
|
-
lesson → part_of → course
|
|
538
|
-
student → enrolled_in → course
|
|
539
|
-
creator → owns → course
|
|
540
|
-
student → holds_tokens → token
|
|
541
|
-
|
|
542
|
-
// Identifies events
|
|
543
|
-
course_created
|
|
544
|
-
lesson_completed
|
|
545
|
-
tokens_earned
|
|
546
|
-
progress_updated
|
|
547
|
-
```
|
|
548
|
-
|
|
549
|
-
**Specialists implement in parallel:**
|
|
550
|
-
|
|
551
|
-
**Backend Specialist (8 seconds):**
|
|
552
|
-
|
|
553
|
-
```typescript
|
|
554
|
-
// Generates services/courses/CourseService.ts
|
|
555
|
-
// Generates services/lessons/LessonService.ts
|
|
556
|
-
// Generates services/enrollment/EnrollmentService.ts
|
|
557
|
-
// Generates mutations and queries
|
|
558
|
-
// Updates Convex schema
|
|
559
|
-
```
|
|
560
|
-
|
|
561
|
-
**Frontend Specialist (8 seconds):**
|
|
562
|
-
|
|
563
|
-
```typescript
|
|
564
|
-
// Generates src/pages/courses/index.astro
|
|
565
|
-
// Generates src/pages/courses/[id].astro
|
|
566
|
-
// Generates src/components/features/CourseList.tsx
|
|
567
|
-
// Generates src/components/features/LessonPlayer.tsx
|
|
568
|
-
// Generates src/components/features/ProgressTracker.tsx
|
|
569
|
-
```
|
|
570
|
-
|
|
571
|
-
**Integration Specialist (8 seconds):**
|
|
572
|
-
|
|
573
|
-
```typescript
|
|
574
|
-
// Generates enrollment workflow
|
|
575
|
-
// Generates progress tracking logic
|
|
576
|
-
// Generates token distribution system
|
|
577
|
-
// Connects frontend ↔ backend
|
|
578
|
-
```
|
|
579
|
-
|
|
580
|
-
**Quality Agent (3 seconds):**
|
|
581
|
-
|
|
582
|
-
```typescript
|
|
583
|
-
// Defines user flows:
|
|
584
|
-
// 1. Creator creates course with lessons
|
|
585
|
-
// 2. Student enrolls in course
|
|
586
|
-
// 3. Student completes lesson
|
|
587
|
-
// 4. Student earns tokens
|
|
588
|
-
// 5. Creator tracks earnings
|
|
589
|
-
|
|
590
|
-
// Defines acceptance criteria for each flow
|
|
591
|
-
```
|
|
592
|
-
|
|
593
|
-
**Design Agent (2 seconds):**
|
|
594
|
-
|
|
595
|
-
```typescript
|
|
596
|
-
// Creates wireframes for:
|
|
597
|
-
// - Course creation form
|
|
598
|
-
// - Course listing page
|
|
599
|
-
// - Lesson player
|
|
600
|
-
// - Progress dashboard
|
|
601
|
-
// - Token balance display
|
|
602
|
-
```
|
|
603
|
-
|
|
604
|
-
**Problem Solver (monitors):**
|
|
605
|
-
|
|
606
|
-
```typescript
|
|
607
|
-
// Watches for test failures
|
|
608
|
-
// If any test fails:
|
|
609
|
-
// - Analyzes root cause (ultrathink mode)
|
|
610
|
-
// - Proposes solution
|
|
611
|
-
// - Assigns to specialist
|
|
612
|
-
// - Adds to lessons learned
|
|
613
|
-
```
|
|
614
|
-
|
|
615
|
-
**Documenter (2 seconds):**
|
|
616
|
-
|
|
617
|
-
```typescript
|
|
618
|
-
// Writes feature documentation
|
|
619
|
-
// Writes API documentation
|
|
620
|
-
// Writes user guide
|
|
621
|
-
// Updates knowledge base
|
|
622
|
-
```
|
|
623
|
-
|
|
624
|
-
### Step 5: Get Working Website
|
|
625
|
-
|
|
626
|
-
**Total time: 20 seconds**
|
|
627
|
-
|
|
628
|
-
What you get:
|
|
629
|
-
|
|
630
|
-
```
|
|
631
|
-
frontend/
|
|
632
|
-
├── src/
|
|
633
|
-
│ ├── pages/
|
|
634
|
-
│ │ └── courses/
|
|
635
|
-
│ │ ├── index.astro # Course listing
|
|
636
|
-
│ │ ├── [id].astro # Course detail
|
|
637
|
-
│ │ └── new.astro # Create course
|
|
638
|
-
│ └── components/
|
|
639
|
-
│ └── features/
|
|
640
|
-
│ ├── CourseList.tsx # List component
|
|
641
|
-
│ ├── LessonPlayer.tsx # Video player
|
|
642
|
-
│ └── ProgressTracker.tsx # Progress UI
|
|
643
|
-
|
|
644
|
-
backend/convex/
|
|
645
|
-
├── services/
|
|
646
|
-
│ ├── courses/
|
|
647
|
-
│ │ └── CourseService.ts # Business logic
|
|
648
|
-
│ └── lessons/
|
|
649
|
-
│ └── LessonService.ts # Business logic
|
|
650
|
-
├── mutations/
|
|
651
|
-
│ ├── courses.ts # Create, update, delete
|
|
652
|
-
│ └── lessons.ts # Create, update, delete
|
|
653
|
-
└── queries/
|
|
654
|
-
├── courses.ts # List, get, search
|
|
655
|
-
└── lessons.ts # List, get, search
|
|
656
|
-
|
|
657
|
-
tests/
|
|
658
|
-
├── unit/
|
|
659
|
-
│ ├── CourseService.test.ts # Service tests
|
|
660
|
-
│ └── LessonService.test.ts # Service tests
|
|
661
|
-
└── integration/
|
|
662
|
-
├── enrollment.test.ts # Flow tests
|
|
663
|
-
└── progress.test.ts # Flow tests
|
|
664
|
-
|
|
665
|
-
docs/
|
|
666
|
-
└── features/
|
|
667
|
-
└── course-platform.md # Complete documentation
|
|
668
|
-
```
|
|
669
|
-
|
|
670
|
-
### Step 6: Run Your Website
|
|
472
|
+
**50+ Test Cases** covering security, rate limiting, token expiry, and complete auth flows.
|
|
671
473
|
|
|
672
474
|
```bash
|
|
673
475
|
cd frontend
|
|
674
|
-
bun
|
|
476
|
+
bun test test/auth # All auth tests
|
|
477
|
+
bun test test/auth/email-password.test.ts # Specific test
|
|
478
|
+
bun test --watch test/auth # Watch mode
|
|
675
479
|
```
|
|
676
480
|
|
|
677
|
-
Open `http://localhost:4321` and you have:
|
|
678
|
-
|
|
679
|
-
- ✅ Course creation working
|
|
680
|
-
- ✅ Lesson management working
|
|
681
|
-
- ✅ Enrollment system working
|
|
682
|
-
- ✅ Progress tracking working
|
|
683
|
-
- ✅ Token distribution working
|
|
684
|
-
- ✅ All tests passing
|
|
685
|
-
- ✅ Complete documentation
|
|
686
|
-
|
|
687
|
-
**From idea to production: 5 minutes**
|
|
688
|
-
|
|
689
481
|
---
|
|
690
482
|
|
|
691
|
-
##
|
|
692
|
-
|
|
693
|
-
### Do I need to know how to code?
|
|
694
|
-
|
|
695
|
-
**No.** You describe what you want in plain English. CASCADE's 8 AI agents write all the code.
|
|
696
|
-
|
|
697
|
-
### What if I want to customize the code?
|
|
698
|
-
|
|
699
|
-
**You can!** All code is generated as TypeScript/Astro/React. You have full access and can modify anything.
|
|
700
|
-
|
|
701
|
-
### Does this work offline?
|
|
702
|
-
|
|
703
|
-
**Yes.** After `npx oneie`:
|
|
704
|
-
|
|
705
|
-
- All ontology files are local (`one/`)
|
|
706
|
-
- All agent definitions are local (`.claude/agents/`)
|
|
707
|
-
- All third-party docs are local (`docs/`)
|
|
708
|
-
- Claude Code works offline with this context
|
|
709
|
-
|
|
710
|
-
### Is my data stored in the cloud?
|
|
711
|
-
|
|
712
|
-
**No.** Everything runs locally:
|
|
713
|
-
|
|
714
|
-
- Ontology is on your machine
|
|
715
|
-
- Code is generated on your machine
|
|
716
|
-
- Database is your choice (Convex, Supabase, etc.)
|
|
717
|
-
- You control where data lives
|
|
718
|
-
|
|
719
|
-
### Can I use a different backend?
|
|
720
|
-
|
|
721
|
-
**Yes!** The ontology is backend-agnostic:
|
|
722
|
-
|
|
723
|
-
- Default: Convex (real-time, serverless)
|
|
724
|
-
- Alternatives: Supabase, WordPress, Notion, custom APIs
|
|
725
|
-
- Frontend works with any backend that implements the 6-dimension interface
|
|
726
|
-
|
|
727
|
-
### How much does this cost?
|
|
728
|
-
|
|
729
|
-
**FREE:**
|
|
730
|
-
|
|
731
|
-
- `npx oneie` - Free forever
|
|
732
|
-
- Claude Code - Free with Claude account
|
|
733
|
-
- Astro + React - Open source, free
|
|
734
|
-
- shadcn/ui - Open source, free
|
|
735
|
-
|
|
736
|
-
**Pay for:**
|
|
737
|
-
|
|
738
|
-
- Hosting (Cloudflare Pages has free tier)
|
|
739
|
-
- Database (Convex has free tier)
|
|
740
|
-
- AI inference (if you add AI features)
|
|
741
|
-
|
|
742
|
-
### Can I build commercial products?
|
|
743
|
-
|
|
744
|
-
**Yes!** MIT license:
|
|
745
|
-
|
|
746
|
-
- Build and sell commercial products
|
|
747
|
-
- No revenue sharing
|
|
748
|
-
- No attribution required (but appreciated!)
|
|
749
|
-
- Full ownership of generated code
|
|
750
|
-
|
|
751
|
-
### How is this different from WordPress?
|
|
752
|
-
|
|
753
|
-
**WordPress:**
|
|
754
|
-
|
|
755
|
-
- PHP, jQuery, MySQL stack
|
|
756
|
-
- Plugin-based (limited flexibility)
|
|
757
|
-
- Themes for design only
|
|
758
|
-
- Manual coding for custom features
|
|
759
|
-
|
|
760
|
-
**ONE:**
|
|
761
|
-
|
|
762
|
-
- Modern stack (Astro, React, TypeScript)
|
|
763
|
-
- Ontology-based (infinite flexibility)
|
|
764
|
-
- AI generates everything
|
|
765
|
-
- Describe features in English, get production code
|
|
766
|
-
|
|
767
|
-
### How is this different from no-code tools?
|
|
768
|
-
|
|
769
|
-
**No-code tools (Webflow, Bubble, etc.):**
|
|
770
|
-
|
|
771
|
-
- Locked into their platform
|
|
772
|
-
- Limited by their UI builder
|
|
773
|
-
- Export limitations
|
|
774
|
-
- Vendor lock-in
|
|
775
|
-
|
|
776
|
-
**ONE:**
|
|
777
|
-
|
|
778
|
-
- Full code ownership
|
|
779
|
-
- Unlimited customization
|
|
780
|
-
- Deploy anywhere
|
|
781
|
-
- No vendor lock-in
|
|
782
|
-
- Scales to any complexity
|
|
783
|
-
|
|
784
|
-
### What's the catch?
|
|
483
|
+
## 🏗️ Project Structure
|
|
785
484
|
|
|
786
|
-
**There isn't one.** ONE is:
|
|
787
|
-
|
|
788
|
-
- Open source (MIT license)
|
|
789
|
-
- Free to use commercially
|
|
790
|
-
- No hidden fees
|
|
791
|
-
- No data collection
|
|
792
|
-
- No vendor lock-in
|
|
793
|
-
|
|
794
|
-
We built this because we believe **software should be as easy as describing what you want.**
|
|
795
|
-
|
|
796
|
-
---
|
|
797
|
-
|
|
798
|
-
## Get Started Now
|
|
799
|
-
|
|
800
|
-
### Step 1: Run the CLI
|
|
801
|
-
|
|
802
|
-
```bash
|
|
803
|
-
npx oneie
|
|
804
|
-
```
|
|
805
|
-
|
|
806
|
-
Answer the prompts (5 minutes):
|
|
807
|
-
|
|
808
|
-
- Your name, email, username
|
|
809
|
-
- Organization name, slug, domain
|
|
810
|
-
- Clone frontend? (yes)
|
|
811
|
-
- Clone docs? (optional)
|
|
812
|
-
|
|
813
|
-
### Step 2: Start Building
|
|
814
|
-
|
|
815
|
-
```bash
|
|
816
|
-
claude
|
|
817
485
|
```
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
/
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
- **Documentation**: See `one/things/cascade/docs/`
|
|
845
|
-
- **GitHub**: https://github.com/one-ie/one
|
|
846
|
-
- **Issues**: https://github.com/one-ie/one/issues
|
|
847
|
-
- **Examples**: See `one/things/cascade/docs/examples/`
|
|
848
|
-
|
|
849
|
-
---
|
|
850
|
-
|
|
851
|
-
## Requirements
|
|
852
|
-
|
|
853
|
-
- **Node.js**: >= 18.0.0 (for npx)
|
|
854
|
-
- **Bun**: Latest (for frontend development)
|
|
855
|
-
- **Git**: For cloning repositories
|
|
856
|
-
- **Claude Code**: Free with Claude account
|
|
857
|
-
|
|
858
|
-
---
|
|
859
|
-
|
|
860
|
-
## Technical Details
|
|
861
|
-
|
|
862
|
-
### What Files Get Copied
|
|
863
|
-
|
|
864
|
-
The CLI copies all files from `/one/*` with these extensions:
|
|
865
|
-
|
|
866
|
-
- `.md` - Markdown documentation (100+ files)
|
|
867
|
-
- `.yaml` - Configuration files
|
|
868
|
-
- `.yml` - Alternate YAML extension
|
|
869
|
-
- `.sh` - Shell scripts
|
|
870
|
-
|
|
871
|
-
### What Gets Excluded
|
|
872
|
-
|
|
873
|
-
- `node_modules/` - Dependencies
|
|
874
|
-
- `.git/` - Git history
|
|
875
|
-
- `dist/` and `build/` - Build artifacts
|
|
876
|
-
- `.DS_Store` - macOS system files
|
|
877
|
-
- Lock files - `package-lock.json`, `bun.lockb`
|
|
878
|
-
|
|
879
|
-
### Configuration File
|
|
880
|
-
|
|
881
|
-
The CLI uses `cli/folders.yaml` to determine what to copy:
|
|
882
|
-
|
|
883
|
-
```yaml
|
|
884
|
-
# Claude Code Integration
|
|
885
|
-
claude_folders:
|
|
886
|
-
- .claude/agents
|
|
887
|
-
- .claude/commands
|
|
888
|
-
- .claude/hooks
|
|
889
|
-
|
|
890
|
-
# ONE Ontology (copy ALL files from /one/*)
|
|
891
|
-
one_folders:
|
|
892
|
-
- one/**/*
|
|
893
|
-
|
|
894
|
-
# File extensions to copy
|
|
895
|
-
allowed_extensions:
|
|
896
|
-
- .md
|
|
897
|
-
- .yaml
|
|
898
|
-
- .yml
|
|
899
|
-
- .sh
|
|
486
|
+
ONE/
|
|
487
|
+
├── frontend/ # Astro 5 + React 19 app
|
|
488
|
+
│ ├── src/
|
|
489
|
+
│ │ ├── pages/ # File-based routing
|
|
490
|
+
│ │ ├── components/ # React components + shadcn/ui
|
|
491
|
+
│ │ ├── layouts/ # Page layouts
|
|
492
|
+
│ │ └── styles/ # Tailwind v4
|
|
493
|
+
│ └── test/ # Test suites
|
|
494
|
+
│
|
|
495
|
+
├── backend/ # Convex backend
|
|
496
|
+
│ └── convex/
|
|
497
|
+
│ ├── schema.ts # 6-dimension schema
|
|
498
|
+
│ ├── queries/ # Read operations
|
|
499
|
+
│ ├── mutations/ # Write operations
|
|
500
|
+
│ └── services/ # Effect.ts services
|
|
501
|
+
│
|
|
502
|
+
├── one/ # Documentation (41 files)
|
|
503
|
+
│ ├── connections/ # Ontology & protocols
|
|
504
|
+
│ ├── things/ # Architecture & specs
|
|
505
|
+
│ ├── events/ # Event specifications
|
|
506
|
+
│ └── knowledge/ # RAG & AI
|
|
507
|
+
│
|
|
508
|
+
└── apps/ # Example applications
|
|
509
|
+
├── oneie/ # Main Astro app
|
|
510
|
+
├── eliza/ # ElizaOS integration
|
|
511
|
+
└── stack/ # Stack Auth example
|
|
900
512
|
```
|
|
901
513
|
|
|
902
|
-
**You don't need to edit this.** The CLI automatically discovers and copies everything.
|
|
903
|
-
|
|
904
514
|
---
|
|
905
515
|
|
|
906
|
-
##
|
|
516
|
+
## 🔒 Security & Compliance
|
|
907
517
|
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
-
|
|
911
|
-
-
|
|
912
|
-
-
|
|
913
|
-
|
|
914
|
-
### Frontend clone fails
|
|
915
|
-
|
|
916
|
-
- Check git configuration: `git config --list`
|
|
917
|
-
- Verify network connection
|
|
918
|
-
- Try cloning manually: `git clone https://github.com/one-ie/frontend.git`
|
|
919
|
-
|
|
920
|
-
### Agent files not syncing
|
|
921
|
-
|
|
922
|
-
- Verify `one/things/agents/*.md` exists in source
|
|
923
|
-
- Check `.claude/agents/` directory was created
|
|
924
|
-
- Run CLI again to re-sync
|
|
925
|
-
|
|
926
|
-
### Claude Code doesn't load agents
|
|
927
|
-
|
|
928
|
-
- Check `.claude/agents/` contains `.md` files
|
|
929
|
-
- Restart Claude Code
|
|
930
|
-
- Run `claude` from project root directory
|
|
518
|
+
- **Multi-Tenant Isolation** – Groups partition ALL data
|
|
519
|
+
- **Hierarchical Access Control** – Nested groups inherit permissions
|
|
520
|
+
- **Role-Based Access** – 4 roles (platform_owner, org_owner, org_user, customer)
|
|
521
|
+
- **Complete Audit Trail** – Events table logs everything
|
|
522
|
+
- **GDPR Compliant** – Delete all group data with single groupId filter
|
|
523
|
+
- **Encryption** – Group-scoped encryption keys
|
|
931
524
|
|
|
932
525
|
---
|
|
933
526
|
|
|
934
|
-
##
|
|
935
|
-
|
|
936
|
-
### Build from Source
|
|
937
|
-
|
|
938
|
-
```bash
|
|
939
|
-
cd cli
|
|
940
|
-
bun install
|
|
941
|
-
bun run build
|
|
942
|
-
```
|
|
943
|
-
|
|
944
|
-
### Test Locally
|
|
527
|
+
## 🎯 Philosophy
|
|
945
528
|
|
|
946
|
-
|
|
947
|
-
node dist/index.js
|
|
948
|
-
```
|
|
529
|
+
**Simplicity is the ultimate sophistication.**
|
|
949
530
|
|
|
950
|
-
|
|
531
|
+
You don't need hundreds of tables. You need:
|
|
951
532
|
|
|
952
|
-
|
|
533
|
+
1. **6 dimensions** (groups, people, things, connections, events, knowledge)
|
|
534
|
+
2. **66 thing types** (every "thing")
|
|
535
|
+
3. **25 connection types** (every relationship)
|
|
536
|
+
4. **67 event types** (every action)
|
|
537
|
+
5. **Metadata** (for protocol-specific details)
|
|
953
538
|
|
|
954
|
-
|
|
955
|
-
2. **sync-agents.ts** - Copies agent definitions to `.claude/agents/`
|
|
956
|
-
3. **copy-claude-config.ts** - Copies `.claude/*` configuration
|
|
957
|
-
4. **create-user-profile.ts** - Generates user markdown from template
|
|
958
|
-
5. **create-org-profile.ts** - Generates organization markdown from template
|
|
959
|
-
6. **clone-frontend.ts** - Git clones frontend repository
|
|
960
|
-
7. **clone-docs.ts** - Git clones third-party documentation
|
|
961
|
-
8. **banner.ts** - Displays welcome message
|
|
962
|
-
9. **index.ts** - Main CLI orchestrator
|
|
539
|
+
**That's it. Everything else is just data.**
|
|
963
540
|
|
|
964
|
-
|
|
541
|
+
### Why This Works
|
|
965
542
|
|
|
966
|
-
|
|
967
|
-
-
|
|
968
|
-
-
|
|
969
|
-
-
|
|
970
|
-
-
|
|
543
|
+
**Other platforms:**
|
|
544
|
+
- Create new tables for every feature
|
|
545
|
+
- Add protocol-specific columns
|
|
546
|
+
- Pollute schema with temporary concepts
|
|
547
|
+
- End up with 50+ tables, 200+ columns
|
|
548
|
+
- Become unmaintainable
|
|
971
549
|
|
|
972
|
-
|
|
550
|
+
**ONE's approach:**
|
|
551
|
+
- Map every feature to 6 dimensions
|
|
552
|
+
- Groups partition the space (with hierarchical nesting)
|
|
553
|
+
- People authorize and govern
|
|
554
|
+
- Things, connections, events flow naturally
|
|
555
|
+
- Knowledge understands it all
|
|
556
|
+
- Scale infinitely without schema changes
|
|
557
|
+
- Stay simple, clean, beautiful
|
|
973
558
|
|
|
974
|
-
|
|
559
|
+
### The Result
|
|
975
560
|
|
|
976
|
-
|
|
561
|
+
A database schema that:
|
|
977
562
|
|
|
978
|
-
|
|
563
|
+
- **Scales** from lemonade stands to global enterprises to DAOs
|
|
564
|
+
- **Children understand**: "I have a group, I'm the boss (person), I sell lemonade (things)"
|
|
565
|
+
- **Enterprises rely on**: Multi-tenant isolation, hierarchical structure, clear governance, infinite scale
|
|
566
|
+
- **DAOs build on**: Nested committees, transparent governance, on-chain integration
|
|
567
|
+
- **AI agents reason about** completely
|
|
568
|
+
- **Never breaks** with schema changes
|
|
569
|
+
- **Gets more powerful** as it grows
|
|
979
570
|
|
|
980
|
-
**
|
|
571
|
+
**This is what happens when you design for clarity first.**
|
|
981
572
|
|
|
982
573
|
---
|
|
983
574
|
|
|
984
|
-
##
|
|
575
|
+
## 🤝 Contributing
|
|
985
576
|
|
|
986
|
-
|
|
577
|
+
1. Fork the repository
|
|
578
|
+
2. Create a feature branch
|
|
579
|
+
3. **Map your feature to the 6 dimensions**
|
|
580
|
+
4. Add tests if applicable
|
|
581
|
+
5. Submit a pull request
|
|
987
582
|
|
|
988
|
-
|
|
989
|
-
- **React** - UI library
|
|
990
|
-
- **Convex** - Real-time database
|
|
991
|
-
- **Effect.ts** - Functional TypeScript
|
|
992
|
-
- **shadcn/ui** - Component library
|
|
993
|
-
- **Tailwind CSS** - Utility-first CSS
|
|
994
|
-
- **Claude** - AI that understands ontologies
|
|
995
|
-
- **Better Auth** - Modern authentication
|
|
583
|
+
**Golden Rule:** If you can't map your feature to these 6 dimensions, you're thinking about it wrong.
|
|
996
584
|
|
|
997
585
|
---
|
|
998
586
|
|
|
999
|
-
##
|
|
1000
|
-
|
|
1001
|
-
**Software should be as easy as describing what you want.**
|
|
1002
|
-
|
|
1003
|
-
We built ONE because we were tired of:
|
|
1004
|
-
|
|
1005
|
-
- Writing boilerplate code
|
|
1006
|
-
- Setting up environments
|
|
1007
|
-
- Learning new frameworks
|
|
1008
|
-
- Debugging edge cases
|
|
1009
|
-
- Maintaining technical debt
|
|
1010
|
-
|
|
1011
|
-
**The solution:** A universal ontology that AI understands.
|
|
1012
|
-
|
|
1013
|
-
**Organizations** → Who owns it
|
|
1014
|
-
**People** → Who can access it
|
|
1015
|
-
**Things** → What exists
|
|
1016
|
-
**Connections** → How they relate
|
|
1017
|
-
**Events** → What happens
|
|
1018
|
-
**Knowledge** → What we learn
|
|
587
|
+
## 📄 License
|
|
1019
588
|
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
And if AI understands your description of reality, it can generate the code.
|
|
1023
|
-
|
|
1024
|
-
**That's ONE.**
|
|
589
|
+
MIT License – see [LICENSE](LICENSE) for details.
|
|
1025
590
|
|
|
1026
591
|
---
|
|
1027
592
|
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
```bash
|
|
1031
|
-
npx oneie
|
|
1032
|
-
```
|
|
593
|
+
<div align="center">
|
|
1033
594
|
|
|
1034
|
-
|
|
595
|
+
**ONE Platform** – Where reality meets AI.
|
|
1035
596
|
|
|
1036
|
-
|
|
1037
|
-
claude
|
|
1038
|
-
```
|
|
597
|
+
Built with simplicity, clarity, and infinite scale in mind.
|
|
1039
598
|
|
|
1040
|
-
|
|
599
|
+
Groups partition (hierarchically). People authorize. Things exist.
|
|
600
|
+
Connections relate. Events record. Knowledge understands.
|
|
1041
601
|
|
|
1042
|
-
|
|
1043
|
-
/one
|
|
1044
|
-
```
|
|
602
|
+
**Everything else is just data.**
|
|
1045
603
|
|
|
1046
|
-
|
|
604
|
+
[Website](https://one.ie) • [Documentation](/one) • [Examples](/apps)
|
|
1047
605
|
|
|
1048
|
-
|
|
606
|
+
</div>
|