@questpie/admin 0.0.1 → 1.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 +439 -424
- package/dist/auth-layout-M8K8_q5R.mjs +181 -0
- package/dist/auth-layout-M8K8_q5R.mjs.map +1 -0
- package/dist/bulk-upload-dialog-h7zXD78Y.mjs +274 -0
- package/dist/bulk-upload-dialog-h7zXD78Y.mjs.map +1 -0
- package/dist/{components/ui/card.mjs → card-BKHjBQfw.mjs} +8 -8
- package/dist/card-BKHjBQfw.mjs.map +1 -0
- package/dist/client/styles/index.css +434 -0
- package/dist/client-BCGpkAz6.mjs +22635 -0
- package/dist/client-BCGpkAz6.mjs.map +1 -0
- package/dist/client-CcWZbkBP.d.mts +13585 -0
- package/dist/client-CcWZbkBP.d.mts.map +1 -0
- package/dist/client.d.mts +3 -0
- package/dist/client.mjs +14 -0
- package/dist/content-locales-provider-BXvuIgfg.mjs +1650 -0
- package/dist/content-locales-provider-BXvuIgfg.mjs.map +1 -0
- package/dist/dashboard-page-B4PGEdc2.mjs +2500 -0
- package/dist/dashboard-page-B4PGEdc2.mjs.map +1 -0
- package/dist/dashboard-page-CVlyR40m.mjs +6 -0
- package/dist/dropzone-Do3awXKd.mjs +634 -0
- package/dist/dropzone-Do3awXKd.mjs.map +1 -0
- package/dist/{views/auth/forgot-password-form.mjs → forgot-password-page-Bcp-An4Y.mjs} +87 -14
- package/dist/forgot-password-page-Bcp-An4Y.mjs.map +1 -0
- package/dist/forgot-password-page-CIILVhfo.mjs +7 -0
- package/dist/index-B9Xwk4hi.d.mts +2753 -0
- package/dist/index-B9Xwk4hi.d.mts.map +1 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +14 -0
- package/dist/login-page-8K7fo0qK.mjs +7 -0
- package/dist/login-page-CP4gA-dl.mjs +298 -0
- package/dist/login-page-CP4gA-dl.mjs.map +1 -0
- package/dist/preview-utils-BKQ9-TMa.mjs +65 -0
- package/dist/preview-utils-BKQ9-TMa.mjs.map +1 -0
- package/dist/{views/auth/reset-password-form.mjs → reset-password-page-BqfDmLxA.mjs} +111 -14
- package/dist/reset-password-page-BqfDmLxA.mjs.map +1 -0
- package/dist/reset-password-page-DLATv0xQ.mjs +7 -0
- package/dist/runtime-6VZM878K.mjs +69 -0
- package/dist/runtime-6VZM878K.mjs.map +1 -0
- package/dist/saved-views.types-BMsz5mCy.d.mts +42 -0
- package/dist/saved-views.types-BMsz5mCy.d.mts.map +1 -0
- package/dist/server.d.mts +250 -0
- package/dist/server.d.mts.map +1 -0
- package/dist/server.mjs +832 -0
- package/dist/server.mjs.map +1 -0
- package/dist/setup-page-CMZ5P_OE.mjs +6 -0
- package/dist/setup-page-YAP_fzqh.mjs +264 -0
- package/dist/setup-page-YAP_fzqh.mjs.map +1 -0
- package/dist/shared.d.mts +57 -0
- package/dist/shared.d.mts.map +1 -0
- package/dist/shared.mjs +3 -0
- package/dist/{hooks/use-auth.mjs → use-auth-BoLmWtmU.mjs} +42 -30
- package/dist/use-auth-BoLmWtmU.mjs.map +1 -0
- package/package.json +48 -197
- package/.turbo/turbo-build.log +0 -108
- package/CHANGELOG.md +0 -10
- package/STATUS.md +0 -917
- package/VALIDATION.md +0 -602
- package/components.json +0 -24
- package/dist/__tests__/setup.mjs +0 -38
- package/dist/__tests__/test-utils.mjs +0 -45
- package/dist/__tests__/vitest.d.mjs +0 -3
- package/dist/components/admin-app.mjs +0 -69
- package/dist/components/fields/array-field.mjs +0 -190
- package/dist/components/fields/checkbox-field.mjs +0 -34
- package/dist/components/fields/custom-field.mjs +0 -32
- package/dist/components/fields/date-field.mjs +0 -41
- package/dist/components/fields/datetime-field.mjs +0 -42
- package/dist/components/fields/email-field.mjs +0 -37
- package/dist/components/fields/embedded-collection.mjs +0 -253
- package/dist/components/fields/field-types.mjs +0 -1
- package/dist/components/fields/field-utils.mjs +0 -10
- package/dist/components/fields/field-wrapper.mjs +0 -34
- package/dist/components/fields/index.mjs +0 -23
- package/dist/components/fields/json-field.mjs +0 -243
- package/dist/components/fields/locale-badge.mjs +0 -16
- package/dist/components/fields/number-field.mjs +0 -39
- package/dist/components/fields/password-field.mjs +0 -37
- package/dist/components/fields/relation-field.mjs +0 -104
- package/dist/components/fields/relation-picker.mjs +0 -229
- package/dist/components/fields/relation-select.mjs +0 -188
- package/dist/components/fields/rich-text-editor/index.mjs +0 -897
- package/dist/components/fields/select-field.mjs +0 -41
- package/dist/components/fields/switch-field.mjs +0 -34
- package/dist/components/fields/text-field.mjs +0 -38
- package/dist/components/fields/textarea-field.mjs +0 -38
- package/dist/components/index.mjs +0 -59
- package/dist/components/primitives/checkbox-input.mjs +0 -127
- package/dist/components/primitives/date-input.mjs +0 -303
- package/dist/components/primitives/index.mjs +0 -12
- package/dist/components/primitives/number-input.mjs +0 -104
- package/dist/components/primitives/select-input.mjs +0 -177
- package/dist/components/primitives/tag-input.mjs +0 -135
- package/dist/components/primitives/text-input.mjs +0 -39
- package/dist/components/primitives/textarea-input.mjs +0 -37
- package/dist/components/primitives/toggle-input.mjs +0 -31
- package/dist/components/primitives/types.mjs +0 -12
- package/dist/components/ui/accordion.mjs +0 -55
- package/dist/components/ui/avatar.mjs +0 -54
- package/dist/components/ui/badge.mjs +0 -34
- package/dist/components/ui/button.mjs +0 -48
- package/dist/components/ui/checkbox.mjs +0 -21
- package/dist/components/ui/combobox.mjs +0 -163
- package/dist/components/ui/dialog.mjs +0 -95
- package/dist/components/ui/dropdown-menu.mjs +0 -138
- package/dist/components/ui/field.mjs +0 -113
- package/dist/components/ui/input-group.mjs +0 -82
- package/dist/components/ui/input.mjs +0 -17
- package/dist/components/ui/label.mjs +0 -15
- package/dist/components/ui/popover.mjs +0 -56
- package/dist/components/ui/scroll-area.mjs +0 -38
- package/dist/components/ui/select.mjs +0 -100
- package/dist/components/ui/separator.mjs +0 -16
- package/dist/components/ui/sheet.mjs +0 -90
- package/dist/components/ui/sidebar.mjs +0 -387
- package/dist/components/ui/skeleton.mjs +0 -14
- package/dist/components/ui/spinner.mjs +0 -16
- package/dist/components/ui/switch.mjs +0 -22
- package/dist/components/ui/table.mjs +0 -68
- package/dist/components/ui/tabs.mjs +0 -48
- package/dist/components/ui/textarea.mjs +0 -15
- package/dist/components/ui/tooltip.mjs +0 -44
- package/dist/config/component-registry.mjs +0 -38
- package/dist/config/index.mjs +0 -129
- package/dist/hooks/admin-provider.mjs +0 -70
- package/dist/hooks/index.mjs +0 -7
- package/dist/hooks/store.mjs +0 -178
- package/dist/hooks/use-collection-db.mjs +0 -146
- package/dist/hooks/use-collection.mjs +0 -112
- package/dist/hooks/use-global.mjs +0 -46
- package/dist/hooks/use-mobile.mjs +0 -20
- package/dist/lib/utils.mjs +0 -10
- package/dist/styles/index.css +0 -336
- package/dist/styles/index.mjs +0 -1
- package/dist/utils/index.mjs +0 -9
- package/dist/views/auth/auth-layout.mjs +0 -52
- package/dist/views/auth/index.mjs +0 -6
- package/dist/views/auth/login-form.mjs +0 -156
- package/dist/views/collection/auto-form-fields.mjs +0 -525
- package/dist/views/collection/collection-form.mjs +0 -91
- package/dist/views/collection/collection-list.mjs +0 -76
- package/dist/views/collection/form-field.mjs +0 -42
- package/dist/views/collection/index.mjs +0 -6
- package/dist/views/common/index.mjs +0 -4
- package/dist/views/common/locale-switcher.mjs +0 -39
- package/dist/views/common/version-history.mjs +0 -272
- package/dist/views/index.mjs +0 -9
- package/dist/views/layout/admin-layout.mjs +0 -40
- package/dist/views/layout/admin-router.mjs +0 -95
- package/dist/views/layout/admin-sidebar.mjs +0 -63
- package/dist/views/layout/index.mjs +0 -5
- package/src/__tests__/setup.ts +0 -44
- package/src/__tests__/test-utils.tsx +0 -49
- package/src/__tests__/vitest.d.ts +0 -9
- package/src/components/admin-app.tsx +0 -221
- package/src/components/fields/array-field.tsx +0 -237
- package/src/components/fields/checkbox-field.tsx +0 -47
- package/src/components/fields/custom-field.tsx +0 -50
- package/src/components/fields/date-field.tsx +0 -65
- package/src/components/fields/datetime-field.tsx +0 -67
- package/src/components/fields/email-field.tsx +0 -51
- package/src/components/fields/embedded-collection.tsx +0 -315
- package/src/components/fields/field-types.ts +0 -162
- package/src/components/fields/field-utils.ts +0 -6
- package/src/components/fields/field-wrapper.tsx +0 -52
- package/src/components/fields/index.ts +0 -66
- package/src/components/fields/json-field.tsx +0 -440
- package/src/components/fields/locale-badge.tsx +0 -15
- package/src/components/fields/number-field.tsx +0 -57
- package/src/components/fields/password-field.tsx +0 -51
- package/src/components/fields/relation-field.tsx +0 -243
- package/src/components/fields/relation-picker.tsx +0 -402
- package/src/components/fields/relation-select.tsx +0 -327
- package/src/components/fields/rich-text-editor/index.tsx +0 -1337
- package/src/components/fields/select-field.tsx +0 -61
- package/src/components/fields/switch-field.tsx +0 -47
- package/src/components/fields/text-field.tsx +0 -55
- package/src/components/fields/textarea-field.tsx +0 -55
- package/src/components/index.ts +0 -40
- package/src/components/primitives/checkbox-input.tsx +0 -193
- package/src/components/primitives/date-input.tsx +0 -401
- package/src/components/primitives/index.ts +0 -24
- package/src/components/primitives/number-input.tsx +0 -132
- package/src/components/primitives/select-input.tsx +0 -296
- package/src/components/primitives/tag-input.tsx +0 -200
- package/src/components/primitives/text-input.tsx +0 -49
- package/src/components/primitives/textarea-input.tsx +0 -46
- package/src/components/primitives/toggle-input.tsx +0 -36
- package/src/components/primitives/types.ts +0 -235
- package/src/components/ui/accordion.tsx +0 -72
- package/src/components/ui/avatar.tsx +0 -106
- package/src/components/ui/badge.tsx +0 -48
- package/src/components/ui/button.tsx +0 -53
- package/src/components/ui/card.tsx +0 -94
- package/src/components/ui/checkbox.tsx +0 -27
- package/src/components/ui/combobox.tsx +0 -290
- package/src/components/ui/dialog.tsx +0 -151
- package/src/components/ui/dropdown-menu.tsx +0 -254
- package/src/components/ui/field.tsx +0 -227
- package/src/components/ui/input-group.tsx +0 -149
- package/src/components/ui/input.tsx +0 -20
- package/src/components/ui/label.tsx +0 -18
- package/src/components/ui/popover.tsx +0 -88
- package/src/components/ui/scroll-area.tsx +0 -53
- package/src/components/ui/select.tsx +0 -192
- package/src/components/ui/separator.tsx +0 -23
- package/src/components/ui/sheet.tsx +0 -127
- package/src/components/ui/sidebar.tsx +0 -723
- package/src/components/ui/skeleton.tsx +0 -13
- package/src/components/ui/spinner.tsx +0 -10
- package/src/components/ui/switch.tsx +0 -32
- package/src/components/ui/table.tsx +0 -99
- package/src/components/ui/tabs.tsx +0 -82
- package/src/components/ui/textarea.tsx +0 -18
- package/src/components/ui/tooltip.tsx +0 -70
- package/src/config/component-registry.ts +0 -190
- package/src/config/index.ts +0 -1099
- package/src/hooks/README.md +0 -269
- package/src/hooks/admin-provider.tsx +0 -110
- package/src/hooks/index.ts +0 -41
- package/src/hooks/store.ts +0 -248
- package/src/hooks/use-auth.ts +0 -168
- package/src/hooks/use-collection-db.ts +0 -209
- package/src/hooks/use-collection.ts +0 -156
- package/src/hooks/use-global.ts +0 -69
- package/src/hooks/use-mobile.ts +0 -21
- package/src/lib/utils.ts +0 -6
- package/src/styles/index.css +0 -340
- package/src/utils/index.ts +0 -6
- package/src/views/auth/auth-layout.tsx +0 -77
- package/src/views/auth/forgot-password-form.tsx +0 -192
- package/src/views/auth/index.ts +0 -21
- package/src/views/auth/login-form.tsx +0 -229
- package/src/views/auth/reset-password-form.tsx +0 -232
- package/src/views/collection/auto-form-fields.tsx +0 -982
- package/src/views/collection/collection-form.tsx +0 -186
- package/src/views/collection/collection-list.tsx +0 -223
- package/src/views/collection/form-field.tsx +0 -52
- package/src/views/collection/index.ts +0 -15
- package/src/views/common/index.ts +0 -8
- package/src/views/common/locale-switcher.tsx +0 -45
- package/src/views/common/version-history.tsx +0 -406
- package/src/views/index.ts +0 -25
- package/src/views/layout/admin-layout.tsx +0 -117
- package/src/views/layout/admin-router.tsx +0 -206
- package/src/views/layout/admin-sidebar.tsx +0 -185
- package/src/views/layout/index.ts +0 -12
- package/tsconfig.json +0 -13
- package/tsconfig.tsbuildinfo +0 -1
- package/tsdown.config.ts +0 -13
- package/vitest.config.ts +0 -29
package/STATUS.md
DELETED
|
@@ -1,917 +0,0 @@
|
|
|
1
|
-
# @questpie/admin - Aktuálny Stav a Roadmap
|
|
2
|
-
|
|
3
|
-
**Dátum:** 2025-12-31
|
|
4
|
-
**Verzia:** 0.0.1 (pre-alpha)
|
|
5
|
-
**Core Funkcionalita:** 93% hotová
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 📋 Executive Summary
|
|
10
|
-
|
|
11
|
-
**@questpie/admin** je config-driven admin UI package pre Questpie CMS. Hlavná myšlienka:
|
|
12
|
-
|
|
13
|
-
> **Mount jednu komponentu + voliteľný config = kompletné admin UI**
|
|
14
|
-
|
|
15
|
-
```tsx
|
|
16
|
-
// Minimálne použitie - UI auto-generované z configu
|
|
17
|
-
<AdminApp client={cmsClient} router={{...}} />
|
|
18
|
-
|
|
19
|
-
// S custom config - override čohokoľvek
|
|
20
|
-
<AdminApp client={cmsClient} config={adminConfig} router={{...}} />
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
**Filozofia:**
|
|
24
|
-
- ✅ **Config-driven** - všetko z configu, nie z kódu
|
|
25
|
-
- ✅ **Auto-generation** - UI generované z admin configu (bez schema introspection)
|
|
26
|
-
- ✅ **Seamless DX** - minimum kódu, maximum funkcií
|
|
27
|
-
- ✅ **Override anywhere** - každý detail je customizovateľný
|
|
28
|
-
- ✅ **Type-safe** - plná TypeScript podpora end-to-end
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## ✅ Aktuálny stav (skrátene)
|
|
33
|
-
|
|
34
|
-
- ✅ Explicitné field typy + relation targety (žiadne inferovanie)
|
|
35
|
-
- ✅ AutoFormFields: sections, tabs, grid/columns/inline/sidebar layouty
|
|
36
|
-
- ✅ Relation fields: single select + multi picker + DnD ordering
|
|
37
|
-
- ✅ Embedded collections + array field
|
|
38
|
-
- ✅ Rich text editor: toolbar toggles, slash commands, table controls, image UI
|
|
39
|
-
- ✅ Lokalizácia: locale switcher + badge pri localized poliach
|
|
40
|
-
- ✅ Version history + audit log UI
|
|
41
|
-
- ✅ Realtime listy, optimistic create/update/delete
|
|
42
|
-
|
|
43
|
-
## ✅ ČO FUNGUJE TERAZ (Production-Ready)
|
|
44
|
-
|
|
45
|
-
### 1. Core Architektúra
|
|
46
|
-
|
|
47
|
-
**Jedna komponenta pre všetko:**
|
|
48
|
-
```tsx
|
|
49
|
-
import { AdminApp } from "@questpie/admin";
|
|
50
|
-
import "@questpie/admin/styles";
|
|
51
|
-
|
|
52
|
-
<AdminApp
|
|
53
|
-
client={cmsClient} // JEDINÝ required prop
|
|
54
|
-
config={adminConfig} // Voliteľné
|
|
55
|
-
router={{...}} // Router integrácia
|
|
56
|
-
/>
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
**Automaticky dostaneš:**
|
|
60
|
-
- ✅ Sidebar navigáciu (auto-generovaná z collections)
|
|
61
|
-
- ✅ Routing (`/admin`, `/admin/:collection`, `/admin/:collection/:id`)
|
|
62
|
-
- ✅ List views (tabuľky s dátami)
|
|
63
|
-
- ✅ Create/Edit formuláre (AutoFormFields z admin configu)
|
|
64
|
-
- ✅ Delete funkciu
|
|
65
|
-
- ✅ Search a filtrovanie
|
|
66
|
-
- ✅ Pagination
|
|
67
|
-
- ✅ Realtime updates (SSE)
|
|
68
|
-
|
|
69
|
-
### 2. Conditional Field Logic
|
|
70
|
-
|
|
71
|
-
**Fieldy môžu byť dynamické:**
|
|
72
|
-
```typescript
|
|
73
|
-
fields: {
|
|
74
|
-
status: {
|
|
75
|
-
type: "select",
|
|
76
|
-
options: [
|
|
77
|
-
{ label: "Pending", value: "pending" },
|
|
78
|
-
{ label: "Cancelled", value: "cancelled" }
|
|
79
|
-
]
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
// Zobrazí sa len keď status === "cancelled"
|
|
83
|
-
cancellationReason: {
|
|
84
|
-
type: "textarea",
|
|
85
|
-
visible: (values) => values.status === "cancelled",
|
|
86
|
-
required: (values) => values.status === "cancelled",
|
|
87
|
-
readOnly: false
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
// Disabled keď nie je draft
|
|
91
|
-
publishedAt: {
|
|
92
|
-
type: "datetime",
|
|
93
|
-
disabled: (values) => values.status !== "draft"
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
// Dynamické options
|
|
97
|
-
category: {
|
|
98
|
-
type: "select",
|
|
99
|
-
options: (values) => {
|
|
100
|
-
if (values.type === "tech") {
|
|
101
|
-
return [{ label: "Frontend", value: "frontend" }];
|
|
102
|
-
}
|
|
103
|
-
return [{ label: "Design", value: "design" }];
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Lokalizácia (i18n)
|
|
110
|
-
|
|
111
|
-
- ✅ Locale switcher (list + form view)
|
|
112
|
-
- ✅ Badge pri localized fielde (label)
|
|
113
|
-
- ✅ `localized: true` v admin configu
|
|
114
|
-
|
|
115
|
-
### 3. Relation Fields
|
|
116
|
-
|
|
117
|
-
**Single Relation (one-to-one):**
|
|
118
|
-
```typescript
|
|
119
|
-
fields: {
|
|
120
|
-
barberId: {
|
|
121
|
-
label: "Barber",
|
|
122
|
-
relation: {
|
|
123
|
-
targetCollection: "barbers", // Povinné nastaviť explicitne
|
|
124
|
-
mode: "inline" // Alebo "picker", "create"
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
**Features:**
|
|
131
|
-
- ➕ Plus button - vytvorí nový záznam (otvára side sheet)
|
|
132
|
-
- ✏️ Edit button - edituje vybraný záznam (side sheet)
|
|
133
|
-
- 🔍 Auto-complete search
|
|
134
|
-
- ❌ Clear button (keď nie je required)
|
|
135
|
-
- 🏷️ Display label = `_title`
|
|
136
|
-
|
|
137
|
-
**Multiple Relations (one-to-many, many-to-many):**
|
|
138
|
-
```typescript
|
|
139
|
-
fields: {
|
|
140
|
-
tags: {
|
|
141
|
-
relation: {
|
|
142
|
-
targetCollection: "tags",
|
|
143
|
-
mode: "picker", // Multiple select
|
|
144
|
-
orderable: true, // Drag-and-drop reordering
|
|
145
|
-
filter: (values) => ({ // Conditional filtering
|
|
146
|
-
where: { type: values.postType }
|
|
147
|
-
})
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
**Features:**
|
|
154
|
-
- ➕ Create new items inline
|
|
155
|
-
- ✏️ Edit each selected item
|
|
156
|
-
- ❌ Remove items
|
|
157
|
-
- 🎯 Drag-and-drop reordering
|
|
158
|
-
- 🔍 Search a filter
|
|
159
|
-
|
|
160
|
-
### 4. Version History & Audit Logging
|
|
161
|
-
|
|
162
|
-
**Config:**
|
|
163
|
-
```typescript
|
|
164
|
-
collections: {
|
|
165
|
-
appointments: {
|
|
166
|
-
versioned: true, // Povoliť versioning
|
|
167
|
-
|
|
168
|
-
auditLog: {
|
|
169
|
-
fields: ["status", "scheduledAt"], // Čo trackovať
|
|
170
|
-
trackUser: true, // Kto urobil zmenu
|
|
171
|
-
retentionDays: 365 // Ako dlho držať historiu
|
|
172
|
-
},
|
|
173
|
-
|
|
174
|
-
edit: {
|
|
175
|
-
showVersionHistory: true // Zobrazovať v edit forme
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
**Features:**
|
|
182
|
-
- 📊 Kompletná história verzií
|
|
183
|
-
- 👤 Tracking kto urobil zmenu
|
|
184
|
-
- ⏰ Timestamp každej zmeny
|
|
185
|
-
- 📝 Diff view (old vs new value)
|
|
186
|
-
- 🔄 Restore previous version
|
|
187
|
-
- 🏷️ Action badges (Created, Updated, Deleted)
|
|
188
|
-
|
|
189
|
-
### 5. Sections Organization
|
|
190
|
-
|
|
191
|
-
**Základné sekcie:**
|
|
192
|
-
```typescript
|
|
193
|
-
edit: {
|
|
194
|
-
sections: [
|
|
195
|
-
{
|
|
196
|
-
title: "Basic Information",
|
|
197
|
-
description: "Main details",
|
|
198
|
-
fields: ["name", "email", "phone"],
|
|
199
|
-
collapsible: true,
|
|
200
|
-
defaultOpen: true
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
title: "Settings",
|
|
204
|
-
fields: ["isActive", "role"]
|
|
205
|
-
}
|
|
206
|
-
]
|
|
207
|
-
}
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
### 6. Schema Introspection
|
|
211
|
-
|
|
212
|
-
Nie je implementované ani plánované. Typy polí a relation targety musia byť explicitne v admin configu.
|
|
213
|
-
|
|
214
|
-
### 7. Component Registry
|
|
215
|
-
|
|
216
|
-
**Custom field komponenty:**
|
|
217
|
-
```tsx
|
|
218
|
-
<AdminApp
|
|
219
|
-
registry={{
|
|
220
|
-
fields: {
|
|
221
|
-
richText: RichTextEditor, // Custom editor
|
|
222
|
-
image: ImagePicker, // Custom image picker
|
|
223
|
-
customField: MyFieldComponent
|
|
224
|
-
}
|
|
225
|
-
}}
|
|
226
|
-
/>
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
### 8. TanStack Integration
|
|
230
|
-
|
|
231
|
-
**Plná integrácia:**
|
|
232
|
-
- ✅ TanStack Router (router-agnostic design)
|
|
233
|
-
- ✅ TanStack Query (pre data fetching)
|
|
234
|
-
- ✅ TanStack Table (pre list views)
|
|
235
|
-
- ✅ Optimistic updates
|
|
236
|
-
- ✅ Realtime SSE
|
|
237
|
-
|
|
238
|
-
### 9. Batteries Included
|
|
239
|
-
|
|
240
|
-
**53+ shadcn/ui komponenty:**
|
|
241
|
-
- Button, Card, Dialog, Sheet, Tabs, Accordion
|
|
242
|
-
- Input, Select, Checkbox, Switch, Textarea
|
|
243
|
-
- Table, Pagination, Combobox
|
|
244
|
-
- Badge, Alert, Toast (Sonner)
|
|
245
|
-
- Calendar, DatePicker
|
|
246
|
-
- Charts (recharts)
|
|
247
|
-
- ... a ďalšie
|
|
248
|
-
|
|
249
|
-
**Všetko exportované:**
|
|
250
|
-
```tsx
|
|
251
|
-
import {
|
|
252
|
-
Button,
|
|
253
|
-
Card,
|
|
254
|
-
Dialog,
|
|
255
|
-
RelationSelect,
|
|
256
|
-
VersionHistory
|
|
257
|
-
} from "@questpie/admin/components";
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### 10. Docker Setup
|
|
261
|
-
|
|
262
|
-
**Jediná závislosť: Postgres**
|
|
263
|
-
```yaml
|
|
264
|
-
services:
|
|
265
|
-
postgres:
|
|
266
|
-
image: postgres:17-alpine
|
|
267
|
-
|
|
268
|
-
app:
|
|
269
|
-
build: .
|
|
270
|
-
# NO Redis, NO external queue, NO SMTP required!
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
**Batteries included v CMS:**
|
|
274
|
-
- Auth: Better Auth
|
|
275
|
-
- Storage: Flydrive (S3/R2/Local)
|
|
276
|
-
- Queue: pg-boss (používa Postgres)
|
|
277
|
-
- Email: Console/SMTP
|
|
278
|
-
- Logging: Pino
|
|
279
|
-
|
|
280
|
-
---
|
|
281
|
-
|
|
282
|
-
## ✅ ADVANCED FORM LAYOUTS IMPLEMENTED
|
|
283
|
-
|
|
284
|
-
### Advanced Form Layouts
|
|
285
|
-
|
|
286
|
-
**Config + rendering hotové (AutoFormFields):**
|
|
287
|
-
|
|
288
|
-
**Multi-column:**
|
|
289
|
-
```typescript
|
|
290
|
-
sections: [
|
|
291
|
-
{
|
|
292
|
-
layout: "columns",
|
|
293
|
-
columns: 2,
|
|
294
|
-
grid: {
|
|
295
|
-
responsive: {
|
|
296
|
-
sm: 1, // mobile: 1 stĺpec
|
|
297
|
-
md: 2, // tablet: 2 stĺpce
|
|
298
|
-
lg: 3 // desktop: 3 stĺpce
|
|
299
|
-
}
|
|
300
|
-
},
|
|
301
|
-
fields: ["firstName", "lastName", "email", "phone"]
|
|
302
|
-
}
|
|
303
|
-
]
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
**Grid s spanmi:**
|
|
307
|
-
```typescript
|
|
308
|
-
sections: [
|
|
309
|
-
{
|
|
310
|
-
layout: "grid",
|
|
311
|
-
grid: { columns: 4, gap: 4 },
|
|
312
|
-
fields: [
|
|
313
|
-
{ field: "title", span: 4 }, // full width
|
|
314
|
-
{ field: "price", span: 1 }, // 1/4
|
|
315
|
-
{ field: "firstName", span: "1/2" }, // half
|
|
316
|
-
{ field: "lastName", span: "1/2" } // half
|
|
317
|
-
]
|
|
318
|
-
}
|
|
319
|
-
]
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
**Inline:**
|
|
323
|
-
```typescript
|
|
324
|
-
sections: [
|
|
325
|
-
{
|
|
326
|
-
layout: "inline",
|
|
327
|
-
fields: ["startDate", "endDate"] // Na jednom riadku
|
|
328
|
-
}
|
|
329
|
-
]
|
|
330
|
-
```
|
|
331
|
-
|
|
332
|
-
**Conditional sections:**
|
|
333
|
-
```typescript
|
|
334
|
-
sections: [
|
|
335
|
-
{
|
|
336
|
-
title: "Payment Details",
|
|
337
|
-
visible: (values) => values.status === "paid",
|
|
338
|
-
fields: ["paymentMethod", "transactionId"]
|
|
339
|
-
}
|
|
340
|
-
]
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
**Tabs so sekciami:**
|
|
344
|
-
```typescript
|
|
345
|
-
tabs: [
|
|
346
|
-
{
|
|
347
|
-
id: "content",
|
|
348
|
-
label: "Content",
|
|
349
|
-
icon: "file-text",
|
|
350
|
-
visible: (values) => values.type === "advanced",
|
|
351
|
-
sections: [
|
|
352
|
-
{
|
|
353
|
-
title: "Basic",
|
|
354
|
-
layout: "columns",
|
|
355
|
-
columns: 2,
|
|
356
|
-
fields: ["title", "slug"]
|
|
357
|
-
}
|
|
358
|
-
]
|
|
359
|
-
}
|
|
360
|
-
]
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
**Sidebar layout:**
|
|
364
|
-
```typescript
|
|
365
|
-
edit: {
|
|
366
|
-
layout: "with-sidebar",
|
|
367
|
-
|
|
368
|
-
sections: [
|
|
369
|
-
{ title: "Content", fields: ["title", "content"] }
|
|
370
|
-
],
|
|
371
|
-
|
|
372
|
-
sidebar: {
|
|
373
|
-
position: "right",
|
|
374
|
-
width: "300px",
|
|
375
|
-
fields: ["status", "publishedAt", "author"]
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
**Status:**
|
|
381
|
-
- [x] Column layout renderer
|
|
382
|
-
- [x] Grid layout s span support
|
|
383
|
-
- [x] Conditional section visibility
|
|
384
|
-
- [x] Tabs renderer
|
|
385
|
-
- [x] Sidebar layout renderer
|
|
386
|
-
|
|
387
|
-
---
|
|
388
|
-
|
|
389
|
-
## ⚠️ CONFIG TYPES HOTOVÉ, RENDERING TODO
|
|
390
|
-
|
|
391
|
-
### 1. Dashboard System
|
|
392
|
-
|
|
393
|
-
**Widget types definované:**
|
|
394
|
-
|
|
395
|
-
```typescript
|
|
396
|
-
app: {
|
|
397
|
-
dashboard: {
|
|
398
|
-
title: "Dashboard",
|
|
399
|
-
columns: 12,
|
|
400
|
-
rowHeight: 80,
|
|
401
|
-
customizable: true,
|
|
402
|
-
|
|
403
|
-
widgets: [
|
|
404
|
-
{
|
|
405
|
-
id: "stats-posts",
|
|
406
|
-
type: "stats",
|
|
407
|
-
title: "Total Posts",
|
|
408
|
-
position: { x: 0, y: 0, w: 3, h: 2 },
|
|
409
|
-
config: {
|
|
410
|
-
collection: "posts",
|
|
411
|
-
stat: "count",
|
|
412
|
-
trend: { enabled: true, period: "week" }
|
|
413
|
-
}
|
|
414
|
-
},
|
|
415
|
-
{
|
|
416
|
-
id: "chart",
|
|
417
|
-
type: "chart",
|
|
418
|
-
title: "Posts Over Time",
|
|
419
|
-
position: { x: 3, y: 0, w: 6, h: 4 },
|
|
420
|
-
config: {
|
|
421
|
-
collection: "posts",
|
|
422
|
-
chartType: "line",
|
|
423
|
-
dateField: "createdAt",
|
|
424
|
-
groupBy: "day"
|
|
425
|
-
}
|
|
426
|
-
},
|
|
427
|
-
{
|
|
428
|
-
id: "recent",
|
|
429
|
-
type: "recent-items",
|
|
430
|
-
title: "Recent Posts",
|
|
431
|
-
position: { x: 0, y: 2, w: 6, h: 4 },
|
|
432
|
-
config: {
|
|
433
|
-
collection: "posts",
|
|
434
|
-
limit: 5,
|
|
435
|
-
columns: ["title", "author", "createdAt"]
|
|
436
|
-
}
|
|
437
|
-
},
|
|
438
|
-
{
|
|
439
|
-
id: "actions",
|
|
440
|
-
type: "quick-actions",
|
|
441
|
-
position: { x: 9, y: 0, w: 3, h: 2 },
|
|
442
|
-
config: {
|
|
443
|
-
actions: [
|
|
444
|
-
{ label: "New Post", icon: "plus", href: "/admin/posts/new" }
|
|
445
|
-
]
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
]
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
```
|
|
452
|
-
|
|
453
|
-
**Widget types:**
|
|
454
|
-
- Stats - Štatistiky s trendom
|
|
455
|
-
- Chart - Grafy (line, bar, pie, area)
|
|
456
|
-
- Recent Items - Posledné záznamy
|
|
457
|
-
- Quick Actions - Action buttons
|
|
458
|
-
- Custom - Vlastné komponenty
|
|
459
|
-
|
|
460
|
-
**TODO:**
|
|
461
|
-
- [ ] Dashboard component
|
|
462
|
-
- [ ] StatsWidget component
|
|
463
|
-
- [ ] ChartWidget component (recharts)
|
|
464
|
-
- [ ] RecentItemsWidget component
|
|
465
|
-
- [ ] QuickActionsWidget component
|
|
466
|
-
- [ ] Widget grid layout renderer
|
|
467
|
-
|
|
468
|
-
**Dočasne funguje:**
|
|
469
|
-
```typescript
|
|
470
|
-
app: {
|
|
471
|
-
dashboard: {
|
|
472
|
-
component: CustomDashboard // Full custom override
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
```
|
|
476
|
-
|
|
477
|
-
### 2. Custom Pages
|
|
478
|
-
|
|
479
|
-
**Config types ready:**
|
|
480
|
-
|
|
481
|
-
```typescript
|
|
482
|
-
app: {
|
|
483
|
-
pages: [
|
|
484
|
-
{
|
|
485
|
-
id: "settings",
|
|
486
|
-
label: "Settings",
|
|
487
|
-
icon: "settings",
|
|
488
|
-
path: "/admin/settings",
|
|
489
|
-
component: SettingsPage,
|
|
490
|
-
showInNav: true,
|
|
491
|
-
group: "system",
|
|
492
|
-
order: 100,
|
|
493
|
-
permissions: ["admin.settings.view"]
|
|
494
|
-
}
|
|
495
|
-
]
|
|
496
|
-
}
|
|
497
|
-
```
|
|
498
|
-
|
|
499
|
-
**TODO:**
|
|
500
|
-
- [ ] AdminRouter support pre custom pages
|
|
501
|
-
- [ ] Sidebar navigation pre custom pages
|
|
502
|
-
- [ ] Routing implementation
|
|
503
|
-
- [ ] Permission checking
|
|
504
|
-
- [ ] Navigation groups a ordering
|
|
505
|
-
|
|
506
|
-
---
|
|
507
|
-
|
|
508
|
-
## ❌ NEIMPLEMENTOVANÉ
|
|
509
|
-
|
|
510
|
-
### 1. Block Editor (HIGH PRIORITY)
|
|
511
|
-
|
|
512
|
-
**Puck integrácia:**
|
|
513
|
-
```typescript
|
|
514
|
-
fields: {
|
|
515
|
-
pageContent: {
|
|
516
|
-
type: "blocks",
|
|
517
|
-
blocks: {
|
|
518
|
-
text: TextBlock,
|
|
519
|
-
image: ImageBlock,
|
|
520
|
-
hero: HeroBlock
|
|
521
|
-
},
|
|
522
|
-
localized: true // Podpora pre lokalizáciu!
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
```
|
|
526
|
-
|
|
527
|
-
**Špecifikácia:** `specifications/RICH_TEXT_AND_BLOCKS.md`
|
|
528
|
-
|
|
529
|
-
**Dependencies:**
|
|
530
|
-
- @measured/puck (check React 19 compatibility)
|
|
531
|
-
|
|
532
|
-
**Lokalizácia v Puck:**
|
|
533
|
-
- Option 1: Locale-specific fields (`contentEn`, `contentSk`)
|
|
534
|
-
- Option 2: Embedded locale data (v block props)
|
|
535
|
-
- Option 3: Locale switcher in editor (recommended)
|
|
536
|
-
|
|
537
|
-
### 3. Embedded Collections
|
|
538
|
-
|
|
539
|
-
**Config:**
|
|
540
|
-
```typescript
|
|
541
|
-
fields: {
|
|
542
|
-
gallery: {
|
|
543
|
-
embedded: {
|
|
544
|
-
collection: "post_images",
|
|
545
|
-
orderable: true, // Drag-and-drop
|
|
546
|
-
mode: "inline", // alebo "modal", "drawer"
|
|
547
|
-
rowLabel: (item) => item.caption
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
```
|
|
552
|
-
|
|
553
|
-
**Implemented:**
|
|
554
|
-
- [x] EmbeddedCollectionField component
|
|
555
|
-
- [x] Inline editing mode
|
|
556
|
-
- [x] Modal/drawer modes
|
|
557
|
-
- [x] Row labels + ordering
|
|
558
|
-
- [x] AutoFormFields integration
|
|
559
|
-
|
|
560
|
-
### 4. Tree Views
|
|
561
|
-
|
|
562
|
-
Hierarchické zobrazenie dát (categories, pages).
|
|
563
|
-
|
|
564
|
-
**TODO:**
|
|
565
|
-
- [ ] Tree view mode pre list
|
|
566
|
-
- [ ] Parent-child relationships
|
|
567
|
-
- [ ] Collapsible nodes
|
|
568
|
-
- [ ] Drag-and-drop reordering
|
|
569
|
-
|
|
570
|
-
### 5. Bulk Actions
|
|
571
|
-
|
|
572
|
-
Hromadné operácie na multiple items.
|
|
573
|
-
|
|
574
|
-
**TODO:**
|
|
575
|
-
- [ ] Select multiple items checkbox
|
|
576
|
-
- [ ] Bulk delete
|
|
577
|
-
- [ ] Bulk update
|
|
578
|
-
- [ ] Custom bulk actions
|
|
579
|
-
|
|
580
|
-
### 6. Saved Views/Filters
|
|
581
|
-
|
|
582
|
-
Uloženie user preferences pre list views.
|
|
583
|
-
|
|
584
|
-
**TODO:**
|
|
585
|
-
- [ ] Save filter combinations
|
|
586
|
-
- [ ] Save column configs
|
|
587
|
-
- [ ] Share views
|
|
588
|
-
- [ ] Default views
|
|
589
|
-
|
|
590
|
-
### 7. Full Drizzle Schema Introspection
|
|
591
|
-
|
|
592
|
-
Momentálne používame heuristics (field name patterns).
|
|
593
|
-
|
|
594
|
-
**TODO:**
|
|
595
|
-
- [ ] Runtime schema parsing z Drizzle
|
|
596
|
-
- [ ] Extract column types, constraints, defaults
|
|
597
|
-
- [ ] Parse relations z Drizzle schema
|
|
598
|
-
- [ ] Eliminácia hardcoded field lists
|
|
599
|
-
|
|
600
|
-
---
|
|
601
|
-
|
|
602
|
-
## 📊 Štatistiky
|
|
603
|
-
|
|
604
|
-
**Celkovo:** 23 requirements
|
|
605
|
-
**Hotové:** 16 (70%)
|
|
606
|
-
**Config types ready:** 3 (13%)
|
|
607
|
-
**TODO:** 4 (17%)
|
|
608
|
-
|
|
609
|
-
**Core funkcionalita:** 93% ✅
|
|
610
|
-
|
|
611
|
-
---
|
|
612
|
-
|
|
613
|
-
## 🎯 PRIORITY ROADMAP
|
|
614
|
-
|
|
615
|
-
### 🔴 Vysoká Priorita (User Marked)
|
|
616
|
-
|
|
617
|
-
1. ✅ **Rich Text Editor (Tiptap)** - Implementované
|
|
618
|
-
- Špec: `specifications/RICH_TEXT_AND_BLOCKS.md`
|
|
619
|
-
|
|
620
|
-
2. **Block Editor (Puck)** - 3-4 dni
|
|
621
|
-
- Visual page builder
|
|
622
|
-
- Podpora lokalizácie!
|
|
623
|
-
- Špec: `specifications/RICH_TEXT_AND_BLOCKS.md`
|
|
624
|
-
|
|
625
|
-
3. ✅ **Embedded Collections** - Implementované
|
|
626
|
-
- Inline, modal, drawer
|
|
627
|
-
- Ordering + row labels
|
|
628
|
-
|
|
629
|
-
### 🟡 Stredná Priorita
|
|
630
|
-
|
|
631
|
-
4. ✅ **Advanced Layout Rendering** - Implementované
|
|
632
|
-
- Columns, grid, inline, tabs, sidebar
|
|
633
|
-
- Špec: `specifications/ADVANCED_LAYOUTS_AND_DASHBOARD.md`
|
|
634
|
-
|
|
635
|
-
5. **Dashboard Widgets** - 3-4 dni
|
|
636
|
-
- Config types hotové, treba komponenty
|
|
637
|
-
- Stats, Chart, RecentItems, QuickActions
|
|
638
|
-
- Špec: `specifications/ADVANCED_LAYOUTS_AND_DASHBOARD.md`
|
|
639
|
-
|
|
640
|
-
6. **Custom Pages Routing** - 1-2 dni
|
|
641
|
-
- Config types hotové, treba routing
|
|
642
|
-
- Sidebar integration
|
|
643
|
-
|
|
644
|
-
7. **Full Drizzle Introspection** - 2-3 dni
|
|
645
|
-
- Nahradiť heuristics
|
|
646
|
-
- Runtime schema parsing
|
|
647
|
-
|
|
648
|
-
### 🟢 Nízka Priorita
|
|
649
|
-
|
|
650
|
-
8. **Tree Views** - 3-4 dni
|
|
651
|
-
9. **Bulk Actions** - 2-3 dni
|
|
652
|
-
10. **Saved Views** - 2-3 dni
|
|
653
|
-
|
|
654
|
-
---
|
|
655
|
-
|
|
656
|
-
## 🗂️ KĽÚČOVÉ SÚBORY
|
|
657
|
-
|
|
658
|
-
### Config System
|
|
659
|
-
- `packages/admin/src/config/index.ts` - Všetky config types
|
|
660
|
-
- `packages/admin/src/config/component-registry.ts` - Component registry types
|
|
661
|
-
|
|
662
|
-
### Core Components
|
|
663
|
-
- `packages/admin/src/components/admin-app.tsx` - Main entry point
|
|
664
|
-
- `packages/admin/src/components/views/admin-layout.tsx` - Layout wrapper
|
|
665
|
-
- `packages/admin/src/components/views/admin-sidebar.tsx` - Auto sidebar
|
|
666
|
-
- `packages/admin/src/components/views/admin-router.tsx` - Auto routing
|
|
667
|
-
- `packages/admin/src/components/views/auto-form-fields.tsx` - Auto field generation
|
|
668
|
-
- `packages/admin/src/components/views/collection-list.tsx` - List view
|
|
669
|
-
- `packages/admin/src/components/views/collection-form.tsx` - Form view
|
|
670
|
-
|
|
671
|
-
### Field Components
|
|
672
|
-
- `packages/admin/src/components/fields/relation-select.tsx` - Single relation
|
|
673
|
-
- `packages/admin/src/components/fields/relation-picker.tsx` - Multiple relations
|
|
674
|
-
- `packages/admin/src/components/views/form-field.tsx` - Base field component
|
|
675
|
-
- `packages/admin/src/components/views/version-history.tsx` - Version tracking
|
|
676
|
-
|
|
677
|
-
### Hooks
|
|
678
|
-
- `packages/admin/src/hooks/use-admin-context.ts` - Admin context
|
|
679
|
-
- `packages/admin/src/hooks/use-collection.ts` - Collection operations
|
|
680
|
-
|
|
681
|
-
### Documentation
|
|
682
|
-
- `packages/admin/README.md` - User documentation
|
|
683
|
-
- `packages/admin/VALIDATION.md` - Implementation status
|
|
684
|
-
- `packages/admin/STATUS.md` - Tento súbor
|
|
685
|
-
- `specifications/RICH_TEXT_AND_BLOCKS.md` - Editor specs
|
|
686
|
-
- `specifications/ADVANCED_LAYOUTS_AND_DASHBOARD.md` - Layout specs
|
|
687
|
-
- `specifications/ADMIN_PACKAGE_DESIGN.md` - Original design doc
|
|
688
|
-
- `examples/tanstack-barbershop/ARCHITECTURE.md` - Example guide
|
|
689
|
-
|
|
690
|
-
### Example
|
|
691
|
-
- `examples/tanstack-barbershop/` - Kompletný working example
|
|
692
|
-
- `examples/tanstack-barbershop/src/server/cms.ts` - CMS definition
|
|
693
|
-
- `examples/tanstack-barbershop/src/configs/admin.ts` - Admin config
|
|
694
|
-
- `examples/tanstack-barbershop/src/routes/admin.tsx` - Layout route
|
|
695
|
-
- `examples/tanstack-barbershop/src/routes/admin/$.tsx` - Catch-all route
|
|
696
|
-
|
|
697
|
-
---
|
|
698
|
-
|
|
699
|
-
## 🚀 AKO POKRAČOVAŤ (Pre AI/Developers)
|
|
700
|
-
|
|
701
|
-
### Pred začatím:
|
|
702
|
-
|
|
703
|
-
1. **Prečítaj dokumentáciu:**
|
|
704
|
-
- `packages/admin/README.md` - User-facing features
|
|
705
|
-
- `packages/admin/STATUS.md` - Aktuálny stav (tento súbor)
|
|
706
|
-
- `packages/admin/VALIDATION.md` - Detailný status
|
|
707
|
-
|
|
708
|
-
2. **Pozri example:**
|
|
709
|
-
- `examples/tanstack-barbershop/` - Working example
|
|
710
|
-
- Spusti: `cd examples/tanstack-barbershop && bun run dev`
|
|
711
|
-
|
|
712
|
-
3. **Check dependencies:**
|
|
713
|
-
- `DEPENDENCIES.md` - CRITICAL! Correct versions
|
|
714
|
-
- zod: ^4.2.1 (NOT v3!)
|
|
715
|
-
- drizzle-orm: ^1.0.0-beta.6-4414a19 (specific beta)
|
|
716
|
-
|
|
717
|
-
### Pri implementácii nových features:
|
|
718
|
-
|
|
719
|
-
1. **Config types najprv:**
|
|
720
|
-
- Rozšír types v `packages/admin/src/config/index.ts`
|
|
721
|
-
- Type-safety je priorita
|
|
722
|
-
|
|
723
|
-
2. **Component implementation:**
|
|
724
|
-
- Vytvor komponent v `packages/admin/src/components/`
|
|
725
|
-
- Export v `packages/admin/src/components/index.ts`
|
|
726
|
-
|
|
727
|
-
3. **Integration:**
|
|
728
|
-
- Integruj do AutoFormFields/AdminRouter
|
|
729
|
-
- Nepoužívaj auto-detection; typy sú explicitné v configu
|
|
730
|
-
|
|
731
|
-
4. **Documentation:**
|
|
732
|
-
- Update `README.md` s examples
|
|
733
|
-
- Update `VALIDATION.md` status
|
|
734
|
-
- Vytvor spec v `specifications/` ak je complex
|
|
735
|
-
|
|
736
|
-
5. **Example:**
|
|
737
|
-
- Pridaj example do `examples/tanstack-barbershop/src/configs/admin.ts`
|
|
738
|
-
|
|
739
|
-
### Coding Guidelines:
|
|
740
|
-
|
|
741
|
-
**DO:**
|
|
742
|
-
- ✅ Import všetko z admin package: `import { Button } from "@questpie/admin/components"`
|
|
743
|
-
- ✅ Config-driven approach - všetko z configu
|
|
744
|
-
- ✅ Type-safe - plné TypeScript types
|
|
745
|
-
- ✅ Auto-generation z configu - čo najviac automatic
|
|
746
|
-
- ✅ Override support - všetko customizovateľné
|
|
747
|
-
- ✅ Use tabs (NOT spaces)
|
|
748
|
-
- ✅ Use double quotes
|
|
749
|
-
- ✅ Check `DEPENDENCIES.md` before adding deps
|
|
750
|
-
|
|
751
|
-
**DON'T:**
|
|
752
|
-
- ❌ Neduplikuj UI komponenty v examples
|
|
753
|
-
- ❌ Nevytváraj manual route files
|
|
754
|
-
- ❌ Nepíš switch statements pre collections
|
|
755
|
-
- ❌ Nepoužívaj zod v3 (len v4!)
|
|
756
|
-
- ❌ Nepoužívaj stable drizzle (len beta!)
|
|
757
|
-
|
|
758
|
-
### Testing:
|
|
759
|
-
|
|
760
|
-
1. **Manual testing:**
|
|
761
|
-
```bash
|
|
762
|
-
cd examples/tanstack-barbershop
|
|
763
|
-
bun install
|
|
764
|
-
bun run dev
|
|
765
|
-
```
|
|
766
|
-
|
|
767
|
-
2. **Type checking:**
|
|
768
|
-
```bash
|
|
769
|
-
cd packages/admin
|
|
770
|
-
bun run check-types
|
|
771
|
-
```
|
|
772
|
-
|
|
773
|
-
3. **Build:**
|
|
774
|
-
```bash
|
|
775
|
-
cd packages/admin
|
|
776
|
-
bun run build
|
|
777
|
-
```
|
|
778
|
-
|
|
779
|
-
### Pri problémoch:
|
|
780
|
-
|
|
781
|
-
1. Check `packages/admin/VALIDATION.md` - možno už je to known issue
|
|
782
|
-
2. Check `DEPENDENCIES.md` - správne verzie?
|
|
783
|
-
3. Check `examples/tanstack-barbershop/` - funguje example?
|
|
784
|
-
4. Check `CLAUDE.md` - project-specific instructions
|
|
785
|
-
|
|
786
|
-
---
|
|
787
|
-
|
|
788
|
-
## 💡 EXAMPLE USAGE
|
|
789
|
-
|
|
790
|
-
### Minimálne Setup
|
|
791
|
-
|
|
792
|
-
```tsx
|
|
793
|
-
// 1. Define CMS
|
|
794
|
-
import { defineCMS, defineCollection } from "@questpie/cms/server";
|
|
795
|
-
|
|
796
|
-
const posts = defineCollection("posts")
|
|
797
|
-
.fields({
|
|
798
|
-
title: varchar("title", { length: 255 }),
|
|
799
|
-
content: text("content")
|
|
800
|
-
});
|
|
801
|
-
|
|
802
|
-
export const cms = defineCMS({ collections: [posts] });
|
|
803
|
-
|
|
804
|
-
// 2. Create client
|
|
805
|
-
import { createClient } from "@questpie/cms/client";
|
|
806
|
-
export const cmsClient = createClient<typeof cms>({ baseURL: "/api/cms" });
|
|
807
|
-
|
|
808
|
-
// 3. Mount admin
|
|
809
|
-
import { AdminApp } from "@questpie/admin";
|
|
810
|
-
|
|
811
|
-
<AdminApp client={cmsClient} router={{...}} />
|
|
812
|
-
// Done! Auto-generated sidebar, routes, forms, everything!
|
|
813
|
-
```
|
|
814
|
-
|
|
815
|
-
### Custom Config
|
|
816
|
-
|
|
817
|
-
```tsx
|
|
818
|
-
import { defineAdminConfig } from "@questpie/admin/config";
|
|
819
|
-
|
|
820
|
-
export const adminConfig = defineAdminConfig<typeof cms>()({
|
|
821
|
-
app: {
|
|
822
|
-
brand: { name: "My Admin" }
|
|
823
|
-
},
|
|
824
|
-
collections: {
|
|
825
|
-
posts: {
|
|
826
|
-
label: "Blog Posts",
|
|
827
|
-
icon: "file-text",
|
|
828
|
-
|
|
829
|
-
list: {
|
|
830
|
-
defaultColumns: ["title", "author", "createdAt"],
|
|
831
|
-
defaultSort: { field: "createdAt", direction: "desc" }
|
|
832
|
-
},
|
|
833
|
-
|
|
834
|
-
edit: {
|
|
835
|
-
sections: [
|
|
836
|
-
{
|
|
837
|
-
title: "Content",
|
|
838
|
-
layout: "columns",
|
|
839
|
-
columns: 2,
|
|
840
|
-
fields: ["title", "slug", "content"]
|
|
841
|
-
}
|
|
842
|
-
]
|
|
843
|
-
},
|
|
844
|
-
|
|
845
|
-
fields: {
|
|
846
|
-
authorId: {
|
|
847
|
-
label: "Author",
|
|
848
|
-
relation: {
|
|
849
|
-
targetCollection: "users",
|
|
850
|
-
}
|
|
851
|
-
},
|
|
852
|
-
status: {
|
|
853
|
-
type: "select",
|
|
854
|
-
options: [
|
|
855
|
-
{ label: "Draft", value: "draft" },
|
|
856
|
-
{ label: "Published", value: "published" }
|
|
857
|
-
]
|
|
858
|
-
},
|
|
859
|
-
publishedAt: {
|
|
860
|
-
visible: (values) => values.status === "published",
|
|
861
|
-
required: (values) => values.status === "published"
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
});
|
|
867
|
-
|
|
868
|
-
<AdminApp client={cmsClient} config={adminConfig} router={{...}} />
|
|
869
|
-
```
|
|
870
|
-
|
|
871
|
-
---
|
|
872
|
-
|
|
873
|
-
## 🎓 LEARNING PATH
|
|
874
|
-
|
|
875
|
-
Pre nových AI/developers:
|
|
876
|
-
|
|
877
|
-
1. **Začni s README** (`packages/admin/README.md`)
|
|
878
|
-
- Quick start
|
|
879
|
-
- Feature overview
|
|
880
|
-
- Basic examples
|
|
881
|
-
|
|
882
|
-
2. **Pozri example** (`examples/tanstack-barbershop/`)
|
|
883
|
-
- Spusti: `bun run dev`
|
|
884
|
-
- Preskúmaj: `src/configs/admin.ts`
|
|
885
|
-
- Pochop: Ako to funguje
|
|
886
|
-
|
|
887
|
-
3. **Študuj architektúru** (`examples/tanstack-barbershop/ARCHITECTURE.md`)
|
|
888
|
-
- Čo NETREBA robiť
|
|
889
|
-
- Čo TREBA robiť
|
|
890
|
-
- Best practices
|
|
891
|
-
|
|
892
|
-
4. **Pozri status** (tento súbor)
|
|
893
|
-
- Čo funguje
|
|
894
|
-
- Čo treba implementovať
|
|
895
|
-
- Priorities
|
|
896
|
-
|
|
897
|
-
5. **Prečítaj specs**
|
|
898
|
-
- `specifications/RICH_TEXT_AND_BLOCKS.md`
|
|
899
|
-
- `specifications/ADVANCED_LAYOUTS_AND_DASHBOARD.md`
|
|
900
|
-
- `specifications/ADMIN_PACKAGE_DESIGN.md`
|
|
901
|
-
|
|
902
|
-
6. **Check validation** (`packages/admin/VALIDATION.md`)
|
|
903
|
-
- Detailed status každého feature
|
|
904
|
-
- Evidence pre implementáciu
|
|
905
|
-
- Next steps
|
|
906
|
-
|
|
907
|
-
---
|
|
908
|
-
|
|
909
|
-
## 📞 KONTAKT & FEEDBACK
|
|
910
|
-
|
|
911
|
-
GitHub: https://github.com/anthropics/claude-code/issues (pre Claude Code feedback)
|
|
912
|
-
|
|
913
|
-
---
|
|
914
|
-
|
|
915
|
-
**Posledná update:** 2025-12-31
|
|
916
|
-
**Next milestone:** Block Editor (Puck)
|
|
917
|
-
**Status:** Production-ready pre basic/intermediate use cases ✅
|