Skip to content

Commit d4e6db8

Browse files
committed
feat: add migration mapping and progress tracking documents for SDK transition
1 parent 9a8c321 commit d4e6db8

File tree

3 files changed

+614
-0
lines changed

3 files changed

+614
-0
lines changed
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
---
2+
mode: agent
3+
---
4+
5+
# Mixcore JavaScript SDK Migration Mapping (Phase Three)
6+
7+
## CTO Counter-Proposal: Platform SDK & Domain-Driven Migration
8+
9+
This mapping and plan have been enhanced to:
10+
- Treat the SDK as a platform, not just a code extraction.
11+
- Organize modules by business domain (User, Template, File, Config, Database, etc.).
12+
- Provide a single SDK bootstrap/config entrypoint (`createMixcoreSdk(config)`).
13+
- Support plugin/adapter architecture and OpenAPI codegen for API clients.
14+
- Enforce advanced TypeScript, test, and documentation standards.
15+
16+
This document provides a detailed mapping and progress tracker for the migration of all shared, base, and API modules from the legacy portal to the new modular SDK, as required by the migration spec.
17+
18+
## Legend
19+
- [x] Complete
20+
- [ ] In Progress / Not Started
21+
- [~] Partially Complete
22+
23+
---
24+
25+
26+
## 1. Core Migration Steps (Platform & Domain-Driven)
27+
- [x] Monorepo structure created (Lerna/PNPM workspaces)
28+
- [x] TypeScript, Jest, and build tooling configured
29+
- [x] Packages scaffolded: `shared`, `base`, `apis`
30+
- [x] Initial code audit and mapping
31+
- [ ] Domain-driven package reorganization (User, Template, File, Config, Database, etc.)
32+
- [ ] SDK bootstrap/config entrypoint (`createMixcoreSdk(config)`) implemented
33+
- [ ] Plugin/adapter interface defined and documented
34+
- [ ] OpenAPI codegen adopted for REST API clients (if OpenAPI specs exist)
35+
- [ ] CLI for scaffolding, testing, and docs generation
36+
37+
---
38+
39+
40+
## 2. Domain-Driven Module Migration Checklist
41+
42+
### User Domain
43+
| Module | Legacy Path | Migrated | Refactored | Unit Tested | Docs |
44+
|-------------------------|-----------------------------------------------------|----------|------------|-------------|------|
45+
| user-services | app-client/services/user-services.js | [ ] | [ ] | [ ] | [ ] |
46+
47+
### Template Domain
48+
| Module | Legacy Path | Migrated | Refactored | Unit Tested | Docs |
49+
|-------------------------|-----------------------------------------------------|----------|------------|-------------|------|
50+
| template-service | app-portal/services/template-service.js | [ ] | [ ] | [ ] | [ ] |
51+
52+
### File Domain
53+
| Module | Legacy Path | Migrated | Refactored | Unit Tested | Docs |
54+
|-------------------------|-----------------------------------------------------|----------|------------|-------------|------|
55+
| file-services | app-shared/services/file-service.js | [x] | [x] | [x] | [ ] |
56+
| file-services (portal) | app-portal/pages/file/file-services.js | [ ] | [ ] | [ ] | [ ] |
57+
58+
### Configuration Domain
59+
| Module | Legacy Path | Migrated | Refactored | Unit Tested | Docs |
60+
|-------------------------|-----------------------------------------------------|----------|------------|-------------|------|
61+
| configuration-services | app-portal/pages/configuration/configuration-services.js | [ ] | [ ] | [ ] | [ ] |
62+
63+
### Navigation Domain
64+
| Module | Legacy Path | Migrated | Refactored | Unit Tested | Docs |
65+
|-------------------------|-----------------------------------------------------|----------|------------|-------------|------|
66+
| rest-navigation-service | app-client/services/rest-navigation-service.js | [ ] | [ ] | [ ] | [ ] |
67+
68+
### Database Domain
69+
| Module | Legacy Path | Migrated | Refactored | Unit Tested | Docs |
70+
|-------------------------|-----------------------------------------------------|----------|------------|-------------|------|
71+
| mix-database-rest-portal-service | app-shared/services/mix-database/rest-portal-service.js | [ ] | [ ] | [ ] | [ ] |
72+
| mix-database-column-rest-service | app-shared/services/mix-database-column/rest-service.js | [ ] | [ ] | [ ] | [ ] |
73+
| mix-database-data-rest-client-service | app-shared/services/mix-database-data/rest-client-service.js | [ ] | [ ] | [ ] | [ ] |
74+
| mix-database-data-rest-portal-service | app-shared/services/mix-database-data/rest-portal-service.js | [ ] | [ ] | [ ] | [ ] |
75+
| mix-database-data-value-rest-service | app-shared/services/mix-database-data-value/rest-service.js | [ ] | [ ] | [ ] | [ ] |
76+
| module-data-rest-mvc-service | app-shared/services/module-data-service/rest-mvc-service.js | [ ] | [ ] | [ ] | [ ] |
77+
| post-rest-mvc-service | app-shared/services/post-service/rest-mvc-service.js | [ ] | [ ] | [ ] | [ ] |
78+
| related-attribute-data-rest-form-service | app-shared/services/related-attribute-data/rest-form-service.js | [ ] | [ ] | [ ] | [ ] |
79+
| related-attribute-data-rest-portal-service | app-shared/services/related-attribute-data/rest-portal-service.js | [ ] | [ ] | [ ] | [ ] |
80+
| related-attribute-set-rest-portal-service | app-shared/services/related-attribute-set/rest-portal-service.js | [ ] | [ ] | [ ] | [ ] |
81+
82+
### Shared/Core Domain
83+
| Module | Legacy Path | Migrated | Refactored | Unit Tested | Docs |
84+
|-------------------------------|------------------------------------------------------------------|----------|------------|-------------|------|
85+
| common-services | app-shared/services/common-services.js | [x] | [x] | [x] | [ ] |
86+
| crypto-services | app-shared/services/crypto-services.js | [x] | [x] | [x] | [ ] |
87+
| gpay-services | app-shared/services/gpay-services.js | [x] | [x] | [x] | [ ] |
88+
| translator-services | app-shared/services/translator-services.js | [x] | [x] | [x] | [ ] |
89+
| global-settings-services | app-shared/services/global-settings-services.js | [x] | [x] | [x] | [ ] |
90+
| theme-services | app-shared/services/theme-services.js | [x] | [x] | [x] | [ ] |
91+
| store-services | app-shared/services/store-services.js | [x] | [x] | [x] | [ ] |
92+
| shared-module-data-services | app-shared/components/module-data/shared-module-data-services.js | [x] | [x] | [x] | [ ] |
93+
| modal-nav-metas-service | app-portal/components/modal-nav-metas/script.js | [x] | [x] | [x] | [ ] |
94+
| shared global.js | app-portal/shared/global.js | [ ] | [ ] | [ ] | [ ] |
95+
96+
### Base Abstractions
97+
| Module | Legacy Path | Migrated | Refactored | Unit Tested | Docs |
98+
|--------------------|-----------------------------------------------|----------|------------|-------------|------|
99+
| base-service | app-shared/services/base-service.js | [x] | [x] | [x] | [ ] |
100+
| base-rest-service | app-shared/services/base-rest-service.js | [x] | [x] | [x] | [ ] |
101+
102+
### API Clients
103+
| Module | Legacy Path | Migrated | Refactored | Unit Tested | Docs |
104+
|--------------------------|-----------------------------------------------------|----------|------------|-------------|------|
105+
| api-services | app-shared/services/api-services.js | [x] | [x] | [x] | [ ] |
106+
| auth-services | app-shared/services/auth-services.js | [x] | [x] | [x] | [ ] |
107+
| module-article-services | app-portal/pages/module-post/module-article-services.js | [x] | [x] | [x] | [ ] |
108+
| module-data-services | app-portal/pages/module-data/module-data-services.js | [x] | [x] | [x] | [ ] |
109+
| module-gallery-services | app-portal/pages/module-gallery/module-gallery-services.js | [x] | [x] | [x] | [ ] |
110+
| theme-services (API) | app-shared/services/theme-services.js | [x] | [x] | [x] | [ ] |
111+
| store-services (API) | app-shared/services/store-services.js | [x] | [x] | [x] | [ ] |
112+
113+
---
114+
115+
116+
## 3. Tests & Coverage
117+
- [x] Unit tests for all migrated modules
118+
- [ ] Integration/cross-package tests in `/tests`
119+
- [ ] Test coverage report generated
120+
- [ ] 90%+ coverage for all core packages
121+
122+
---
123+
124+
125+
## 4. Documentation & CI
126+
- [ ] README.md for each package/module
127+
- [ ] Migration/usage guides
128+
- [ ] API reference auto-generated from TypeScript/OpenAPI
129+
- [ ] CLI for scaffolding, testing, and docs
130+
- [ ] CI/CD config for lint, test, build, publish
131+
- [ ] Release automation (semantic versioning, changelogs)
132+
133+
---
134+
135+
136+
## 5. Migration/Refactor Notes
137+
- All modules must be TypeScript, framework-agnostic, and have injectable config.
138+
- No SPA/UI dependencies in SDK code.
139+
- All public APIs must be typed, documented, and tested.
140+
- Use OpenAPI codegen for REST clients where possible.
141+
- Provide plugin/adapter interfaces for extensibility.
142+
- Update this checklist as you migrate, refactor, and document each module.
143+
144+
---
145+
146+
147+
## 6. CTO Migration Enhancement Plan (Counter-Proposal)
148+
149+
### 1. Platform SDK Mindset
150+
- Treat SDK as a platform, not just code extraction.
151+
- Core vs. extension boundary: core = stable APIs, extensions = optional features.
152+
153+
### 2. Domain-Driven Modularization
154+
- Organize by business domain, not legacy file structure.
155+
- Each domain package exposes only public, stable APIs.
156+
157+
### 3. SDK Bootstrap & Config Pattern
158+
- Provide a single SDK bootstrap entrypoint (`createMixcoreSdk(config)`).
159+
- Support per-service overrides and lazy loading.
160+
161+
### 4. Advanced TypeScript & API Codegen
162+
- Use generics, discriminated unions, mapped types for API responses/errors.
163+
- Auto-generate API types from OpenAPI/Swagger if available.
164+
165+
### 5. Plugin/Adapter Architecture
166+
- Allow plugins for custom auth, logging, transport, etc.
167+
- Abstract HTTP transport via adapters.
168+
169+
### 6. Observability & Diagnostics
170+
- Built-in hooks for logging, tracing, error reporting (pluggable).
171+
- Expose SDK-level events for request/response lifecycle.
172+
173+
### 7. Test & Release Automation
174+
- Enforce 90%+ coverage for all core packages.
175+
- Use release automation (semantic versioning, changelogs).
176+
- Add canary/pre-release channels.
177+
178+
### 8. Developer Experience
179+
- Provide CLI for scaffolding, tests, docs.
180+
- Auto-generate API reference docs from TypeScript/OpenAPI.
181+
182+
### 9. Deprecation & Migration Policy
183+
- Mark legacy APIs as deprecated with clear migration paths.
184+
- Provide codemods/migration scripts for upgrades.
185+
186+
---
187+
188+
## Sample Migration Sequence (Domain-Driven)
189+
190+
1. Shared/Core Utilities
191+
2. Base Abstractions
192+
3. API Clients
193+
4. Database/Attribute Services
194+
5. User/Template/File/Config/Navigation Domains
195+
6. Documentation and Guides
196+
7. Integration Tests and Coverage
197+
8. CI/CD and Release Automation
198+
9. Deprecation and Adoption in SPA
199+
200+
---
201+
202+
## Success Criteria (Enhanced)
203+
204+
- All SDK code is TypeScript, framework-agnostic, and well-documented.
205+
- 90%+ test coverage for all core packages.
206+
- All public APIs are typed, documented, and auto-generated from source/OpenAPI.
207+
- SDK is extensible via plugins/adapters.
208+
- Legacy code is fully deprecated in consuming projects.
209+
- CI/CD is green and releases are automated.

0 commit comments

Comments
 (0)