strapi-content-sync-pro 1.0.4 → 1.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/LICENSE +1 -1
- package/README.md +32 -14
- package/admin/src/components/BulkTransferTab.jsx +185 -20
- package/admin/src/components/ConfigTab.jsx +81 -3
- package/admin/src/components/ContentTypesTab.jsx +28 -1
- package/admin/src/components/HelpTab.jsx +34 -0
- package/admin/src/components/LogsTab.jsx +66 -8
- package/admin/src/components/MediaTab.jsx +253 -36
- package/admin/src/components/SyncProfilesTab.jsx +140 -4
- package/admin/src/components/SyncTab.jsx +161 -35
- package/docs/Screenshot 2026-04-22 183540.png +0 -0
- package/docs/Screenshot 2026-04-22 183552.png +0 -0
- package/docs/Screenshot 2026-04-23 114332.png +0 -0
- package/docs/Screenshot 2026-04-23 114644.png +0 -0
- package/docs/Screenshot 2026-04-23 114651.png +0 -0
- package/docs/Screenshot 2026-04-23 114737.png +0 -0
- package/docs/Screenshot 2026-04-23 114904.png +0 -0
- package/docs/Screenshot 2026-04-23 114940.png +0 -0
- package/docs/Screenshot 2026-04-23 115003.png +0 -0
- package/docs/Screenshot 2026-04-23 115024.png +0 -0
- package/docs/Screenshot 2026-04-23 115116.png +0 -0
- package/docs/Screenshot 2026-04-23 115141.png +0 -0
- package/docs/Screenshot 2026-04-23 115252.png +0 -0
- package/docs/Screenshot 2026-04-23 115448.png +0 -0
- package/docs/Screenshot 2026-04-23 120534.png +0 -0
- package/docs/Screenshot 2026-04-23 122544.png +0 -0
- package/docs/Screenshot 2026-04-23 122712.png +0 -0
- package/docs/Screenshot 2026-04-23 122730.png +0 -0
- package/docs/Screenshot 2026-04-23 122858.png +0 -0
- package/docs/Screenshot 2026-04-23 122924.png +0 -0
- package/docs/Screenshot 2026-04-23 122937.png +0 -0
- package/docs/sync-strategy-approach-review.md +127 -0
- package/package.json +1 -1
- package/server/src/controllers/config.js +76 -3
- package/server/src/controllers/sync-media.js +24 -0
- package/server/src/routes/index.js +3 -0
- package/server/src/services/bulk-transfer.js +45 -1
- package/server/src/services/dependency-resolver.js +37 -0
- package/server/src/services/sync-execution.js +21 -9
- package/server/src/services/sync-media.js +168 -32
- package/server/src/services/sync-profiles.js +36 -15
- package/server/src/services/sync.js +234 -134
- package/server/src/utils/fetcher.js +7 -0
- package/docs/Screenshot 2026-04-20 160506.png +0 -0
- package/docs/Screenshot 2026-04-20 160558.png +0 -0
- package/docs/Screenshot 2026-04-20 175903.png +0 -0
- package/docs/Screenshot 2026-04-20 175931.png +0 -0
- package/docs/Screenshot 2026-04-20 180001.png +0 -0
- package/docs/Screenshot 2026-04-20 180041.png +0 -0
- package/docs/Screenshot 2026-04-20 180116.png +0 -0
- package/docs/Screenshot 2026-04-20 180135.png +0 -0
- package/docs/Screenshot 2026-04-20 180202.png +0 -0
- package/docs/Screenshot 2026-04-20 180228.png +0 -0
- package/docs/Screenshot 2026-04-20 180251.png +0 -0
- package/docs/Screenshot 2026-04-20 180301.png +0 -0
- package/docs/clipchamp-screen-recording-script.md +0 -0
- package/docs/production-readiness-status.md +0 -34
- package/docs/production-readiness-test-matrix.md +0 -151
- package/docs/test-environments-setup-legacy.txt +0 -60
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
# Content Sync Pro — Production Readiness Test Matrix
|
|
2
|
-
|
|
3
|
-
This guide converts the environment notes from `test-enviroments-setup.txt` into a structured, repeatable validation matrix for release readiness.
|
|
4
|
-
|
|
5
|
-
## 1) Test Environments
|
|
6
|
-
|
|
7
|
-
### Remote Server
|
|
8
|
-
- Start:
|
|
9
|
-
- `D:\Rutba\ERP> npm run dev:strapi`
|
|
10
|
-
- URL: `http://localhost:4010`
|
|
11
|
-
- DB: MySQL (`pos_db`)
|
|
12
|
-
- Upload dir: `D:\Rutba\data\rutba-pos-files\uploads`
|
|
13
|
-
|
|
14
|
-
### Local Server
|
|
15
|
-
- Start:
|
|
16
|
-
- `D:\Rutba\ERP\pos-strapi> npm run dev`
|
|
17
|
-
- URL: `http://localhost:40101`
|
|
18
|
-
- DB: MySQL (`rutba_pos`)
|
|
19
|
-
- Upload dir: `D:\Rutba\data\rutba-pos-files\tmp\uploads`
|
|
20
|
-
|
|
21
|
-
### Shared Notes
|
|
22
|
-
- Same Strapi codebase, different `.env` values.
|
|
23
|
-
- Admin credentials (both):
|
|
24
|
-
- Email: `eharain@yahoo.com`
|
|
25
|
-
- Password: `At56ZNTxXf6JSTq`
|
|
26
|
-
- Plugin deploy target to test runtime updates:
|
|
27
|
-
- `D:\Rutba\ERP\pos-strapi\src\plugins\strapi-content-sync-pro`
|
|
28
|
-
- Restart may be required after plugin copy/update.
|
|
29
|
-
|
|
30
|
-
## 2) Scope of Validation
|
|
31
|
-
|
|
32
|
-
- Paired mode (plugin installed both sides)
|
|
33
|
-
- Single-side mode (plugin active on local only)
|
|
34
|
-
- Profiles (simple + advanced), dependency depth, execution modes
|
|
35
|
-
- Entity sync (CMS content, products, orders)
|
|
36
|
-
- Media sync + entity-linked media
|
|
37
|
-
- Stats tab snapshots and before/after reports
|
|
38
|
-
- Log/report retention and cleanup controls
|
|
39
|
-
- Failure/recovery behavior
|
|
40
|
-
|
|
41
|
-
## 3) Pass/Fail Exit Criteria
|
|
42
|
-
|
|
43
|
-
A build is **production-ready** only if all are true:
|
|
44
|
-
- Critical test cases pass (P0/P1 below)
|
|
45
|
-
- No data corruption in local/remote DBs
|
|
46
|
-
- No orphaned media references after sync runs
|
|
47
|
-
- Stats/report data is generated and retention controls work
|
|
48
|
-
- Plugin starts cleanly after restart in tested configurations
|
|
49
|
-
|
|
50
|
-
## 4) Test Matrix
|
|
51
|
-
|
|
52
|
-
| ID | Priority | Area | Scenario | Setup | Steps | Expected Result | Status | Evidence |
|
|
53
|
-
|---|---|---|---|---|---|---|---|---|
|
|
54
|
-
| P0-01 | P0 | Health | Plugin ping reachable both servers (paired) | Both running with plugin enabled | Call `/api/strapi-content-sync-pro/ping` on :40101 and :4010 | HTTP 200 + `{ "status": "ok" }` | TODO | |
|
|
55
|
-
| P0-02 | P0 | Connection | Connection test in paired mode | Local configured to remote | Run **Test Connection** in Configuration tab | Success, plugin endpoint validated | TODO | |
|
|
56
|
-
| P0-03 | P0 | Single-side | Connection test in single-side mode | Disable remote plugin load via env | Set local mode `single_side`, run Test Connection | Success without requiring remote plugin routes | TODO | |
|
|
57
|
-
| P0-04 | P0 | Profiles | Pull-only enforcement in single-side | Local mode `single_side` | Try creating push/bidirectional profile | UI/API enforce pull-only | TODO | |
|
|
58
|
-
| P0-05 | P0 | Execution | Live mode blocked in single-side | Local mode `single_side` | Try saving execution mode `live` | Rejected or normalized to non-live | TODO | |
|
|
59
|
-
| P0-06 | P0 | Data | Orders remote → local sync | Create new orders on remote | Run local pull/sync | Orders and order details appear local | TODO | |
|
|
60
|
-
| P0-07 | P0 | Data | CMS/offers local → remote sync (paired) | Create CMS/offers local | Run push/bidirectional | Entries appear remote correctly | TODO | |
|
|
61
|
-
| P0-08 | P0 | Media | Entity-linked media sync | Attach media to products/CMS | Run sync profile + media sync | Files + DB refs consistent on target | TODO | |
|
|
62
|
-
| P0-09 | P0 | Stats | Pre/post run report generation | Any enabled content types | Trigger sync run | Stats report contains before/after snapshots | TODO | |
|
|
63
|
-
| P0-10 | P0 | Retention | Manual clear logs/reports | Existing logs/reports | Use clear actions in Stats tab | Data removed, UI refreshed | TODO | |
|
|
64
|
-
| P1-01 | P1 | Dependencies | Min depth profile run | Profile depth=1 | Run profile | Only first-level dependencies handled | TODO | |
|
|
65
|
-
| P1-02 | P1 | Dependencies | Max depth profile run | Profile depth=5 | Run profile | Deep dependencies handled; no crash | TODO | |
|
|
66
|
-
| P1-03 | P1 | Media Recovery | Recreate deleted local media from remote | Delete selected local media rows/files | Run downward sync | Missing media restored | TODO | |
|
|
67
|
-
| P1-04 | P1 | Conflict | Latest/local/remote strategy behavior | Divergent edits both sides | Run with each strategy | Winner follows selected policy | TODO | |
|
|
68
|
-
| P1-05 | P1 | Restart | Restart resilience | Update plugin files + restart | Restart both servers | Plugin loads without route/service errors | TODO | |
|
|
69
|
-
| P1-06 | P1 | Retention Auto | Pruning by max entries | Set low limits | Trigger retention run | Old logs/reports pruned to limit | TODO | |
|
|
70
|
-
| P2-01 | P2 | Performance | Large dataset pagination behavior | Seed high row count | Run sync with page-size variations | Completes with bounded memory/errors | TODO | |
|
|
71
|
-
| P2-02 | P2 | UX | Stats readability | Run several syncs | Review report history | Clear before/after trend visibility | TODO | |
|
|
72
|
-
|
|
73
|
-
## 5) Detailed Execution Checklist
|
|
74
|
-
|
|
75
|
-
### A. Baseline + Connectivity
|
|
76
|
-
1. Confirm both servers are running.
|
|
77
|
-
2. Verify paired mode ping endpoints.
|
|
78
|
-
3. Configure local plugin connection settings.
|
|
79
|
-
4. Validate **Test Connection** in paired mode.
|
|
80
|
-
|
|
81
|
-
### B. Single-side Mode
|
|
82
|
-
1. Disable plugin loading on remote using env flag.
|
|
83
|
-
2. Keep local plugin enabled.
|
|
84
|
-
3. Set local `syncMode = single_side`.
|
|
85
|
-
4. Run connection test and verify success without remote plugin route dependency.
|
|
86
|
-
5. Verify profile direction and execution mode restrictions.
|
|
87
|
-
|
|
88
|
-
### C. Data Sync Scenarios
|
|
89
|
-
1. Create products with variations on source side; sync and verify target.
|
|
90
|
-
2. Create orders on remote; pull to local and verify details.
|
|
91
|
-
3. Create CMS content/offers local; push to remote and verify.
|
|
92
|
-
4. Run scenarios with different conflict strategies.
|
|
93
|
-
|
|
94
|
-
### D. Media Scenarios
|
|
95
|
-
1. Upload media and attach to products/CMS entities.
|
|
96
|
-
2. Sync and verify both file presence and DB links.
|
|
97
|
-
3. Delete a subset of local media rows/files.
|
|
98
|
-
4. Re-run downward sync; confirm restoration.
|
|
99
|
-
|
|
100
|
-
### E. Stats + Retention
|
|
101
|
-
1. Trigger sync; confirm report with before/after snapshots appears.
|
|
102
|
-
2. Verify columns: local/remote count, newest timestamps, newest side.
|
|
103
|
-
3. Use manual clear for logs and reports.
|
|
104
|
-
4. Configure low retention limits and run retention; verify pruning.
|
|
105
|
-
|
|
106
|
-
### F. Restart/Recovery
|
|
107
|
-
1. Copy plugin changes into Strapi plugin destination.
|
|
108
|
-
2. Restart both instances.
|
|
109
|
-
3. Re-check critical routes and one sync run.
|
|
110
|
-
|
|
111
|
-
## 6) Evidence Template
|
|
112
|
-
|
|
113
|
-
For each executed case, capture:
|
|
114
|
-
- Timestamp
|
|
115
|
-
- Server mode (paired/single-side)
|
|
116
|
-
- Profile ID/name and execution mode
|
|
117
|
-
- Request/response snippets (or screenshots)
|
|
118
|
-
- DB/file verification notes
|
|
119
|
-
- Result: Pass/Fail + defect link
|
|
120
|
-
|
|
121
|
-
Example note:
|
|
122
|
-
- `P0-09` | `2026-04-21 10:20` | `Pass`
|
|
123
|
-
- Report ID: `...`
|
|
124
|
-
- Before: products local=120 remote=115 newest=local
|
|
125
|
-
- After: products local=120 remote=120 newest=equal
|
|
126
|
-
|
|
127
|
-
## 7) Defect Severity Guidance
|
|
128
|
-
|
|
129
|
-
- **Critical**: Data loss/corruption, wrong direction writes, plugin cannot start
|
|
130
|
-
- **High**: Core sync path broken for common scenario
|
|
131
|
-
- **Medium**: Stats/reporting incorrect but sync still reliable
|
|
132
|
-
- **Low**: UI copy/formatting issues
|
|
133
|
-
|
|
134
|
-
## 8) Go/No-Go Summary
|
|
135
|
-
|
|
136
|
-
- Total cases executed:
|
|
137
|
-
- Passed:
|
|
138
|
-
- Failed:
|
|
139
|
-
- Blocked:
|
|
140
|
-
- Critical open defects:
|
|
141
|
-
- Decision: **GO / NO-GO**
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
## Current Session Smoke Result
|
|
146
|
-
|
|
147
|
-
- Ping local (`:40101`) = PASS
|
|
148
|
-
- Ping remote (`:4010`) = PASS
|
|
149
|
-
- Package test script (`npm run test`) = PASS (`No tests yet` placeholder)
|
|
150
|
-
|
|
151
|
-
A full production readiness sign-off requires completion of the matrix above.
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
Remote server :
|
|
3
|
-
D:\>cd d:\Rutba\ERP
|
|
4
|
-
D:\Rutba\ERP>npm run dev:strapi
|
|
5
|
-
|
|
6
|
-
Database = mysql
|
|
7
|
-
Database name = pos_db
|
|
8
|
-
URL= http://localhost:4010
|
|
9
|
-
Upload dir =D:\Rutba\data\rutba-pos-files\uploads
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Local Server:
|
|
15
|
-
D:\Rutba\ERP>cd pos-strapi
|
|
16
|
-
D:\Rutba\ERP\pos-strapi>npm run dev
|
|
17
|
-
http://localhost:40101
|
|
18
|
-
|
|
19
|
-
Database = mysql │
|
|
20
|
-
Database name = rutba_pos
|
|
21
|
-
Upload Dir = D:\Rutba\data\rutba-pos-files\tmp\uploads
|
|
22
|
-
|
|
23
|
-
these two servers have same code base of strapi but are running using different .env settings
|
|
24
|
-
|
|
25
|
-
you can truncate or partially delete any of their database tables or enteries as well as files.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Please note that when the files are copied over the instance try to reboot but any of these can fail to start so you will have to restart. the restart takes about a minutes each time.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
Both the servers admin user : eharain@yahoo.com and password : At56ZNTxXf6JSTq
|
|
33
|
-
|
|
34
|
-
kindly test different settings and different variations and ensure that the plugin works as desired.
|
|
35
|
-
|
|
36
|
-
the current servers are running in command prompt and you can stop them by pressing ctrl+c and start them again using the above commands. you can run these servers in you own power shels if you want.
|
|
37
|
-
the servers will not restrt unloss you copy the code changes in destination drrectory of the plugin that is :D:\Rutba\ERP\pos-strapi\src\plugins\strapi-content-sync-pro
|
|
38
|
-
|
|
39
|
-
to understand the entites read the contents of any server or in src directory of the strapi.
|
|
40
|
-
|
|
41
|
-
to test single-side mode disable the plugin loading by a special enviromment variable so that specific spin of strapi will not load the plugin and then you can test the sync in one direction.
|
|
42
|
-
|
|
43
|
-
Tests:
|
|
44
|
-
kindly create different sync profiles with least and max dependiceis and depth and try executing them.
|
|
45
|
-
|
|
46
|
-
kindly few media files and then sync also upload connect to entites and then sync and check if the media files are also synced properly with the entities.
|
|
47
|
-
|
|
48
|
-
Please also test the sync with different data in the tables and check if the sync is working as expected.
|
|
49
|
-
|
|
50
|
-
insert test data specially cms entites and then sync and check if the data is synced properly in the destination server.
|
|
51
|
-
|
|
52
|
-
create products and test the sync with different variations of products and check if the products are synced properly in the destination server.
|
|
53
|
-
|
|
54
|
-
create orders and test the sync with different variations of orders and check if the orders are synced properly in the destination server.
|
|
55
|
-
|
|
56
|
-
the orders will be created on remote server and should be synced to local server and then you can check the orders in local server and also check the order details and the products in the order and the media files connected to the products in the order.
|
|
57
|
-
|
|
58
|
-
the cms contenst and offers are created on local servers and set to remote server and then you can check the cms content and offers in remote server and also check the media files connected to the cms content and offers.
|
|
59
|
-
|
|
60
|
-
complete remove media enteries and few files on local server and then sync downward and check if these are created again. simmilar create new media each side and sync across.
|