@nextsparkjs/theme-default 0.1.0-beta.1

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.
Files changed (333) hide show
  1. package/about/business.md +49 -0
  2. package/about/features.json +302 -0
  3. package/about/team.md +79 -0
  4. package/api/ai/chat/stream/route.ts +212 -0
  5. package/api/ai/orchestrator/route.ts +226 -0
  6. package/api/ai/single-agent/route.ts +291 -0
  7. package/api/ai/usage/route.ts +122 -0
  8. package/blocks/benefits/component.tsx +100 -0
  9. package/blocks/benefits/config.ts +11 -0
  10. package/blocks/benefits/examples.ts +85 -0
  11. package/blocks/benefits/fields.ts +156 -0
  12. package/blocks/benefits/schema.ts +33 -0
  13. package/blocks/cta-section/component.tsx +100 -0
  14. package/blocks/cta-section/config.ts +11 -0
  15. package/blocks/cta-section/examples.ts +41 -0
  16. package/blocks/cta-section/fields.ts +89 -0
  17. package/blocks/cta-section/index.ts +6 -0
  18. package/blocks/cta-section/schema.ts +32 -0
  19. package/blocks/cta-section/thumbnail.png +1 -0
  20. package/blocks/faq-accordion/component.tsx +156 -0
  21. package/blocks/faq-accordion/config.ts +11 -0
  22. package/blocks/faq-accordion/examples.ts +77 -0
  23. package/blocks/faq-accordion/fields.ts +119 -0
  24. package/blocks/faq-accordion/index.ts +6 -0
  25. package/blocks/faq-accordion/schema.ts +45 -0
  26. package/blocks/features-grid/component.tsx +112 -0
  27. package/blocks/features-grid/config.ts +11 -0
  28. package/blocks/features-grid/examples.ts +63 -0
  29. package/blocks/features-grid/fields.ts +97 -0
  30. package/blocks/features-grid/index.ts +6 -0
  31. package/blocks/features-grid/schema.ts +40 -0
  32. package/blocks/features-grid/thumbnail.png +1 -0
  33. package/blocks/hero/component.tsx +100 -0
  34. package/blocks/hero/config.ts +11 -0
  35. package/blocks/hero/examples.ts +35 -0
  36. package/blocks/hero/fields.ts +60 -0
  37. package/blocks/hero/index.ts +6 -0
  38. package/blocks/hero/schema.ts +32 -0
  39. package/blocks/hero/thumbnail.png +1 -0
  40. package/blocks/hero/thumbnail.png.txt +6 -0
  41. package/blocks/hero-with-form/component.tsx +232 -0
  42. package/blocks/hero-with-form/config.ts +11 -0
  43. package/blocks/hero-with-form/examples.ts +16 -0
  44. package/blocks/hero-with-form/fields.ts +207 -0
  45. package/blocks/hero-with-form/index.ts +6 -0
  46. package/blocks/hero-with-form/schema.ts +54 -0
  47. package/blocks/jumbotron/component.tsx +136 -0
  48. package/blocks/jumbotron/config.ts +11 -0
  49. package/blocks/jumbotron/examples.ts +36 -0
  50. package/blocks/jumbotron/fields.ts +202 -0
  51. package/blocks/jumbotron/index.ts +6 -0
  52. package/blocks/jumbotron/schema.ts +55 -0
  53. package/blocks/logo-cloud/component.tsx +154 -0
  54. package/blocks/logo-cloud/config.ts +11 -0
  55. package/blocks/logo-cloud/examples.ts +34 -0
  56. package/blocks/logo-cloud/fields.ts +133 -0
  57. package/blocks/logo-cloud/index.ts +6 -0
  58. package/blocks/logo-cloud/schema.ts +46 -0
  59. package/blocks/post-content/component.tsx +197 -0
  60. package/blocks/post-content/config.ts +11 -0
  61. package/blocks/post-content/examples.ts +33 -0
  62. package/blocks/post-content/fields.ts +165 -0
  63. package/blocks/post-content/index.ts +4 -0
  64. package/blocks/post-content/schema.ts +46 -0
  65. package/blocks/pricing-table/component.tsx +154 -0
  66. package/blocks/pricing-table/config.ts +11 -0
  67. package/blocks/pricing-table/examples.ts +96 -0
  68. package/blocks/pricing-table/fields.ts +161 -0
  69. package/blocks/pricing-table/index.ts +4 -0
  70. package/blocks/pricing-table/schema.ts +50 -0
  71. package/blocks/split-content/component.tsx +135 -0
  72. package/blocks/split-content/config.ts +11 -0
  73. package/blocks/split-content/examples.ts +38 -0
  74. package/blocks/split-content/fields.ts +198 -0
  75. package/blocks/split-content/index.ts +6 -0
  76. package/blocks/split-content/schema.ts +67 -0
  77. package/blocks/stats-counter/component.tsx +124 -0
  78. package/blocks/stats-counter/config.ts +11 -0
  79. package/blocks/stats-counter/examples.ts +61 -0
  80. package/blocks/stats-counter/fields.ts +134 -0
  81. package/blocks/stats-counter/index.ts +6 -0
  82. package/blocks/stats-counter/schema.ts +47 -0
  83. package/blocks/testimonials/component.tsx +114 -0
  84. package/blocks/testimonials/config.ts +11 -0
  85. package/blocks/testimonials/examples.ts +65 -0
  86. package/blocks/testimonials/fields.ts +105 -0
  87. package/blocks/testimonials/index.ts +6 -0
  88. package/blocks/testimonials/schema.ts +41 -0
  89. package/blocks/testimonials/thumbnail.png +1 -0
  90. package/blocks/text-content/component.tsx +97 -0
  91. package/blocks/text-content/config.ts +11 -0
  92. package/blocks/text-content/examples.ts +30 -0
  93. package/blocks/text-content/fields.ts +88 -0
  94. package/blocks/text-content/index.ts +6 -0
  95. package/blocks/text-content/schema.ts +30 -0
  96. package/blocks/text-content/thumbnail.png +1 -0
  97. package/blocks/timeline/component.tsx +267 -0
  98. package/blocks/timeline/config.ts +11 -0
  99. package/blocks/timeline/examples.ts +68 -0
  100. package/blocks/timeline/fields.ts +147 -0
  101. package/blocks/timeline/index.ts +6 -0
  102. package/blocks/timeline/schema.ts +49 -0
  103. package/blocks/video-hero/component.tsx +270 -0
  104. package/blocks/video-hero/config.ts +11 -0
  105. package/blocks/video-hero/examples.ts +24 -0
  106. package/blocks/video-hero/fields.ts +98 -0
  107. package/blocks/video-hero/index.ts +6 -0
  108. package/blocks/video-hero/schema.ts +39 -0
  109. package/components/ai-chat/ChatPanel.tsx +575 -0
  110. package/components/ai-chat/ConversationItem.tsx +266 -0
  111. package/components/ai-chat/ConversationSidebar.tsx +99 -0
  112. package/components/ai-chat/MarkdownRenderer.tsx +15 -0
  113. package/components/ai-chat/Message.tsx +42 -0
  114. package/components/ai-chat/MessageInput.tsx +49 -0
  115. package/components/ai-chat/MessageList.tsx +46 -0
  116. package/components/ai-chat/TypingIndicator.tsx +11 -0
  117. package/config/app.config.ts +367 -0
  118. package/config/billing.config.ts +349 -0
  119. package/config/dashboard.config.ts +506 -0
  120. package/config/dev.config.ts +104 -0
  121. package/config/features.config.ts +203 -0
  122. package/config/flows.config.ts +129 -0
  123. package/config/permissions.config.ts +245 -0
  124. package/config/theme.config.ts +74 -0
  125. package/docs/01-overview/01-introduction.md +335 -0
  126. package/docs/01-overview/02-customization.md +671 -0
  127. package/docs/02-features/01-components.md +155 -0
  128. package/docs/02-features/02-styling.md +139 -0
  129. package/docs/02-features/03-tasks-entity.md +407 -0
  130. package/docs/03-ai/01-overview.md +211 -0
  131. package/docs/03-ai/02-customization.md +436 -0
  132. package/entities/customers/customers.config.ts +75 -0
  133. package/entities/customers/customers.fields.ts +165 -0
  134. package/entities/customers/customers.service.ts +516 -0
  135. package/entities/customers/customers.types.ts +83 -0
  136. package/entities/customers/messages/en.json +66 -0
  137. package/entities/customers/messages/es.json +66 -0
  138. package/entities/customers/migrations/001_customers_table.sql +102 -0
  139. package/entities/customers/migrations/002_customers_metas.sql +92 -0
  140. package/entities/pages/messages/en.json +41 -0
  141. package/entities/pages/messages/es.json +41 -0
  142. package/entities/pages/migrations/001_pages_table.sql +112 -0
  143. package/entities/pages/migrations/002_pages_metas.sql +56 -0
  144. package/entities/pages/migrations/003_add_status.sql +50 -0
  145. package/entities/pages/pages-management.service.ts +610 -0
  146. package/entities/pages/pages.config.ts +94 -0
  147. package/entities/pages/pages.fields.ts +101 -0
  148. package/entities/pages/pages.service.ts +290 -0
  149. package/entities/pages/pages.types.ts +124 -0
  150. package/entities/posts/components/post-header.tsx +97 -0
  151. package/entities/posts/messages/en.json +55 -0
  152. package/entities/posts/messages/es.json +55 -0
  153. package/entities/posts/migrations/001_posts_table.sql +115 -0
  154. package/entities/posts/migrations/003_add_status.sql +44 -0
  155. package/entities/posts/migrations/004_entity_taxonomy_relations.sql +129 -0
  156. package/entities/posts/migrations/006_posts_metas.sql +56 -0
  157. package/entities/posts/posts.config.ts +101 -0
  158. package/entities/posts/posts.fields.ts +116 -0
  159. package/entities/posts/posts.service.ts +376 -0
  160. package/entities/posts/posts.types.ts +74 -0
  161. package/entities/tasks/messages/en.json +204 -0
  162. package/entities/tasks/messages/es.json +204 -0
  163. package/entities/tasks/migrations/001_tasks_table.sql +105 -0
  164. package/entities/tasks/migrations/002_task_metas.sql +85 -0
  165. package/entities/tasks/migrations/sample_data.json +77 -0
  166. package/entities/tasks/tasks.config.ts +79 -0
  167. package/entities/tasks/tasks.fields.ts +196 -0
  168. package/entities/tasks/tasks.service.ts +541 -0
  169. package/entities/tasks/tasks.types.ts +56 -0
  170. package/lib/hooks/useAiChat.ts +114 -0
  171. package/lib/hooks/useConversations.ts +376 -0
  172. package/lib/hooks/useOrchestratorChat.ts +122 -0
  173. package/lib/hooks/usePersistentChat.ts +315 -0
  174. package/lib/hooks/useStreamingChat.ts +127 -0
  175. package/lib/hooks/useTokenUsage.ts +63 -0
  176. package/lib/langchain/agents/customer-assistant.md +69 -0
  177. package/lib/langchain/agents/index.ts +61 -0
  178. package/lib/langchain/agents/orchestrator.md +59 -0
  179. package/lib/langchain/agents/page-assistant.md +85 -0
  180. package/lib/langchain/agents/single-agent.md +46 -0
  181. package/lib/langchain/agents/task-assistant.md +55 -0
  182. package/lib/langchain/config.ts +45 -0
  183. package/lib/langchain/handlers/customer-handler.ts +338 -0
  184. package/lib/langchain/handlers/page-handler.ts +232 -0
  185. package/lib/langchain/handlers/task-handler.ts +323 -0
  186. package/lib/langchain/langchain.config.ts +223 -0
  187. package/lib/langchain/observability.config.ts +30 -0
  188. package/lib/langchain/orchestrator.ts +562 -0
  189. package/lib/langchain/tools/customers.ts +176 -0
  190. package/lib/langchain/tools/index.ts +10 -0
  191. package/lib/langchain/tools/orchestrator.ts +92 -0
  192. package/lib/langchain/tools/pages.ts +289 -0
  193. package/lib/langchain/tools/tasks.ts +167 -0
  194. package/lib/scheduled-actions/billing.ts +149 -0
  195. package/lib/scheduled-actions/index.ts +170 -0
  196. package/lib/scheduled-actions/webhook.ts +231 -0
  197. package/lib/selectors.ts +197 -0
  198. package/messages/de/admin.json +219 -0
  199. package/messages/de/aiUsage.json +36 -0
  200. package/messages/de/buttons.json +19 -0
  201. package/messages/de/categories.json +35 -0
  202. package/messages/de/common.json +16 -0
  203. package/messages/de/dev.json +101 -0
  204. package/messages/de/docs.json +27 -0
  205. package/messages/de/entities.json +7 -0
  206. package/messages/de/features.json +119 -0
  207. package/messages/de/footer.json +22 -0
  208. package/messages/de/home.json +57 -0
  209. package/messages/de/index.ts +39 -0
  210. package/messages/de/mobileNav.json +13 -0
  211. package/messages/de/navigation.json +8 -0
  212. package/messages/de/observability.json +74 -0
  213. package/messages/de/posts.json +54 -0
  214. package/messages/de/pricing.json +102 -0
  215. package/messages/de/support.json +9 -0
  216. package/messages/de/teams.json +8 -0
  217. package/messages/en/admin.json +219 -0
  218. package/messages/en/aiUsage.json +36 -0
  219. package/messages/en/buttons.json +19 -0
  220. package/messages/en/categories.json +35 -0
  221. package/messages/en/common.json +16 -0
  222. package/messages/en/dev.json +106 -0
  223. package/messages/en/docs.json +27 -0
  224. package/messages/en/entities.json +7 -0
  225. package/messages/en/features.json +119 -0
  226. package/messages/en/footer.json +22 -0
  227. package/messages/en/home.json +57 -0
  228. package/messages/en/index.ts +39 -0
  229. package/messages/en/mobileNav.json +13 -0
  230. package/messages/en/navigation.json +8 -0
  231. package/messages/en/observability.json +74 -0
  232. package/messages/en/posts.json +54 -0
  233. package/messages/en/pricing.json +102 -0
  234. package/messages/en/support.json +9 -0
  235. package/messages/en/teams.json +8 -0
  236. package/messages/es/admin.json +219 -0
  237. package/messages/es/aiUsage.json +36 -0
  238. package/messages/es/buttons.json +19 -0
  239. package/messages/es/categories.json +35 -0
  240. package/messages/es/common.json +16 -0
  241. package/messages/es/dev.json +101 -0
  242. package/messages/es/docs.json +27 -0
  243. package/messages/es/entities.json +7 -0
  244. package/messages/es/features.json +119 -0
  245. package/messages/es/footer.json +22 -0
  246. package/messages/es/home.json +57 -0
  247. package/messages/es/index.ts +39 -0
  248. package/messages/es/mobileNav.json +13 -0
  249. package/messages/es/navigation.json +8 -0
  250. package/messages/es/observability.json +74 -0
  251. package/messages/es/posts.json +54 -0
  252. package/messages/es/pricing.json +102 -0
  253. package/messages/es/support.json +9 -0
  254. package/messages/es/teams.json +8 -0
  255. package/messages/fr/admin.json +219 -0
  256. package/messages/fr/aiUsage.json +36 -0
  257. package/messages/fr/buttons.json +19 -0
  258. package/messages/fr/categories.json +35 -0
  259. package/messages/fr/common.json +16 -0
  260. package/messages/fr/dev.json +101 -0
  261. package/messages/fr/docs.json +27 -0
  262. package/messages/fr/entities.json +7 -0
  263. package/messages/fr/features.json +119 -0
  264. package/messages/fr/footer.json +22 -0
  265. package/messages/fr/home.json +57 -0
  266. package/messages/fr/index.ts +39 -0
  267. package/messages/fr/mobileNav.json +13 -0
  268. package/messages/fr/navigation.json +8 -0
  269. package/messages/fr/observability.json +74 -0
  270. package/messages/fr/posts.json +54 -0
  271. package/messages/fr/pricing.json +102 -0
  272. package/messages/fr/support.json +9 -0
  273. package/messages/fr/teams.json +8 -0
  274. package/messages/it/admin.json +219 -0
  275. package/messages/it/aiUsage.json +36 -0
  276. package/messages/it/buttons.json +19 -0
  277. package/messages/it/categories.json +35 -0
  278. package/messages/it/common.json +16 -0
  279. package/messages/it/dev.json +101 -0
  280. package/messages/it/docs.json +27 -0
  281. package/messages/it/entities.json +7 -0
  282. package/messages/it/features.json +119 -0
  283. package/messages/it/footer.json +22 -0
  284. package/messages/it/home.json +57 -0
  285. package/messages/it/index.ts +39 -0
  286. package/messages/it/mobileNav.json +13 -0
  287. package/messages/it/navigation.json +8 -0
  288. package/messages/it/observability.json +74 -0
  289. package/messages/it/posts.json +54 -0
  290. package/messages/it/pricing.json +102 -0
  291. package/messages/it/support.json +9 -0
  292. package/messages/it/teams.json +8 -0
  293. package/messages/pt/admin.json +219 -0
  294. package/messages/pt/aiUsage.json +36 -0
  295. package/messages/pt/buttons.json +19 -0
  296. package/messages/pt/categories.json +35 -0
  297. package/messages/pt/common.json +16 -0
  298. package/messages/pt/dev.json +101 -0
  299. package/messages/pt/docs.json +27 -0
  300. package/messages/pt/entities.json +7 -0
  301. package/messages/pt/features.json +119 -0
  302. package/messages/pt/footer.json +22 -0
  303. package/messages/pt/home.json +57 -0
  304. package/messages/pt/index.ts +39 -0
  305. package/messages/pt/mobileNav.json +13 -0
  306. package/messages/pt/navigation.json +8 -0
  307. package/messages/pt/observability.json +74 -0
  308. package/messages/pt/posts.json +54 -0
  309. package/messages/pt/pricing.json +102 -0
  310. package/messages/pt/support.json +9 -0
  311. package/messages/pt/teams.json +8 -0
  312. package/migrations/089_add_editor_team_role.sql +39 -0
  313. package/migrations/090_demo_users_teams.sql +540 -0
  314. package/migrations/091_greek_teams_billing.sql +523 -0
  315. package/migrations/092_billing_sample_data.sql +774 -0
  316. package/migrations/093_pages_sample_data.sql +1158 -0
  317. package/migrations/094_posts_sample_data.sql +278 -0
  318. package/migrations/095_tasks_sample_data.sql +440 -0
  319. package/migrations/096_customers_sample_data.sql +358 -0
  320. package/migrations/097_scheduled_actions_sample_data.sql +111 -0
  321. package/package.json +22 -0
  322. package/public/docs/desktop-layout-example.png +0 -0
  323. package/styles/components.css +11 -0
  324. package/styles/globals.css +179 -0
  325. package/templates/(public)/blog/[slug]/page.tsx +65 -0
  326. package/templates/(public)/layout.tsx +25 -0
  327. package/templates/(public)/page.tsx +200 -0
  328. package/templates/(public)/support/page.tsx +321 -0
  329. package/templates/dashboard/(main)/agent-multi/page.tsx +63 -0
  330. package/templates/dashboard/(main)/agent-single/page.tsx +142 -0
  331. package/templates/dashboard/(main)/settings/ai-usage/page.tsx +157 -0
  332. package/templates/superadmin/ai-observability/[traceId]/page.tsx +27 -0
  333. package/templates/superadmin/ai-observability/page.tsx +17 -0
