strapi-plugin-magic-mark 2.0.0 → 3.0.0
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/README.md +488 -209
- package/dist/_chunks/{App-CMSut1pt.js → App-C5UU0yUr.js} +2 -2
- package/dist/_chunks/{App-7ZH1Reka.mjs → App-Dt-v39BQ.mjs} +3 -3
- package/dist/_chunks/{index-DYHEyGJr.mjs → index-BAmZV8aX.mjs} +1 -1
- package/dist/_chunks/{index-DkkmdRgb.js → index-RuDV4dTy.js} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/server/index.js +265 -184
- package/dist/server/index.mjs +260 -179
- package/dist/server/src/content-types/index.d.ts +10 -0
- package/dist/server/src/controllers/controller.d.ts +38 -0
- package/dist/server/src/index.d.ts +20 -22
- package/dist/server/src/services/index.d.ts +10 -22
- package/dist/server/src/services/service.d.ts +67 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,364 +1,644 @@
|
|
|
1
|
-
# MagicMark - Advanced Query Builder for Strapi v5
|
|
1
|
+
# MagicMark - Advanced Query Builder for Strapi v5 🔖
|
|
2
2
|
|
|
3
|
-
Save and apply complex Content Manager queries with one click
|
|
3
|
+
**Save and apply complex Content Manager queries with one click.** Professional bookmark management with role-based sharing, advanced filtering, and drag-and-drop organization for Strapi v5.
|
|
4
4
|
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
[](https://www.npmjs.com/package/strapi-plugin-magic-mark)
|
|
7
|
+
[](https://github.com/Schero94/Magicmark/releases)
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
---
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
## 📸 Screenshots
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- 🇫🇷 **Français** - French
|
|
15
|
-
- 🇪🇸 **Español** - Spanish (Spain & Latin America)
|
|
16
|
-
- 🇵🇹 **Português** - Portuguese (Brazil & Portugal)
|
|
13
|
+
### MagicMark Dashboard
|
|
14
|
+
Professional interface for managing query bookmarks with statistics and easy access.
|
|
17
15
|
|
|
18
|
-
|
|
16
|
+

|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
### Save as MagicMark
|
|
19
|
+
Create bookmarks with emoji, name, description, and sharing options directly from Content Manager.
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+

|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
### Advanced Filter Builder
|
|
24
|
+
Build complex queries with the advanced filter modal for precise content filtering.
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
### Quick Access in Content Manager
|
|
29
|
+
Seamless integration - MagicMark button right in the Content Manager toolbar for instant bookmark access.
|
|
30
|
+
|
|
31
|
+

|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
- ❌ Remove or bypass the license validation system
|
|
35
|
-
- ❌ Modify `license-guard.ts` or license-related endpoints
|
|
36
|
-
- ❌ Disable license activation requirements
|
|
33
|
+
---
|
|
37
34
|
|
|
38
|
-
|
|
35
|
+
## 📋 Table of Contents
|
|
39
36
|
|
|
40
|
-
|
|
37
|
+
- [Features](#features)
|
|
38
|
+
- [Quick Start](#quick-start)
|
|
39
|
+
- [How It Works](#how-it-works)
|
|
40
|
+
- [Screenshots in Action](#screenshots-in-action)
|
|
41
|
+
- [API Routes](#api-routes)
|
|
42
|
+
- [Configuration](#configuration)
|
|
43
|
+
- [Use Cases](#use-cases)
|
|
44
|
+
- [Testing](#testing)
|
|
45
|
+
- [Troubleshooting](#troubleshooting)
|
|
46
|
+
- [Development](#development)
|
|
41
47
|
|
|
42
48
|
---
|
|
43
49
|
|
|
44
50
|
## ✨ Features
|
|
45
51
|
|
|
46
|
-
### Core
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
- 🌐 **License Management** - Built-in license activation interface
|
|
52
|
+
### Core Bookmark Management
|
|
53
|
+
✅ **Query Bookmarks** - Save complex Content Manager filters, sorts, and pagination
|
|
54
|
+
✅ **One-Click Apply** - Instantly restore entire query states
|
|
55
|
+
✅ **Emoji Identification** - Visual icons for quick bookmark recognition
|
|
56
|
+
✅ **Pin to Top** - Keep frequently used bookmarks always accessible
|
|
57
|
+
✅ **Drag & Drop** - Reorder bookmarks effortlessly
|
|
58
|
+
✅ **Mobile Optimized** - Fully responsive design
|
|
59
|
+
|
|
60
|
+
### Advanced Sharing
|
|
61
|
+
✅ **Role-Based Sharing** - Share with specific admin roles
|
|
62
|
+
✅ **User Sharing** - Share with individual admin users
|
|
63
|
+
✅ **Public Bookmarks** - Make bookmarks visible to all users
|
|
64
|
+
✅ **Permission Control** - Fine-grained access management
|
|
60
65
|
|
|
61
66
|
### User Experience
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
✅ **Quick Access** - Bookmark button in Content Manager toolbar
|
|
68
|
+
✅ **Filter Preview** - See exactly what's saved in each bookmark
|
|
69
|
+
✅ **Descriptions** - Add notes to remember bookmark purpose
|
|
70
|
+
✅ **Context Aware** - Automatically detects current content type
|
|
71
|
+
✅ **Instant Save** - Capture current query state in one click
|
|
72
|
+
✅ **Professional UI** - Beautiful gradient design with smooth animations
|
|
73
|
+
|
|
74
|
+
### Multi-Language Support
|
|
75
|
+
✅ **5 Languages** - English, Deutsch, Français, Español, Português
|
|
76
|
+
✅ **Auto-Detection** - Follows your Strapi admin language
|
|
77
|
+
✅ **Complete i18n** - All UI elements translated
|
|
67
78
|
|
|
68
79
|
---
|
|
69
80
|
|
|
70
|
-
##
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
npm install strapi-plugin-magic-mark
|
|
74
|
-
```
|
|
81
|
+
## 🚀 Quick Start
|
|
75
82
|
|
|
76
|
-
|
|
83
|
+
### 1. Install Plugin
|
|
77
84
|
|
|
78
85
|
```bash
|
|
86
|
+
npm install strapi-plugin-magic-mark
|
|
87
|
+
# or
|
|
79
88
|
yarn add strapi-plugin-magic-mark
|
|
80
89
|
```
|
|
81
90
|
|
|
82
|
-
|
|
91
|
+
### 2. Register in Config
|
|
92
|
+
|
|
93
|
+
Add to `src/config/plugins.ts` (or `plugins.js`):
|
|
83
94
|
|
|
84
95
|
```typescript
|
|
85
|
-
export default {
|
|
96
|
+
export default () => ({
|
|
86
97
|
'magic-mark': {
|
|
87
98
|
enabled: true,
|
|
88
99
|
},
|
|
89
|
-
};
|
|
100
|
+
});
|
|
90
101
|
```
|
|
91
102
|
|
|
92
|
-
|
|
103
|
+
### 3. Build & Run
|
|
93
104
|
|
|
94
105
|
```bash
|
|
106
|
+
# Rebuild admin panel
|
|
95
107
|
npm run build
|
|
96
|
-
# or
|
|
97
|
-
yarn build
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
---
|
|
101
108
|
|
|
102
|
-
|
|
109
|
+
# Start Strapi
|
|
110
|
+
npm run develop
|
|
111
|
+
```
|
|
103
112
|
|
|
104
|
-
###
|
|
113
|
+
### 4. Activate License (First Use)
|
|
105
114
|
|
|
106
|
-
|
|
107
|
-
- Click **"Activate License"**
|
|
108
|
-
-
|
|
109
|
-
-
|
|
115
|
+
- Go to Admin → **MagicMark**
|
|
116
|
+
- Click **"Activate License"**
|
|
117
|
+
- Choose: Auto-create, Manual entry, or Existing key
|
|
118
|
+
- Done! Plugin is ready
|
|
110
119
|
|
|
111
|
-
###
|
|
120
|
+
### 5. Save Your First Bookmark
|
|
112
121
|
|
|
113
122
|
1. Navigate to any Content Manager collection
|
|
114
123
|
2. Apply filters, sorting, or search
|
|
115
|
-
3. Click the **MagicMark** button in the toolbar
|
|
124
|
+
3. Click the **MagicMark** button in the toolbar (see screenshot above)
|
|
116
125
|
4. Click **"Save Bookmark"**
|
|
117
|
-
5. Add
|
|
118
|
-
|
|
126
|
+
5. Add:
|
|
127
|
+
- Name (e.g., "Published Articles")
|
|
128
|
+
- Emoji (e.g., 📰)
|
|
129
|
+
- Description (optional)
|
|
130
|
+
- Sharing settings (optional)
|
|
131
|
+
6. Click **Save**
|
|
119
132
|
|
|
120
|
-
###
|
|
133
|
+
### 6. Use Bookmarks
|
|
121
134
|
|
|
122
|
-
- Click **MagicMark**
|
|
123
|
-
-
|
|
124
|
-
-
|
|
135
|
+
- Click **MagicMark** → Select bookmark → Done!
|
|
136
|
+
- All filters are instantly applied
|
|
137
|
+
- Share with team members
|
|
125
138
|
|
|
126
139
|
---
|
|
127
140
|
|
|
128
|
-
##
|
|
141
|
+
## 🔄 How It Works
|
|
129
142
|
|
|
130
|
-
###
|
|
131
|
-
- **Published Articles** - Quick access to published content
|
|
132
|
-
- **Draft Posts** - Filter for unpublished drafts
|
|
133
|
-
- **Recent Updates** - Items modified in last 7 days
|
|
134
|
-
- **My Content** - Content created by you
|
|
143
|
+
### Bookmark Save Flow
|
|
135
144
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
145
|
+
```
|
|
146
|
+
User in Content Manager
|
|
147
|
+
↓
|
|
148
|
+
Applies: Filters, Sort, Search, Pagination
|
|
149
|
+
↓
|
|
150
|
+
[Click MagicMark Button] (See "Quick Access" screenshot)
|
|
151
|
+
↓
|
|
152
|
+
"Save Bookmark" Modal opens (See "Save as MagicMark" screenshot)
|
|
153
|
+
↓
|
|
154
|
+
User enters: Name, Emoji, Description, Sharing
|
|
155
|
+
↓
|
|
156
|
+
[Save]
|
|
157
|
+
↓
|
|
158
|
+
Query parameters captured:
|
|
159
|
+
- Path: /content-manager/collection-types/api::article.article
|
|
160
|
+
- Query: filters[$and][0][publishedAt][$notNull]=true&sort[0]=createdAt:desc
|
|
161
|
+
- Pagination: page=1&pageSize=25
|
|
162
|
+
↓
|
|
163
|
+
Bookmark stored in database
|
|
164
|
+
↓
|
|
165
|
+
Success! Bookmark appears in Dashboard (See "Dashboard" screenshot)
|
|
166
|
+
```
|
|
140
167
|
|
|
141
|
-
###
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
168
|
+
### Bookmark Apply Flow
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
User clicks MagicMark button
|
|
172
|
+
↓
|
|
173
|
+
List of available bookmarks appears
|
|
174
|
+
(filtered by user permissions)
|
|
175
|
+
↓
|
|
176
|
+
[User selects bookmark]
|
|
177
|
+
↓
|
|
178
|
+
Navigation to content type happens
|
|
179
|
+
↓
|
|
180
|
+
Query parameters applied:
|
|
181
|
+
- Filters restored (See "Advanced Filters" screenshot)
|
|
182
|
+
- Sort order set
|
|
183
|
+
- Pagination reset
|
|
184
|
+
- Search cleared
|
|
185
|
+
↓
|
|
186
|
+
Content Manager displays filtered results
|
|
187
|
+
```
|
|
145
188
|
|
|
146
189
|
---
|
|
147
190
|
|
|
148
|
-
##
|
|
191
|
+
## 🎬 Screenshots in Action
|
|
192
|
+
|
|
193
|
+
### 1. Dashboard View
|
|
194
|
+
The main **MagicMark Dashboard** (see first screenshot above) shows:
|
|
195
|
+
- All your bookmarks with emoji icons
|
|
196
|
+
- Pinned bookmarks at the top
|
|
197
|
+
- Quick actions: Edit, Delete, Share
|
|
198
|
+
- Search and filter capabilities
|
|
199
|
+
- Beautiful gradient design
|
|
200
|
+
|
|
201
|
+
### 2. Quick Access Button
|
|
202
|
+
The **Quick Access** button (see screenshot above) is integrated directly into:
|
|
203
|
+
- Content Manager toolbar
|
|
204
|
+
- Appears on all collection pages
|
|
205
|
+
- One-click access to bookmarks
|
|
206
|
+
- Context-aware (shows relevant bookmarks)
|
|
207
|
+
|
|
208
|
+
### 3. Save Bookmark Modal
|
|
209
|
+
The **Save Bookmark Modal** (see screenshot above) includes:
|
|
210
|
+
- Name field with emoji picker
|
|
211
|
+
- Description for notes
|
|
212
|
+
- Sharing options (Roles, Users, Public)
|
|
213
|
+
- Preview of current query
|
|
214
|
+
- Visual feedback
|
|
215
|
+
|
|
216
|
+
### 4. Advanced Filters
|
|
217
|
+
The **Advanced Filter Builder** (see screenshot above) lets you:
|
|
218
|
+
- Build complex filter conditions
|
|
219
|
+
- Combine AND/OR logic
|
|
220
|
+
- Save multi-level queries
|
|
221
|
+
- Preview filter results
|
|
222
|
+
- Edit existing filters
|
|
149
223
|
|
|
150
|
-
|
|
151
|
-
Professional interface for managing query bookmarks with statistics and easy access.
|
|
224
|
+
---
|
|
152
225
|
|
|
153
|
-
|
|
226
|
+
## 📡 API Routes
|
|
154
227
|
|
|
155
|
-
###
|
|
156
|
-
Create bookmarks with emoji, name, description, and sharing options directly from Content Manager.
|
|
228
|
+
### Content API Routes
|
|
157
229
|
|
|
158
|
-
|
|
230
|
+
All routes require valid JWT authentication (except public bookmarks).
|
|
159
231
|
|
|
160
|
-
|
|
161
|
-
Build complex queries with the advanced filter modal for precise content filtering.
|
|
232
|
+
#### Get All Bookmarks
|
|
162
233
|
|
|
163
|
-
|
|
234
|
+
```bash
|
|
235
|
+
GET /api/magic-mark/bookmarks
|
|
164
236
|
|
|
165
|
-
|
|
166
|
-
|
|
237
|
+
Response:
|
|
238
|
+
{
|
|
239
|
+
"data": [
|
|
240
|
+
{
|
|
241
|
+
"id": 1,
|
|
242
|
+
"attributes": {
|
|
243
|
+
"name": "Published Articles",
|
|
244
|
+
"emoji": "📰",
|
|
245
|
+
"description": "Recent published content",
|
|
246
|
+
"path": "/content-manager/collection-types/api::article.article",
|
|
247
|
+
"query": "filters[$and][0][publishedAt][$notNull]=true",
|
|
248
|
+
"isPinned": true,
|
|
249
|
+
"isPublic": false,
|
|
250
|
+
"createdAt": "2024-01-15T10:30:00Z"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
],
|
|
254
|
+
"meta": { "count": 5 }
|
|
255
|
+
}
|
|
256
|
+
```
|
|
167
257
|
|
|
168
|
-
|
|
258
|
+
#### Create Bookmark
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
POST /api/magic-mark/bookmarks
|
|
262
|
+
Authorization: Bearer JWT_TOKEN
|
|
263
|
+
|
|
264
|
+
Request:
|
|
265
|
+
{
|
|
266
|
+
"data": {
|
|
267
|
+
"name": "Draft Posts",
|
|
268
|
+
"emoji": "📝",
|
|
269
|
+
"description": "Unpublished drafts",
|
|
270
|
+
"path": "/content-manager/collection-types/api::article.article",
|
|
271
|
+
"query": "filters[0][publishedAt][$null]=true",
|
|
272
|
+
"isPublic": false,
|
|
273
|
+
"sharedWithRoles": [1, 2],
|
|
274
|
+
"sharedWithUsers": [3]
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
#### Update Bookmark
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
PUT /api/magic-mark/bookmarks/:id
|
|
283
|
+
Authorization: Bearer JWT_TOKEN
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
#### Delete Bookmark
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
DELETE /api/magic-mark/bookmarks/:id
|
|
290
|
+
Authorization: Bearer JWT_TOKEN
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
#### Reorder Bookmarks
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
POST /api/magic-mark/bookmarks/reorder
|
|
297
|
+
Authorization: Bearer JWT_TOKEN
|
|
298
|
+
|
|
299
|
+
Request:
|
|
300
|
+
{
|
|
301
|
+
"bookmarkIds": [3, 1, 5, 2, 4]
|
|
302
|
+
}
|
|
303
|
+
```
|
|
169
304
|
|
|
170
305
|
---
|
|
171
306
|
|
|
172
|
-
##
|
|
307
|
+
## ⚙️ Configuration
|
|
173
308
|
|
|
174
|
-
### Basic Setup
|
|
309
|
+
### Basic Setup (Default)
|
|
175
310
|
|
|
176
|
-
The plugin works out of the box with
|
|
311
|
+
The plugin works out of the box with zero configuration!
|
|
177
312
|
|
|
178
|
-
|
|
313
|
+
```typescript
|
|
314
|
+
// src/config/plugins.ts
|
|
315
|
+
export default () => ({
|
|
316
|
+
'magic-mark': {
|
|
317
|
+
enabled: true,
|
|
318
|
+
},
|
|
319
|
+
});
|
|
320
|
+
```
|
|
179
321
|
|
|
180
|
-
|
|
322
|
+
### Advanced Options (Optional)
|
|
181
323
|
|
|
182
324
|
```typescript
|
|
183
|
-
export default {
|
|
325
|
+
export default () => ({
|
|
184
326
|
'magic-mark': {
|
|
185
327
|
enabled: true,
|
|
186
328
|
config: {
|
|
187
|
-
//
|
|
329
|
+
// Maximum bookmarks per user
|
|
330
|
+
maxBookmarksPerUser: 50,
|
|
331
|
+
|
|
332
|
+
// Enable query history
|
|
333
|
+
enableHistory: true,
|
|
334
|
+
|
|
335
|
+
// Auto-cleanup old queries (days)
|
|
336
|
+
autoCleanupDays: 90,
|
|
188
337
|
},
|
|
189
338
|
},
|
|
190
|
-
};
|
|
339
|
+
});
|
|
191
340
|
```
|
|
192
341
|
|
|
193
342
|
---
|
|
194
343
|
|
|
195
|
-
##
|
|
344
|
+
## 💡 Use Cases
|
|
196
345
|
|
|
197
|
-
###
|
|
346
|
+
### Content Management
|
|
198
347
|
|
|
199
|
-
|
|
200
|
-
|
|
348
|
+
**Published Articles** 📰
|
|
349
|
+
```
|
|
350
|
+
Filter: publishedAt is not empty
|
|
351
|
+
Sort: createdAt DESC
|
|
352
|
+
Result: Quick access to all published content
|
|
201
353
|
```
|
|
202
354
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
355
|
+
**Draft Posts** 📝
|
|
356
|
+
```
|
|
357
|
+
Filter: publishedAt is empty AND status = "draft"
|
|
358
|
+
Sort: updatedAt DESC
|
|
359
|
+
Result: Focus on work in progress
|
|
207
360
|
```
|
|
208
361
|
|
|
209
|
-
|
|
362
|
+
**Recent Updates** 🕒
|
|
363
|
+
```
|
|
364
|
+
Filter: updatedAt >= 7 days ago
|
|
365
|
+
Sort: updatedAt DESC
|
|
366
|
+
Result: See what changed recently
|
|
367
|
+
```
|
|
210
368
|
|
|
211
|
-
|
|
212
|
-
|
|
369
|
+
**My Content** 👤
|
|
370
|
+
```
|
|
371
|
+
Filter: createdBy = current user
|
|
372
|
+
Sort: createdAt DESC
|
|
373
|
+
Result: See all your creations
|
|
213
374
|
```
|
|
214
375
|
|
|
215
|
-
|
|
376
|
+
### Team Collaboration
|
|
216
377
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
378
|
+
**Shared Queries** 👥
|
|
379
|
+
- Team members access same filtered views
|
|
380
|
+
- No need to re-apply complex filters
|
|
381
|
+
- Everyone sees consistent data
|
|
382
|
+
|
|
383
|
+
**Role-Based Access** 🔐
|
|
384
|
+
- Editors see different bookmarks than Authors
|
|
385
|
+
- Managers see different views than Contributors
|
|
386
|
+
- Automatic based on admin roles
|
|
387
|
+
|
|
388
|
+
**Public Bookmarks** 🌍
|
|
389
|
+
- Common queries for entire team
|
|
390
|
+
- New members immediately see them
|
|
391
|
+
- Save time explaining filters
|
|
392
|
+
|
|
393
|
+
### Power Users
|
|
394
|
+
|
|
395
|
+
**Complex Filters** 🎯
|
|
396
|
+
```
|
|
397
|
+
Save multi-condition queries:
|
|
398
|
+
- Status = "approved"
|
|
399
|
+
- Category IN ["tech", "news"]
|
|
400
|
+
- Priority >= "high"
|
|
401
|
+
- CreatedAt >= "2024-01-01"
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
**Sorted Views** 📊
|
|
405
|
+
```
|
|
406
|
+
Different sort orders for different needs:
|
|
407
|
+
- By date (newest first)
|
|
408
|
+
- By title (A-Z)
|
|
409
|
+
- By popularity (most viewed)
|
|
220
410
|
```
|
|
221
411
|
|
|
222
412
|
---
|
|
223
413
|
|
|
224
|
-
##
|
|
414
|
+
## 🧪 Testing
|
|
225
415
|
|
|
226
|
-
###
|
|
416
|
+
### 1. Install & Setup
|
|
227
417
|
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
"description": "All published articles",
|
|
236
|
-
"isPublic": false,
|
|
237
|
-
"sharedWithRoles": [1, 2],
|
|
238
|
-
"sharedWithUsers": []
|
|
239
|
-
}
|
|
418
|
+
```bash
|
|
419
|
+
# Install in your Strapi project
|
|
420
|
+
npm install strapi-plugin-magic-mark
|
|
421
|
+
|
|
422
|
+
# Add to config/plugins.ts
|
|
423
|
+
# Rebuild admin
|
|
424
|
+
npm run build
|
|
240
425
|
```
|
|
241
426
|
|
|
242
|
-
###
|
|
427
|
+
### 2. Test Basic Bookmark
|
|
243
428
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
429
|
+
1. Go to Content Manager → Any collection
|
|
430
|
+
2. Apply some filters
|
|
431
|
+
3. Click **MagicMark** button (see screenshot)
|
|
432
|
+
4. Save with name "Test Bookmark" and emoji 🧪
|
|
433
|
+
5. Verify it appears in dashboard
|
|
248
434
|
|
|
249
|
-
###
|
|
435
|
+
### 3. Test Bookmark Apply
|
|
250
436
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
437
|
+
1. Clear all filters
|
|
438
|
+
2. Click **MagicMark** → Select "Test Bookmark"
|
|
439
|
+
3. Verify filters are restored correctly
|
|
254
440
|
|
|
255
|
-
###
|
|
441
|
+
### 4. Test Sharing
|
|
256
442
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
443
|
+
1. Create bookmark
|
|
444
|
+
2. Share with specific role
|
|
445
|
+
3. Login as user with that role
|
|
446
|
+
4. Verify bookmark is visible
|
|
260
447
|
|
|
261
|
-
###
|
|
448
|
+
### 5. Test Advanced Filters
|
|
262
449
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
}
|
|
268
|
-
```
|
|
450
|
+
1. Use **Advanced Filter Builder** (see screenshot)
|
|
451
|
+
2. Create complex multi-condition filter
|
|
452
|
+
3. Save as bookmark
|
|
453
|
+
4. Apply and verify all conditions work
|
|
269
454
|
|
|
270
455
|
---
|
|
271
456
|
|
|
272
|
-
##
|
|
457
|
+
## 🐛 Troubleshooting
|
|
273
458
|
|
|
274
|
-
MagicMark
|
|
459
|
+
### MagicMark Button Not Appearing
|
|
275
460
|
|
|
276
|
-
|
|
277
|
-
- **One-click activation** - Auto-create with your admin account
|
|
278
|
-
- **Offline mode** - 24-hour grace period
|
|
279
|
-
- **Multiple options** - Auto-create, manual, or existing key
|
|
461
|
+
**Problem:** No MagicMark button in Content Manager toolbar (see screenshot for where it should be).
|
|
280
462
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
463
|
+
**Solutions:**
|
|
464
|
+
1. Rebuild admin: `npm run build`
|
|
465
|
+
2. Clear browser cache (Cmd+Shift+R / Ctrl+Shift+R)
|
|
466
|
+
3. Check plugin is enabled in config
|
|
467
|
+
4. Check browser console for errors (F12)
|
|
285
468
|
|
|
286
|
-
|
|
469
|
+
### Bookmarks Not Saving
|
|
287
470
|
|
|
288
|
-
|
|
471
|
+
**Problem:** Click "Save Bookmark" but bookmark doesn't appear in dashboard.
|
|
289
472
|
|
|
290
|
-
|
|
473
|
+
**Solutions:**
|
|
474
|
+
1. Check Strapi logs for errors
|
|
475
|
+
2. Verify license is activated
|
|
476
|
+
3. Check database is writable
|
|
477
|
+
4. Try creating simpler bookmark first
|
|
291
478
|
|
|
292
|
-
|
|
293
|
-
2. Create a feature branch
|
|
294
|
-
3. Make your changes
|
|
295
|
-
4. Submit a pull request
|
|
479
|
+
### Bookmarks Not Applying
|
|
296
480
|
|
|
297
|
-
|
|
481
|
+
**Problem:** Select bookmark but filters don't apply.
|
|
298
482
|
|
|
299
|
-
|
|
483
|
+
**Solutions:**
|
|
484
|
+
1. Refresh page and try again
|
|
485
|
+
2. Check Content Manager path matches bookmark
|
|
486
|
+
3. Try creating new bookmark
|
|
487
|
+
4. Clear browser localStorage
|
|
300
488
|
|
|
301
|
-
|
|
489
|
+
### Advanced Filters Not Working
|
|
302
490
|
|
|
303
|
-
**
|
|
491
|
+
**Problem:** Complex filters from advanced builder don't apply correctly.
|
|
304
492
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
493
|
+
**Solutions:**
|
|
494
|
+
1. Check filter syntax in bookmark
|
|
495
|
+
2. Try simpler filter first
|
|
496
|
+
3. Verify content type supports the filters
|
|
497
|
+
4. Check browser console for errors
|
|
310
498
|
|
|
311
499
|
---
|
|
312
500
|
|
|
313
|
-
##
|
|
501
|
+
## 🛠️ Development
|
|
314
502
|
|
|
315
|
-
|
|
503
|
+
### Local Development
|
|
316
504
|
|
|
317
|
-
|
|
318
|
-
-
|
|
319
|
-
|
|
320
|
-
- Why it would be useful
|
|
505
|
+
```bash
|
|
506
|
+
# Watch mode - rebuilds on file changes
|
|
507
|
+
npm run watch
|
|
321
508
|
|
|
322
|
-
|
|
509
|
+
# Link to local Strapi
|
|
510
|
+
npm run watch:link
|
|
511
|
+
|
|
512
|
+
# Type checking
|
|
513
|
+
npm run test:ts:front # Frontend TypeScript
|
|
514
|
+
npm run test:ts:back # Backend TypeScript
|
|
515
|
+
|
|
516
|
+
# Verify plugin
|
|
517
|
+
npm run verify
|
|
518
|
+
```
|
|
323
519
|
|
|
324
|
-
|
|
520
|
+
### Plugin Structure
|
|
325
521
|
|
|
326
|
-
|
|
522
|
+
```
|
|
523
|
+
magic-mark/
|
|
524
|
+
├── admin/ # React admin UI
|
|
525
|
+
│ └── src/
|
|
526
|
+
│ ├── components/
|
|
527
|
+
│ │ ├── BookmarkList.tsx
|
|
528
|
+
│ │ ├── SaveBookmarkModal.tsx
|
|
529
|
+
│ │ ├── BookmarkCard.tsx
|
|
530
|
+
│ │ └── AdvancedFilterBuilder.tsx
|
|
531
|
+
│ ├── pages/
|
|
532
|
+
│ │ ├── App.tsx
|
|
533
|
+
│ │ ├── HomePage.tsx (Dashboard - see screenshot)
|
|
534
|
+
│ │ └── LicensePage.tsx
|
|
535
|
+
│ ├── hooks/
|
|
536
|
+
│ ├── translations/ # i18n (5 languages)
|
|
537
|
+
│ └── index.ts
|
|
538
|
+
├── server/ # Backend (TypeScript)
|
|
539
|
+
│ └── src/
|
|
540
|
+
│ ├── bootstrap.ts
|
|
541
|
+
│ ├── controllers/
|
|
542
|
+
│ ├── services/
|
|
543
|
+
│ ├── routes/
|
|
544
|
+
│ └── content-types/
|
|
545
|
+
├── pics/ # Screenshots
|
|
546
|
+
│ ├── dashboard.png
|
|
547
|
+
│ ├── saveAsMagicMark.png
|
|
548
|
+
│ ├── advancedFilters.png
|
|
549
|
+
│ └── quickaccesinContentmanager.png
|
|
550
|
+
├── .github/workflows/ # CI/CD
|
|
551
|
+
├── package.json
|
|
552
|
+
├── .releaserc.json
|
|
553
|
+
└── README.md
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
### Build & Release
|
|
557
|
+
|
|
558
|
+
```bash
|
|
559
|
+
# Build plugin
|
|
560
|
+
npm run build
|
|
561
|
+
|
|
562
|
+
# Verify integrity
|
|
563
|
+
npm run verify
|
|
564
|
+
|
|
565
|
+
# Release (automatic via GitHub Actions)
|
|
566
|
+
# Just use semantic commits:
|
|
567
|
+
git commit -m "feat: add new feature" # → MINOR version
|
|
568
|
+
git commit -m "fix: fix bug" # → PATCH version
|
|
569
|
+
git commit -m "feat!: breaking change" # → MAJOR version
|
|
570
|
+
```
|
|
327
571
|
|
|
328
572
|
---
|
|
329
573
|
|
|
330
|
-
##
|
|
574
|
+
## 📦 NPM Release Process
|
|
575
|
+
|
|
576
|
+
This plugin uses **semantic-release** for automated versioning.
|
|
577
|
+
|
|
578
|
+
### Commit Message Format
|
|
331
579
|
|
|
332
|
-
|
|
333
|
-
|
|
580
|
+
```bash
|
|
581
|
+
# PATCH version (bug fix)
|
|
582
|
+
git commit -m "fix: correct bookmark save"
|
|
583
|
+
|
|
584
|
+
# MINOR version (new feature)
|
|
585
|
+
git commit -m "feat: add bookmark export"
|
|
586
|
+
|
|
587
|
+
# MAJOR version (breaking change)
|
|
588
|
+
git commit -m "feat!: change API format"
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
### Automatic Release
|
|
592
|
+
|
|
593
|
+
GitHub Actions automatically:
|
|
594
|
+
- Analyzes commits
|
|
595
|
+
- Bumps version
|
|
596
|
+
- Updates CHANGELOG
|
|
597
|
+
- Publishes to NPM
|
|
598
|
+
- Creates GitHub release
|
|
334
599
|
|
|
335
600
|
---
|
|
336
601
|
|
|
337
|
-
##
|
|
602
|
+
## 🤝 Contributing
|
|
603
|
+
|
|
604
|
+
Contributions are welcome!
|
|
605
|
+
|
|
606
|
+
1. Fork: https://github.com/Schero94/Magicmark
|
|
607
|
+
2. Create branch: `git checkout -b feature/amazing`
|
|
608
|
+
3. Commit: `git commit -m "feat: add amazing feature"`
|
|
609
|
+
4. Push: `git push origin feature/amazing`
|
|
610
|
+
5. Open Pull Request
|
|
611
|
+
|
|
612
|
+
---
|
|
338
613
|
|
|
339
|
-
|
|
614
|
+
## 📚 Resources
|
|
340
615
|
|
|
341
|
-
-
|
|
342
|
-
-
|
|
343
|
-
-
|
|
344
|
-
-
|
|
616
|
+
- **NPM Package:** https://www.npmjs.com/package/strapi-plugin-magic-mark
|
|
617
|
+
- **GitHub:** https://github.com/Schero94/Magicmark
|
|
618
|
+
- **Issues:** https://github.com/Schero94/Magicmark/issues
|
|
619
|
+
- **Changelog:** [CHANGELOG.md](./CHANGELOG.md)
|
|
345
620
|
|
|
346
621
|
---
|
|
347
622
|
|
|
348
623
|
## 📄 License
|
|
349
624
|
|
|
350
|
-
MIT License -
|
|
625
|
+
**MIT License** - Free for personal & commercial use
|
|
351
626
|
|
|
352
627
|
**Copyright (c) 2025 Schero D.**
|
|
353
628
|
|
|
629
|
+
See [LICENSE](./LICENSE) for full terms
|
|
630
|
+
|
|
354
631
|
---
|
|
355
632
|
|
|
356
|
-
##
|
|
633
|
+
## 🌐 Supported Languages
|
|
357
634
|
|
|
358
|
-
- **
|
|
359
|
-
- **
|
|
360
|
-
- **
|
|
361
|
-
- **
|
|
635
|
+
- 🇬🇧 **English** - Global standard
|
|
636
|
+
- 🇩🇪 **Deutsch** - German (DACH region)
|
|
637
|
+
- 🇫🇷 **Français** - French
|
|
638
|
+
- 🇪🇸 **Español** - Spanish (Spain & Latin America)
|
|
639
|
+
- 🇵🇹 **Português** - Portuguese (Brazil & Portugal)
|
|
640
|
+
|
|
641
|
+
Language automatically follows your Strapi admin interface setting.
|
|
362
642
|
|
|
363
643
|
---
|
|
364
644
|
|
|
@@ -373,5 +653,4 @@ Special thanks to:
|
|
|
373
653
|
|
|
374
654
|
---
|
|
375
655
|
|
|
376
|
-
**Made with 🔖 by
|
|
377
|
-
# MagicMark - v1.2.0 ready
|
|
656
|
+
**Made with 🔖 by Schero D.**
|