oneie 2.0.3 → 2.0.5
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/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
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Feature: Remove Direct Convex Dependencies
|
|
2
|
+
|
|
3
|
+
**Feature ID:** `feature_remove_convex_deps`
|
|
4
|
+
**Plan:** `plan_backend_agnostic_frontend`
|
|
5
|
+
**Owner:** Integration Specialist
|
|
6
|
+
**Status:** Specified
|
|
7
|
+
**Priority:** P1
|
|
8
|
+
**Effort:** 3 days
|
|
9
|
+
**Dependencies:** `feature_auth_migration`, `feature_dashboard_migration`
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Description
|
|
14
|
+
|
|
15
|
+
Remove direct Convex imports from components, ensure all data flows through DataProvider.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Tasks
|
|
20
|
+
|
|
21
|
+
1. Search and remove all `import { useQuery, useMutation } from "convex/react"`
|
|
22
|
+
2. Remove ConvexClientProvider from component tree
|
|
23
|
+
3. Update all imports to use DataProvider hooks
|
|
24
|
+
4. Verify no direct Convex dependencies remain
|
|
25
|
+
5. Run full test suite
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Validation
|
|
30
|
+
|
|
31
|
+
`grep -r "from 'convex/react'" src/` returns 0 results
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Success Criteria
|
|
36
|
+
|
|
37
|
+
- [ ] Zero direct Convex imports in frontend code
|
|
38
|
+
- [ ] ESLint rule enforces this
|
|
39
|
+
- [ ] All tests pass
|
|
40
|
+
- [ ] Build succeeds without Convex codegen
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
**Feature Status:** ✅ Specified
|
|
45
|
+
**Estimated Completion:** Week 5
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
Features
|
|
2
|
+
|
|
3
|
+
Landing Pages
|
|
4
|
+
Blogs
|
|
5
|
+
Videos
|
|
6
|
+
Podcasts
|
|
7
|
+
SAAS
|
|
8
|
+
Ecommerce (comming soon)
|
|
9
|
+
AI - build with AI-SDK and Prompt Kit
|
|
10
|
+
|
|
11
|
+
Layouts
|
|
12
|
+
View Transitions
|
|
13
|
+
Components - Shadcn UI, charts
|
|
14
|
+
|
|
15
|
+
Content-Driven
|
|
16
|
+
Astro was designed to work with your content, no matter where it lives. Load data from your file system, external API, or your favorite CMS.
|
|
17
|
+
Simply write in Markdown
|
|
18
|
+
|
|
19
|
+
Engineers
|
|
20
|
+
|
|
21
|
+
Auth
|
|
22
|
+
Dashboard
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
Astro
|
|
27
|
+
Performance
|
|
28
|
+
Zero Javascript
|
|
29
|
+
Optimised Images
|
|
30
|
+
Prefecth
|
|
31
|
+
Partytown
|
|
32
|
+
|
|
33
|
+
SEO
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
Server-First
|
|
38
|
+
Astro improves website performance by rendering components on the server, sending lightweight HTML to the browser with zero unnecessary JavaScript overhead.
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
Cloudflare
|
|
45
|
+
|
|
46
|
+
MCP
|
|
47
|
+
Astro MCP
|
|
48
|
+
Sentry MCP
|
|
49
|
+
Shadcn MCP
|
|
50
|
+
Figma MCP
|
|
51
|
+
|
|
52
|
+
Effect TS
|
|
53
|
+
|
|
54
|
+
Architecture
|
|
55
|
+
|
|
56
|
+
Ontology
|
|
57
|
+
|
|
58
|
+
Language
|
|
59
|
+
|
|
60
|
+
Components
|
|
61
|
+
|
|
62
|
+
Any frontend
|
|
63
|
+
React 19 but you can import Svelte, Solid etc. from Astro
|
|
64
|
+
|
|
65
|
+
Any Backend https://docs.astro.build/en/guides/backend/
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
Any CMS https://docs.astro.build/en/guides/cms/
|
|
69
|
+
|
|
70
|
+
Any IDE
|
|
71
|
+
Claude Code
|
|
72
|
+
Codex
|
|
73
|
+
Cursor
|
|
74
|
+
V0 etc.
|
|
75
|
+
|
|
76
|
+
Any Host
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
Per
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
# Idea: Backend-Agnostic Frontend Architecture
|
|
2
|
+
|
|
3
|
+
**Status:** Validated by Director Agent
|
|
4
|
+
**Decision:** Approved as Plan #2
|
|
5
|
+
**Priority:** High - Strategic Enhancement
|
|
6
|
+
**Idea Number:** 2
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Description
|
|
11
|
+
|
|
12
|
+
Transform the tightly-coupled Astro/React frontend + Convex backend architecture into a fully backend-agnostic system using the DataProvider interface pattern. This enables organizations to use ANY backend (Convex, WordPress, Notion, Supabase, custom APIs) by changing ONE line of configuration.
|
|
13
|
+
|
|
14
|
+
**Core Concept:** Introduce a thin abstraction layer (DataProvider interface) that maps the 6-dimension ontology operations to ANY backend implementation. Frontend components use generic hooks (`useThings`, `useConnections`, `useEvents`) that work identically regardless of backend.
|
|
15
|
+
|
|
16
|
+
**Strategic Value:**
|
|
17
|
+
- Removes vendor lock-in (not tied to Convex)
|
|
18
|
+
- Enables multi-backend federation (one org uses Convex, another uses WordPress)
|
|
19
|
+
- Supports organizations with existing infrastructure
|
|
20
|
+
- Proves ontology is truly protocol-agnostic
|
|
21
|
+
- Opens market to enterprises with backend requirements
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Problem Statement
|
|
26
|
+
|
|
27
|
+
**Current Architecture:**
|
|
28
|
+
```
|
|
29
|
+
Frontend Components → Convex Hooks (useQuery/useMutation) → Convex Backend
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Issues:**
|
|
33
|
+
1. Frontend tightly coupled to Convex SDK
|
|
34
|
+
2. Cannot swap backends without rewriting components
|
|
35
|
+
3. Organizations locked into Convex infrastructure
|
|
36
|
+
4. Violates "protocol-agnostic" ontology principle
|
|
37
|
+
5. Hard to support enterprises with existing systems
|
|
38
|
+
|
|
39
|
+
**Example Lock-in:**
|
|
40
|
+
```typescript
|
|
41
|
+
// Current: Tightly coupled to Convex
|
|
42
|
+
import { useQuery } from "convex/react";
|
|
43
|
+
import { api } from "@/convex/_generated/api";
|
|
44
|
+
|
|
45
|
+
function MyComponent() {
|
|
46
|
+
const entities = useQuery(api.queries.entities.list, { type: "course" });
|
|
47
|
+
// Component now depends on Convex API structure
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Proposed Solution
|
|
54
|
+
|
|
55
|
+
**New Architecture:**
|
|
56
|
+
```
|
|
57
|
+
Frontend Components → DataProvider Interface → Backend Adapter → Any Backend
|
|
58
|
+
↓
|
|
59
|
+
ConvexProvider | WordPressProvider | NotionProvider
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Key Components:**
|
|
63
|
+
|
|
64
|
+
### 1. DataProvider Interface
|
|
65
|
+
```typescript
|
|
66
|
+
interface DataProvider {
|
|
67
|
+
// 6-dimension ontology operations
|
|
68
|
+
things: ThingOperations;
|
|
69
|
+
connections: ConnectionOperations;
|
|
70
|
+
events: EventOperations;
|
|
71
|
+
knowledge: KnowledgeOperations;
|
|
72
|
+
organizations: OrganizationOperations;
|
|
73
|
+
people: PeopleOperations;
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 2. Configuration System
|
|
78
|
+
```typescript
|
|
79
|
+
// One line to configure backend
|
|
80
|
+
export const dataProvider = createDataProvider({
|
|
81
|
+
type: "convex", // or "wordpress" | "notion" | "supabase"
|
|
82
|
+
config: { url: process.env.BACKEND_URL }
|
|
83
|
+
});
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 3. Generic React Hooks
|
|
87
|
+
```typescript
|
|
88
|
+
// Works with ANY backend
|
|
89
|
+
function MyComponent() {
|
|
90
|
+
const entities = useThings({ type: "course" });
|
|
91
|
+
// Component now backend-agnostic
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Ontology Validation
|
|
98
|
+
|
|
99
|
+
### 1. Organizations (Who owns what at org level)
|
|
100
|
+
- ✅ Each organization configures `properties.backendProvider`
|
|
101
|
+
- ✅ Multi-tenant isolation maintained across ALL providers
|
|
102
|
+
- ✅ Organizations can swap providers independently
|
|
103
|
+
- ✅ Example: `org_123` uses Convex, `org_456` uses WordPress
|
|
104
|
+
|
|
105
|
+
### 2. People (Who can do what)
|
|
106
|
+
- ✅ Only `org_owner` role can configure backend providers
|
|
107
|
+
- ✅ Authorization enforced at backend, NOT frontend
|
|
108
|
+
- ✅ All 4 roles work identically across providers
|
|
109
|
+
- ✅ Frontend never sees auth implementation details
|
|
110
|
+
|
|
111
|
+
### 3. Things (All entities)
|
|
112
|
+
- ✅ New thing type: `external_connection` (backend configurations)
|
|
113
|
+
- ✅ All 66 thing types work through DataProvider interface
|
|
114
|
+
- ✅ Generic ThingService handles all types uniformly
|
|
115
|
+
- ✅ Example: `creator`, `course`, `lesson` work on any backend
|
|
116
|
+
|
|
117
|
+
### 4. Connections (All relationships)
|
|
118
|
+
- ✅ New relationship: `configured_by` (org → external_connection)
|
|
119
|
+
- ✅ Uses consolidated type: `communicated` with `metadata.protocol`
|
|
120
|
+
- ✅ Cross-backend connections supported (Convex course → WordPress user)
|
|
121
|
+
- ✅ Example: `owns`, `enrolled_in`, `part_of` work identically
|
|
122
|
+
|
|
123
|
+
### 5. Events (All actions)
|
|
124
|
+
- ✅ New event: `provider_changed` (when backend swaps)
|
|
125
|
+
- ✅ Uses consolidated type: `communication_event` with protocol metadata
|
|
126
|
+
- ✅ Complete audit trail preserved regardless of backend
|
|
127
|
+
- ✅ Example: `course_created`, `lesson_completed` logged to events table
|
|
128
|
+
|
|
129
|
+
### 6. Knowledge (Labels + vectors)
|
|
130
|
+
- ✅ Labels tag backend provider capabilities
|
|
131
|
+
- ✅ Tags: `protocol:data_provider`, `provider:convex`, `status:active`
|
|
132
|
+
- ✅ RAG can index provider documentation for help system
|
|
133
|
+
- ✅ Example: Search "how to configure WordPress backend"
|
|
134
|
+
|
|
135
|
+
**Verdict:** ✅ PASS - All 6 dimensions successfully mapped
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Complexity Assessment
|
|
140
|
+
|
|
141
|
+
**Scope:** Medium-Large (4-6 weeks for full implementation)
|
|
142
|
+
|
|
143
|
+
**Breakdown:**
|
|
144
|
+
- Week 1-2: DataProvider interface + ConvexProvider + Config system
|
|
145
|
+
- Week 2-3: Effect.ts service layer (ThingService, ConnectionService, etc.)
|
|
146
|
+
- Week 3-4: Migrate auth components (50+ tests must pass)
|
|
147
|
+
- Week 4-5: Migrate dashboard components
|
|
148
|
+
- Week 5: Remove direct Convex dependencies
|
|
149
|
+
- Week 6: Implement alternative providers (WordPress + Notion)
|
|
150
|
+
|
|
151
|
+
**Risk:** Medium
|
|
152
|
+
|
|
153
|
+
**Risks:**
|
|
154
|
+
1. Auth tests break during migration (50+ test cases)
|
|
155
|
+
2. Performance regression (additional abstraction layer)
|
|
156
|
+
3. TypeScript errors proliferate across codebase
|
|
157
|
+
4. Context budget explosion (more files to maintain)
|
|
158
|
+
|
|
159
|
+
**Mitigation:**
|
|
160
|
+
1. Run auth tests after EVERY component migration
|
|
161
|
+
2. Benchmark performance, target <10ms overhead
|
|
162
|
+
3. Strong interface types from day 1
|
|
163
|
+
4. Use code generation for boilerplate
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Success Criteria
|
|
168
|
+
|
|
169
|
+
### Immediate (MVP - Week 2)
|
|
170
|
+
- [ ] DataProvider interface defined and typed
|
|
171
|
+
- [ ] ConvexProvider implemented and tested
|
|
172
|
+
- [ ] Configuration system working
|
|
173
|
+
- [ ] ONE component migrated as proof of concept
|
|
174
|
+
- [ ] All existing tests still pass
|
|
175
|
+
|
|
176
|
+
### Near-term (Month 1)
|
|
177
|
+
- [ ] All auth components use DataProvider (50+ tests pass)
|
|
178
|
+
- [ ] All dashboard components use DataProvider
|
|
179
|
+
- [ ] Zero direct Convex imports in components
|
|
180
|
+
- [ ] Performance within 10% of baseline
|
|
181
|
+
- [ ] TypeScript compiles with zero errors
|
|
182
|
+
|
|
183
|
+
### Long-term (Month 2)
|
|
184
|
+
- [ ] WordPress provider functional
|
|
185
|
+
- [ ] Notion provider functional
|
|
186
|
+
- [ ] Organizations can swap backends via config
|
|
187
|
+
- [ ] Complete documentation and migration guide
|
|
188
|
+
- [ ] 98% context reduction (150K → 3K tokens)
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Business Impact
|
|
193
|
+
|
|
194
|
+
**Why this matters:**
|
|
195
|
+
|
|
196
|
+
1. **Market Expansion:** Enterprises with existing backends can adopt
|
|
197
|
+
2. **Vendor Independence:** Not locked into any single backend
|
|
198
|
+
3. **Federation:** Multi-backend support enables broader use cases
|
|
199
|
+
4. **Ontology Proof:** Proves 6-dimension model is truly universal
|
|
200
|
+
5. **Developer Velocity:** Clear patterns for ALL future features
|
|
201
|
+
6. **Cost Flexibility:** Organizations choose backend based on needs
|
|
202
|
+
|
|
203
|
+
**Cost-benefit:**
|
|
204
|
+
|
|
205
|
+
- **Investment:** 4-6 weeks upfront
|
|
206
|
+
- **Return:** Opens enterprise market, reduces vendor risk
|
|
207
|
+
- **Break-even:** First enterprise customer with backend requirement
|
|
208
|
+
- **Ongoing:** 50% faster to add new providers after initial implementation
|
|
209
|
+
|
|
210
|
+
**Strategic Alignment:**
|
|
211
|
+
|
|
212
|
+
- Aligns with "protocol-agnostic" ontology principle
|
|
213
|
+
- Supports multi-tenant flexibility
|
|
214
|
+
- Enables beautiful, simple, powerful systems (our philosophy)
|
|
215
|
+
- Proves architecture scales from lemonade stands to enterprises
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Technical Architecture
|
|
220
|
+
|
|
221
|
+
### Layer 1: DataProvider Interface (Protocol)
|
|
222
|
+
```typescript
|
|
223
|
+
// Defines WHAT operations are possible (ontology operations)
|
|
224
|
+
interface DataProvider {
|
|
225
|
+
things: ThingOperations;
|
|
226
|
+
connections: ConnectionOperations;
|
|
227
|
+
events: EventOperations;
|
|
228
|
+
// ... other 6-dimension operations
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Layer 2: Backend Adapters (Implementation)
|
|
233
|
+
```typescript
|
|
234
|
+
// Defines HOW operations work for specific backends
|
|
235
|
+
class ConvexProvider implements DataProvider { ... }
|
|
236
|
+
class WordPressProvider implements DataProvider { ... }
|
|
237
|
+
class NotionProvider implements DataProvider { ... }
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Layer 3: Effect.ts Services (Business Logic)
|
|
241
|
+
```typescript
|
|
242
|
+
// Pure business logic, backend-agnostic
|
|
243
|
+
class ThingService {
|
|
244
|
+
constructor(private provider: DataProvider) {}
|
|
245
|
+
async createThing(args: CreateThingArgs): Promise<Thing> {
|
|
246
|
+
// Validation, business rules, then:
|
|
247
|
+
return this.provider.things.create(args);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### Layer 4: React Hooks (Frontend API)
|
|
253
|
+
```typescript
|
|
254
|
+
// Simple, type-safe hooks for components
|
|
255
|
+
function useThings(filter: ThingFilter): Thing[] {
|
|
256
|
+
const provider = useDataProvider();
|
|
257
|
+
return provider.things.list(filter);
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Layer 5: Components (UI)
|
|
262
|
+
```typescript
|
|
263
|
+
// Clean, backend-agnostic components
|
|
264
|
+
function EntityList({ type }: { type: string }) {
|
|
265
|
+
const entities = useThings({ type });
|
|
266
|
+
return <div>{entities.map(e => <EntityCard key={e._id} entity={e} />)}</div>;
|
|
267
|
+
}
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
**Separation of Concerns:**
|
|
271
|
+
- Interface defines protocol (ontology operations)
|
|
272
|
+
- Adapters handle backend specifics
|
|
273
|
+
- Services implement business logic
|
|
274
|
+
- Hooks provide React integration
|
|
275
|
+
- Components focus on UI only
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## Migration Strategy
|
|
280
|
+
|
|
281
|
+
### Phase 1: Foundation (Non-breaking)
|
|
282
|
+
1. Add DataProvider interface
|
|
283
|
+
2. Implement ConvexProvider (wraps existing Convex hooks)
|
|
284
|
+
3. Add configuration system
|
|
285
|
+
4. Migrate ONE component to prove pattern
|
|
286
|
+
|
|
287
|
+
**Rollback:** Easy - just don't use new provider
|
|
288
|
+
|
|
289
|
+
### Phase 2: Auth Migration (Breaking)
|
|
290
|
+
1. Migrate auth components one by one
|
|
291
|
+
2. Run auth tests after EACH component
|
|
292
|
+
3. Keep rollback branch at each milestone
|
|
293
|
+
|
|
294
|
+
**Rollback:** Revert to previous commit, restore Convex hooks
|
|
295
|
+
|
|
296
|
+
### Phase 3: Full Migration (Breaking)
|
|
297
|
+
1. Migrate all remaining components
|
|
298
|
+
2. Remove direct Convex dependencies
|
|
299
|
+
3. Update documentation
|
|
300
|
+
|
|
301
|
+
**Rollback:** Not possible after Feature 6 completes
|
|
302
|
+
|
|
303
|
+
### Phase 4: Alternative Providers (Additive)
|
|
304
|
+
1. Implement WordPress provider
|
|
305
|
+
2. Implement Notion provider
|
|
306
|
+
3. Prove organizations can swap backends
|
|
307
|
+
|
|
308
|
+
**Rollback:** Not needed - purely additive
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
## Next Steps
|
|
313
|
+
|
|
314
|
+
**Director Agent Decision:**
|
|
315
|
+
|
|
316
|
+
- ✅ Approved as Plan #2
|
|
317
|
+
- ✅ Assign plan number: `2-backend-agnostic-frontend`
|
|
318
|
+
- ✅ Create team structure:
|
|
319
|
+
- Backend Specialist (DataProvider interface, services, ConvexProvider)
|
|
320
|
+
- Frontend Specialist (Auth migration, dashboard migration, hooks)
|
|
321
|
+
- Integration Specialist (Alternative providers, remove dependencies)
|
|
322
|
+
|
|
323
|
+
**Proceed to Level 2 (PLANS):**
|
|
324
|
+
|
|
325
|
+
- Break into 7 features (see feature list below)
|
|
326
|
+
- Assign features to specialists
|
|
327
|
+
- Create feature specifications
|
|
328
|
+
- Define success criteria and tests
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
## Feature Breakdown
|
|
333
|
+
|
|
334
|
+
### Feature 2-1: DataProvider Interface & ConvexProvider
|
|
335
|
+
**Owner:** Backend Specialist
|
|
336
|
+
**Duration:** 1 week
|
|
337
|
+
**Dependencies:** None
|
|
338
|
+
|
|
339
|
+
### Feature 2-2: Configuration System
|
|
340
|
+
**Owner:** Backend Specialist
|
|
341
|
+
**Duration:** 3 days
|
|
342
|
+
**Dependencies:** Feature 2-1
|
|
343
|
+
|
|
344
|
+
### Feature 2-3: Effect.ts Service Layer
|
|
345
|
+
**Owner:** Backend Specialist
|
|
346
|
+
**Duration:** 1 week
|
|
347
|
+
**Dependencies:** Features 2-1, 2-2
|
|
348
|
+
|
|
349
|
+
### Feature 2-4: React Hooks
|
|
350
|
+
**Owner:** Frontend Specialist
|
|
351
|
+
**Duration:** 3 days
|
|
352
|
+
**Dependencies:** Feature 2-1
|
|
353
|
+
|
|
354
|
+
### Feature 2-5: Auth Component Migration
|
|
355
|
+
**Owner:** Frontend Specialist
|
|
356
|
+
**Duration:** 1 week
|
|
357
|
+
**Dependencies:** Features 2-1, 2-4
|
|
358
|
+
|
|
359
|
+
### Feature 2-6: Dashboard Component Migration
|
|
360
|
+
**Owner:** Frontend Specialist
|
|
361
|
+
**Duration:** 1 week
|
|
362
|
+
**Dependencies:** Feature 2-5
|
|
363
|
+
|
|
364
|
+
### Feature 2-7: Alternative Providers (WordPress + Notion)
|
|
365
|
+
**Owner:** Integration Specialist
|
|
366
|
+
**Duration:** 2 weeks
|
|
367
|
+
**Dependencies:** Feature 2-6
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
## References
|
|
372
|
+
|
|
373
|
+
- **Ontology:** `one/knowledge/ontology.md` (6-dimension specification)
|
|
374
|
+
- **Patterns:** `one/connections/patterns.md` (implementation patterns)
|
|
375
|
+
- **Architecture:** `one/knowledge/architecture.md` (system design)
|
|
376
|
+
- **Original Plan:** `one/things/plans/backend-agnostic-frontend.md` (detailed plan)
|
|
377
|
+
- **Philosophy:** Protocol-agnostic ontology. Everything else is just data.
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
**Status:** Validated ✅ → Proceeding to Plan #2
|
|
382
|
+
**Created:** 2025-10-13
|
|
383
|
+
**Validated By:** Engineering Director Agent
|
|
384
|
+
**Ontology Check:** ✅ PASS (all 6 dimensions mapped)
|