@@ -0,0 +1,671 @@
1
+ # Theme Customization
2
+
3
+ ## Introduction
4
+
5
+ The default theme is designed to be highly customizable. This guide explains how to modify colors, typography, spacing, components, and functionality to match your brand and requirements.
6
+
7
+ ## Configuration Files
8
+
9
+ ### Theme Configuration (`theme.config.ts`)
10
+
11
+ **Primary configuration** for theme metadata, styles, and components:
12
+
13
+ ```typescript
14
+ export const boilerplateThemeConfig: ThemeConfig = {
15
+ // Metadata
16
+ name: 'easy-home',
17
+ displayName: 'Boilerplate',
18
+ version: '1.0.0',
19
+ description: 'Boilerplate app',
20
+ author: 'NextSpark Team',
21
+
22
+ // Plugins
23
+ plugins: ['ai'],
24
+
25
+ // Styles (OKLCH colors, fonts, spacing)
26
+ styles: { ... },
27
+
28
+ // Theme-level configuration
29
+ config: { ... },
30
+
31
+ // Component overrides
32
+ components: { ... }
33
+ }
34
+ ```
35
+
36
+ ### Application Configuration (`app.config.ts`)
37
+
38
+ **Override core app settings** for this theme:
39
+
40
+ ```typescript
41
+ export const APP_CONFIG_OVERRIDES = {
42
+ // App metadata
43
+ app: {
44
+ name: 'Boilerplate',
45
+ version: '1.0.0',
46
+ },
47
+
48
+ // Internationalization
49
+ i18n: {
50
+ supportedLocales: ['en', 'es'],
51
+ defaultLocale: 'es',
52
+ namespaces: ['common', 'dashboard', 'tasks', ...],
53
+ },
54
+
55
+ // API settings
56
+ api: {
57
+ cors: { ... }
58
+ },
59
+
60
+ // Documentation
61
+ docs: {
62
+ enabled: true,
63
+ public: true,
64
+ showPluginsDocsInProd: false,
65
+ },
66
+
67
+ // Mobile navigation
68
+ mobileNav: {
69
+ items: [...],
70
+ moreSheetItems: [...]
71
+ }
72
+ }
73
+ ```
74
+
75
+ ---
76
+
77
+ ## Styling Customization
78
+
79
+ ### 1. Colors (OKLCH System)
80
+
81
+ **Primary Colors:**
82
+
83
+ ```typescript
84
+ // theme.config.ts
85
+ config: {
86
+ colors: {
87
+ primary: 'oklch(0.7090 0.1592 293.5412)', // Purple
88
+ 'primary-foreground': 'oklch(1.0000 0 0)', // White
89
+ secondary: 'oklch(0.9073 0.0530 306.0902)', // Light purple
90
+ // ... more colors
91
+ }
92
+ }
93
+ ```
94
+
95
+ **Change Brand Color:**
96
+
97
+ ```typescript
98
+ // From purple to blue
99
+ primary: 'oklch(0.5535 0.2164 259.8160)', // Blue
100
+ ```
101
+
102
+ **OKLCH Advantages:**
103
+ - Perceptually uniform
104
+ - Better interpolation
105
+ - Predictable lightness
106
+ - Easy to adjust hue while keeping lightness constant
107
+
108
+ **Tools:**
109
+ - [OKLCH Color Picker](https://oklch.com/)
110
+ - [Color Space Converter](https://colorspace.r-forge.r-project.org/)
111
+
112
+ ### 2. Typography
113
+
114
+ **Font Families:**
115
+
116
+ ```typescript
117
+ // theme.config.ts
118
+ config: {
119
+ fonts: {
120
+ sans: 'Open Sans, sans-serif', // Body text
121
+ serif: 'Source Serif 4, serif', // Headings
122
+ mono: 'IBM Plex Mono, monospace' // Code
123
+ }
124
+ }
125
+ ```
126
+
127
+ **Custom Fonts:**
128
+
129
+ 1. Add font files to `public/fonts/`:
130
+ ```
131
+ public/fonts/
132
+ ├── custom-font.woff2
133
+ ├── custom-font.woff
134
+ └── custom-font-license.txt
135
+ ```
136
+
137
+ 2. Update configuration:
138
+ ```typescript
139
+ fonts: {
140
+ sans: 'CustomFont, sans-serif',
141
+ }
142
+ ```
143
+
144
+ 3. Load in CSS:
145
+ ```css
146
+ /* styles/globals.css */
147
+ @font-face {
148
+ font-family: 'CustomFont';
149
+ src: url('/theme/fonts/custom-font.woff2') format('woff2');
150
+ font-weight: 400;
151
+ font-style: normal;
152
+ }
153
+ ```
154
+
155
+ ### 3. Spacing and Layout
156
+
157
+ **Border Radius:**
158
+
159
+ ```typescript
160
+ // theme.config.ts
161
+ spacing: {
162
+ radius: '1.5rem', // Large radius (default)
163
+ 'radius-sm': 'calc(1.5rem - 4px)',
164
+ 'radius-md': 'calc(1.5rem - 2px)',
165
+ 'radius-lg': '1.5rem',
166
+ 'radius-xl': 'calc(1.5rem + 4px)'
167
+ }
168
+
169
+ // For sharper design:
170
+ spacing: {
171
+ radius: '0.5rem', // Smaller radius
172
+ ...
173
+ }
174
+ ```
175
+
176
+ **Custom Spacing Variables:**
177
+
178
+ ```typescript
179
+ // theme.config.ts
180
+ styles: {
181
+ variables: {
182
+ '--spacing-xs': '0.125rem',
183
+ '--spacing-sm': '0.25rem',
184
+ '--spacing-md': '0.5rem',
185
+ '--spacing-lg': '1rem',
186
+ '--spacing-xl': '1.5rem',
187
+ '--spacing-2xl': '2rem'
188
+ }
189
+ }
190
+ ```
191
+
192
+ ### 4. Shadows
193
+
194
+ ```typescript
195
+ // theme.config.ts
196
+ breakpoints: { // Using breakpoints for shadows (legacy)
197
+ shadow: '0px 8px 16px -4px hsl(0 0% 0% / 0.08)',
198
+ 'shadow-lg': '0px 8px 16px -4px hsl(0 0% 0% / 0.08), 0px 4px 6px -5px hsl(0 0% 0% / 0.08)',
199
+ // ... more shadows
200
+ }
201
+ ```
202
+
203
+ **For Material Design:**
204
+ ```typescript
205
+ shadow: '0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24)',
206
+ 'shadow-lg': '0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)',
207
+ ```
208
+
209
+ ### 5. Dark Mode
210
+
211
+ **Colors automatically adapt** using OKLCH with adjusted lightness:
212
+
213
+ ```typescript
214
+ // Light mode
215
+ background: 'oklch(0.9689 0.0090 314.7819)', // Light
216
+
217
+ // Dark mode (automatic inversion)
218
+ // Background becomes darker while maintaining hue
219
+ ```
220
+
221
+ **Custom Dark Mode Colors:**
222
+
223
+ ```css
224
+ /* styles/globals.css */
225
+ :root {
226
+ --background: oklch(0.9689 0.0090 314.7819);
227
+ }
228
+
229
+ :root[data-theme="dark"] {
230
+ --background: oklch(0.2000 0.0090 314.7819); // Custom dark
231
+ }
232
+ ```
233
+
234
+ ---
235
+
236
+ ## Component Customization
237
+
238
+ ### Overriding Core Components
239
+
240
+ **Method 1: Theme Config Override**
241
+
242
+ ```typescript
243
+ // theme.config.ts
244
+ components: {
245
+ overrides: {
246
+ '@/core/components/ui/button': () =>
247
+ import('../components/overrides/Button').then(m => m.Button),
248
+ }
249
+ }
250
+ ```
251
+
252
+ **Method 2: Create Wrapper Component**
253
+
254
+ ```typescript
255
+ // components/custom/BrandButton.tsx
256
+ import { Button } from '@/core/components/ui/button'
257
+ import { cn } from '@/core/lib/utils'
258
+
259
+ export function BrandButton({ className, ...props }) {
260
+ return (
261
+ <Button
262
+ className={cn('rounded-full shadow-lg', className)}
263
+ {...props}
264
+ />
265
+ )
266
+ }
267
+ ```
268
+
269
+ ### Creating Custom Components
270
+
271
+ ```typescript
272
+ // components/custom/CustomHeader.tsx
273
+ export function CustomHeader() {
274
+ return (
275
+ <header className="bg-gradient-to-r from-primary to-secondary">
276
+ <h1>Custom Theme Header</h1>
277
+ </header>
278
+ )
279
+ }
280
+
281
+ // Register in theme.config.ts
282
+ components: {
283
+ custom: {
284
+ CustomHeader: () => import('../components/custom/CustomHeader')
285
+ .then(m => m.CustomHeader),
286
+ }
287
+ }
288
+ ```
289
+
290
+ ---
291
+
292
+ ## Mobile Navigation
293
+
294
+ ### Bottom Navigation Items
295
+
296
+ ```typescript
297
+ // app.config.ts
298
+ mobileNav: {
299
+ items: [
300
+ {
301
+ id: 'home',
302
+ labelKey: 'common.mobileNav.home',
303
+ href: '/dashboard',
304
+ icon: 'Home',
305
+ enabled: true,
306
+ },
307
+ {
308
+ id: 'tasks',
309
+ labelKey: 'common.mobileNav.tasks',
310
+ href: '/dashboard/tasks',
311
+ icon: 'CheckSquare',
312
+ enabled: true,
313
+ },
314
+ {
315
+ id: 'create',
316
+ labelKey: 'common.mobileNav.create',
317
+ icon: 'Plus',
318
+ isCentral: true, // Highlighted center button
319
+ action: 'quickCreate',
320
+ enabled: true,
321
+ },
322
+ // Add custom item
323
+ {
324
+ id: 'projects',
325
+ labelKey: 'common.mobileNav.projects',
326
+ href: '/dashboard/projects',
327
+ icon: 'FolderKanban',
328
+ enabled: true,
329
+ },
330
+ ]
331
+ }
332
+ ```
333
+
334
+ ### More Sheet Items
335
+
336
+ ```typescript
337
+ moreSheetItems: [
338
+ {
339
+ id: 'profile',
340
+ labelKey: 'common.navigation.profile',
341
+ href: '/dashboard/settings/profile',
342
+ icon: 'User',
343
+ enabled: true,
344
+ },
345
+ // Add custom option
346
+ {
347
+ id: 'analytics',
348
+ labelKey: 'common.navigation.analytics',
349
+ href: '/dashboard/analytics',
350
+ icon: 'BarChart',
351
+ enabled: true,
352
+ },
353
+ ]
354
+ ```
355
+
356
+ ---
357
+
358
+ ## Entity Customization
359
+
360
+ ### Modify Existing Entity (Tasks)
361
+
362
+ **Change Permissions:**
363
+
364
+ ```typescript
365
+ // entities/tasks/tasks.config.ts
366
+ permissions: {
367
+ read: ['admin', 'member'], // Only admin and members
368
+ create: ['admin'], // Only admin can create
369
+ update: ['admin'],
370
+ delete: ['admin']
371
+ }
372
+ ```
373
+
374
+ **Change UI Features:**
375
+
376
+ ```typescript
377
+ ui: {
378
+ dashboard: {
379
+ showInMenu: true,
380
+ showInTopbar: false // Hide from topbar
381
+ },
382
+ features: {
383
+ bulkOperations: false, // Disable bulk operations
384
+ importExport: true // Enable import/export
385
+ }
386
+ }
387
+ ```
388
+
389
+ ### Add New Entity
390
+
391
+ 1. Create entity directory:
392
+ ```
393
+ entities/projects/
394
+ ├── projects.config.ts
395
+ ├── projects.fields.ts
396
+ ├── messages/
397
+ │ ├── en.json
398
+ │ └── es.json
399
+ └── migrations/
400
+ └── 001_projects_table.sql
401
+ ```
402
+
403
+ 2. Configure entity (see Entity System documentation)
404
+
405
+ 3. Add translations
406
+
407
+ 4. Create migrations
408
+
409
+ 5. Rebuild registry: `pnpm registry:build`
410
+
411
+ ---
412
+
413
+ ## Page Template Customization
414
+
415
+ ### Modify Existing Pages
416
+
417
+ **Home Page:**
418
+
419
+ ```tsx
420
+ // templates/(public)/page.tsx
421
+ export default function HomePage() {
422
+ return (
423
+ <div>
424
+ <section className="hero">
425
+ <h1>Custom Hero Section</h1>
426
+ <p>Custom tagline for your brand</p>
427
+ </section>
428
+ {/* More sections */}
429
+ </div>
430
+ )
431
+ }
432
+ ```
433
+
434
+ **Features Page:**
435
+
436
+ ```tsx
437
+ // templates/(public)/features/page.tsx
438
+ const features = [
439
+ {
440
+ title: 'Custom Feature 1',
441
+ description: 'Description...',
442
+ icon: Zap
443
+ },
444
+ // More features
445
+ ]
446
+ ```
447
+
448
+ ### Add New Public Pages
449
+
450
+ ```tsx
451
+ // templates/(public)/about/page.tsx
452
+ export default function AboutPage() {
453
+ return (
454
+ <div className="container mx-auto py-12">
455
+ <h1>About Us</h1>
456
+ <p>Company information...</p>
457
+ </div>
458
+ )
459
+ }
460
+ ```
461
+
462
+ Access at: `/about`
463
+
464
+ ---
465
+
466
+ ## Translations
467
+
468
+ ### Update Existing Translations
469
+
470
+ ```json
471
+ // messages/en.json
472
+ {
473
+ "common": {
474
+ "appName": "Your SaaS Name",
475
+ "tagline": "Your custom tagline",
476
+ "mobileNav": {
477
+ "home": "Home",
478
+ "tasks": "My Tasks",
479
+ "create": "New"
480
+ }
481
+ }
482
+ }
483
+ ```
484
+
485
+ ### Add New Namespaces
486
+
487
+ 1. **Create translation files:**
488
+ ```
489
+ messages/
490
+ ├── en.json
491
+ ├── es.json
492
+ └── projects.en.json # New namespace
493
+ ```
494
+
495
+ 2. **Register in config:**
496
+ ```typescript
497
+ // app.config.ts
498
+ i18n: {
499
+ namespaces: [
500
+ 'common',
501
+ 'dashboard',
502
+ 'projects', // Add here
503
+ ],
504
+ }
505
+ ```
506
+
507
+ 3. **Use in components:**
508
+ ```typescript
509
+ import { useTranslations } from 'next-intl'
510
+
511
+ const t = useTranslations('projects')
512
+ return <h1>{t('title')}</h1>
513
+ ```
514
+
515
+ ---
516
+
517
+ ## Static Assets
518
+
519
+ ### Brand Assets
520
+
521
+ ```
522
+ public/brand/
523
+ ├── logo.svg # Light mode logo
524
+ ├── logo-dark.svg # Dark mode logo
525
+ ├── logo-text.svg # Logo with text
526
+ ├── favicon.ico # Browser favicon
527
+ └── apple-touch-icon.png # iOS home screen icon
528
+ ```
529
+
530
+ **Usage:**
531
+
532
+ ```tsx
533
+ <img src="/theme/brand/logo.svg" alt="Logo" />
534
+ ```
535
+
536
+ ### Images
537
+
538
+ ```
539
+ public/images/
540
+ ├── hero-bg.jpg
541
+ ├── feature-1.png
542
+ └── feature-2.png
543
+ ```
544
+
545
+ **Optimization:**
546
+ - Use next/image for automatic optimization
547
+ - WebP format for smaller sizes
548
+ - Appropriate dimensions for use case
549
+
550
+ ### Fonts
551
+
552
+ ```
553
+ public/fonts/
554
+ ├── custom-font.woff2
555
+ ├── custom-font.woff
556
+ └── custom-font-license.txt
557
+ ```
558
+
559
+ ---
560
+
561
+ ## Plugin Configuration
562
+
563
+ ### Add Plugins
564
+
565
+ ```typescript
566
+ // theme.config.ts
567
+ plugins: ['ai', 'analytics', 'payments']
568
+ ```
569
+
570
+ ### Remove Plugins
571
+
572
+ ```typescript
573
+ plugins: [] // No plugins
574
+ ```
575
+
576
+ ---
577
+
578
+ ## Best Practices
579
+
580
+ ### Colors
581
+
582
+ ✅ **DO:**
583
+ - Use OKLCH color system
584
+ - Maintain consistent contrast ratios
585
+ - Test in light and dark modes
586
+ - Use semantic color names
587
+
588
+ ❌ **DON'T:**
589
+ - Hardcode hex colors in components
590
+ - Use colors with poor contrast
591
+ - Ignore dark mode
592
+ - Use too many brand colors
593
+
594
+ ### Typography
595
+
596
+ ✅ **DO:**
597
+ - Load only necessary font weights
598
+ - Use variable fonts when possible
599
+ - Provide fallback fonts
600
+ - Optimize font loading
601
+
602
+ ❌ **DON'T:**
603
+ - Load entire font families
604
+ - Use custom fonts for body text (performance)
605
+ - Forget font licenses
606
+ - Mix too many font families
607
+
608
+ ### Components
609
+
610
+ ✅ **DO:**
611
+ - Extend core components when possible
612
+ - Follow naming conventions
613
+ - Document custom components
614
+ - Keep components reusable
615
+
616
+ ❌ **DON'T:**
617
+ - Duplicate core component code
618
+ - Create single-use components
619
+ - Ignore accessibility
620
+ - Skip TypeScript types
621
+
622
+ ### Assets
623
+
624
+ ✅ **DO:**
625
+ - Optimize images before uploading
626
+ - Use appropriate formats (WebP, SVG)
627
+ - Provide alt text
628
+ - Version assets in git
629
+
630
+ ❌ **DON'T:**
631
+ - Commit large unoptimized images
632
+ - Use inline base64 for large images
633
+ - Forget to add licensing info
634
+ - Store secrets in public/
635
+
636
+ ---
637
+
638
+ ## Quick Customization Checklist
639
+
640
+ **Brand Identity:**
641
+ - [ ] Update theme name and display name
642
+ - [ ] Change primary and secondary colors
643
+ - [ ] Upload brand logo and favicon
644
+ - [ ] Update typography (if needed)
645
+ - [ ] Customize border radius
646
+
647
+ **Content:**
648
+ - [ ] Update app name in translations
649
+ - [ ] Customize public page content
650
+ - [ ] Add/modify entities
651
+ - [ ] Update mobile navigation
652
+
653
+ **Functionality:**
654
+ - [ ] Configure mobile navigation items
655
+ - [ ] Set default locale
656
+ - [ ] Enable/disable plugins
657
+ - [ ] Configure documentation visibility
658
+
659
+ **Polish:**
660
+ - [ ] Test in light and dark modes
661
+ - [ ] Verify mobile responsiveness
662
+ - [ ] Check all translations
663
+ - [ ] Test on different devices
664
+
665
+ ---
666
+
667
+ ## Next Steps
668
+
669
+ - **[Components](../02-features/01-components.md)** - Explore available components
670
+ - **[Styling](../02-features/02-styling.md)** - Deep dive into styling system
671
+ - **[Core Theme System](/docs/core/theme-system/introduction)** - Complete theme documentation