@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.
- package/about/business.md +49 -0
- package/about/features.json +302 -0
- package/about/team.md +79 -0
- package/api/ai/chat/stream/route.ts +212 -0
- package/api/ai/orchestrator/route.ts +226 -0
- package/api/ai/single-agent/route.ts +291 -0
- package/api/ai/usage/route.ts +122 -0
- package/blocks/benefits/component.tsx +100 -0
- package/blocks/benefits/config.ts +11 -0
- package/blocks/benefits/examples.ts +85 -0
- package/blocks/benefits/fields.ts +156 -0
- package/blocks/benefits/schema.ts +33 -0
- package/blocks/cta-section/component.tsx +100 -0
- package/blocks/cta-section/config.ts +11 -0
- package/blocks/cta-section/examples.ts +41 -0
- package/blocks/cta-section/fields.ts +89 -0
- package/blocks/cta-section/index.ts +6 -0
- package/blocks/cta-section/schema.ts +32 -0
- package/blocks/cta-section/thumbnail.png +1 -0
- package/blocks/faq-accordion/component.tsx +156 -0
- package/blocks/faq-accordion/config.ts +11 -0
- package/blocks/faq-accordion/examples.ts +77 -0
- package/blocks/faq-accordion/fields.ts +119 -0
- package/blocks/faq-accordion/index.ts +6 -0
- package/blocks/faq-accordion/schema.ts +45 -0
- package/blocks/features-grid/component.tsx +112 -0
- package/blocks/features-grid/config.ts +11 -0
- package/blocks/features-grid/examples.ts +63 -0
- package/blocks/features-grid/fields.ts +97 -0
- package/blocks/features-grid/index.ts +6 -0
- package/blocks/features-grid/schema.ts +40 -0
- package/blocks/features-grid/thumbnail.png +1 -0
- package/blocks/hero/component.tsx +100 -0
- package/blocks/hero/config.ts +11 -0
- package/blocks/hero/examples.ts +35 -0
- package/blocks/hero/fields.ts +60 -0
- package/blocks/hero/index.ts +6 -0
- package/blocks/hero/schema.ts +32 -0
- package/blocks/hero/thumbnail.png +1 -0
- package/blocks/hero/thumbnail.png.txt +6 -0
- package/blocks/hero-with-form/component.tsx +232 -0
- package/blocks/hero-with-form/config.ts +11 -0
- package/blocks/hero-with-form/examples.ts +16 -0
- package/blocks/hero-with-form/fields.ts +207 -0
- package/blocks/hero-with-form/index.ts +6 -0
- package/blocks/hero-with-form/schema.ts +54 -0
- package/blocks/jumbotron/component.tsx +136 -0
- package/blocks/jumbotron/config.ts +11 -0
- package/blocks/jumbotron/examples.ts +36 -0
- package/blocks/jumbotron/fields.ts +202 -0
- package/blocks/jumbotron/index.ts +6 -0
- package/blocks/jumbotron/schema.ts +55 -0
- package/blocks/logo-cloud/component.tsx +154 -0
- package/blocks/logo-cloud/config.ts +11 -0
- package/blocks/logo-cloud/examples.ts +34 -0
- package/blocks/logo-cloud/fields.ts +133 -0
- package/blocks/logo-cloud/index.ts +6 -0
- package/blocks/logo-cloud/schema.ts +46 -0
- package/blocks/post-content/component.tsx +197 -0
- package/blocks/post-content/config.ts +11 -0
- package/blocks/post-content/examples.ts +33 -0
- package/blocks/post-content/fields.ts +165 -0
- package/blocks/post-content/index.ts +4 -0
- package/blocks/post-content/schema.ts +46 -0
- package/blocks/pricing-table/component.tsx +154 -0
- package/blocks/pricing-table/config.ts +11 -0
- package/blocks/pricing-table/examples.ts +96 -0
- package/blocks/pricing-table/fields.ts +161 -0
- package/blocks/pricing-table/index.ts +4 -0
- package/blocks/pricing-table/schema.ts +50 -0
- package/blocks/split-content/component.tsx +135 -0
- package/blocks/split-content/config.ts +11 -0
- package/blocks/split-content/examples.ts +38 -0
- package/blocks/split-content/fields.ts +198 -0
- package/blocks/split-content/index.ts +6 -0
- package/blocks/split-content/schema.ts +67 -0
- package/blocks/stats-counter/component.tsx +124 -0
- package/blocks/stats-counter/config.ts +11 -0
- package/blocks/stats-counter/examples.ts +61 -0
- package/blocks/stats-counter/fields.ts +134 -0
- package/blocks/stats-counter/index.ts +6 -0
- package/blocks/stats-counter/schema.ts +47 -0
- package/blocks/testimonials/component.tsx +114 -0
- package/blocks/testimonials/config.ts +11 -0
- package/blocks/testimonials/examples.ts +65 -0
- package/blocks/testimonials/fields.ts +105 -0
- package/blocks/testimonials/index.ts +6 -0
- package/blocks/testimonials/schema.ts +41 -0
- package/blocks/testimonials/thumbnail.png +1 -0
- package/blocks/text-content/component.tsx +97 -0
- package/blocks/text-content/config.ts +11 -0
- package/blocks/text-content/examples.ts +30 -0
- package/blocks/text-content/fields.ts +88 -0
- package/blocks/text-content/index.ts +6 -0
- package/blocks/text-content/schema.ts +30 -0
- package/blocks/text-content/thumbnail.png +1 -0
- package/blocks/timeline/component.tsx +267 -0
- package/blocks/timeline/config.ts +11 -0
- package/blocks/timeline/examples.ts +68 -0
- package/blocks/timeline/fields.ts +147 -0
- package/blocks/timeline/index.ts +6 -0
- package/blocks/timeline/schema.ts +49 -0
- package/blocks/video-hero/component.tsx +270 -0
- package/blocks/video-hero/config.ts +11 -0
- package/blocks/video-hero/examples.ts +24 -0
- package/blocks/video-hero/fields.ts +98 -0
- package/blocks/video-hero/index.ts +6 -0
- package/blocks/video-hero/schema.ts +39 -0
- package/components/ai-chat/ChatPanel.tsx +575 -0
- package/components/ai-chat/ConversationItem.tsx +266 -0
- package/components/ai-chat/ConversationSidebar.tsx +99 -0
- package/components/ai-chat/MarkdownRenderer.tsx +15 -0
- package/components/ai-chat/Message.tsx +42 -0
- package/components/ai-chat/MessageInput.tsx +49 -0
- package/components/ai-chat/MessageList.tsx +46 -0
- package/components/ai-chat/TypingIndicator.tsx +11 -0
- package/config/app.config.ts +367 -0
- package/config/billing.config.ts +349 -0
- package/config/dashboard.config.ts +506 -0
- package/config/dev.config.ts +104 -0
- package/config/features.config.ts +203 -0
- package/config/flows.config.ts +129 -0
- package/config/permissions.config.ts +245 -0
- package/config/theme.config.ts +74 -0
- package/docs/01-overview/01-introduction.md +335 -0
- package/docs/01-overview/02-customization.md +671 -0
- package/docs/02-features/01-components.md +155 -0
- package/docs/02-features/02-styling.md +139 -0
- package/docs/02-features/03-tasks-entity.md +407 -0
- package/docs/03-ai/01-overview.md +211 -0
- package/docs/03-ai/02-customization.md +436 -0
- package/entities/customers/customers.config.ts +75 -0
- package/entities/customers/customers.fields.ts +165 -0
- package/entities/customers/customers.service.ts +516 -0
- package/entities/customers/customers.types.ts +83 -0
- package/entities/customers/messages/en.json +66 -0
- package/entities/customers/messages/es.json +66 -0
- package/entities/customers/migrations/001_customers_table.sql +102 -0
- package/entities/customers/migrations/002_customers_metas.sql +92 -0
- package/entities/pages/messages/en.json +41 -0
- package/entities/pages/messages/es.json +41 -0
- package/entities/pages/migrations/001_pages_table.sql +112 -0
- package/entities/pages/migrations/002_pages_metas.sql +56 -0
- package/entities/pages/migrations/003_add_status.sql +50 -0
- package/entities/pages/pages-management.service.ts +610 -0
- package/entities/pages/pages.config.ts +94 -0
- package/entities/pages/pages.fields.ts +101 -0
- package/entities/pages/pages.service.ts +290 -0
- package/entities/pages/pages.types.ts +124 -0
- package/entities/posts/components/post-header.tsx +97 -0
- package/entities/posts/messages/en.json +55 -0
- package/entities/posts/messages/es.json +55 -0
- package/entities/posts/migrations/001_posts_table.sql +115 -0
- package/entities/posts/migrations/003_add_status.sql +44 -0
- package/entities/posts/migrations/004_entity_taxonomy_relations.sql +129 -0
- package/entities/posts/migrations/006_posts_metas.sql +56 -0
- package/entities/posts/posts.config.ts +101 -0
- package/entities/posts/posts.fields.ts +116 -0
- package/entities/posts/posts.service.ts +376 -0
- package/entities/posts/posts.types.ts +74 -0
- package/entities/tasks/messages/en.json +204 -0
- package/entities/tasks/messages/es.json +204 -0
- package/entities/tasks/migrations/001_tasks_table.sql +105 -0
- package/entities/tasks/migrations/002_task_metas.sql +85 -0
- package/entities/tasks/migrations/sample_data.json +77 -0
- package/entities/tasks/tasks.config.ts +79 -0
- package/entities/tasks/tasks.fields.ts +196 -0
- package/entities/tasks/tasks.service.ts +541 -0
- package/entities/tasks/tasks.types.ts +56 -0
- package/lib/hooks/useAiChat.ts +114 -0
- package/lib/hooks/useConversations.ts +376 -0
- package/lib/hooks/useOrchestratorChat.ts +122 -0
- package/lib/hooks/usePersistentChat.ts +315 -0
- package/lib/hooks/useStreamingChat.ts +127 -0
- package/lib/hooks/useTokenUsage.ts +63 -0
- package/lib/langchain/agents/customer-assistant.md +69 -0
- package/lib/langchain/agents/index.ts +61 -0
- package/lib/langchain/agents/orchestrator.md +59 -0
- package/lib/langchain/agents/page-assistant.md +85 -0
- package/lib/langchain/agents/single-agent.md +46 -0
- package/lib/langchain/agents/task-assistant.md +55 -0
- package/lib/langchain/config.ts +45 -0
- package/lib/langchain/handlers/customer-handler.ts +338 -0
- package/lib/langchain/handlers/page-handler.ts +232 -0
- package/lib/langchain/handlers/task-handler.ts +323 -0
- package/lib/langchain/langchain.config.ts +223 -0
- package/lib/langchain/observability.config.ts +30 -0
- package/lib/langchain/orchestrator.ts +562 -0
- package/lib/langchain/tools/customers.ts +176 -0
- package/lib/langchain/tools/index.ts +10 -0
- package/lib/langchain/tools/orchestrator.ts +92 -0
- package/lib/langchain/tools/pages.ts +289 -0
- package/lib/langchain/tools/tasks.ts +167 -0
- package/lib/scheduled-actions/billing.ts +149 -0
- package/lib/scheduled-actions/index.ts +170 -0
- package/lib/scheduled-actions/webhook.ts +231 -0
- package/lib/selectors.ts +197 -0
- package/messages/de/admin.json +219 -0
- package/messages/de/aiUsage.json +36 -0
- package/messages/de/buttons.json +19 -0
- package/messages/de/categories.json +35 -0
- package/messages/de/common.json +16 -0
- package/messages/de/dev.json +101 -0
- package/messages/de/docs.json +27 -0
- package/messages/de/entities.json +7 -0
- package/messages/de/features.json +119 -0
- package/messages/de/footer.json +22 -0
- package/messages/de/home.json +57 -0
- package/messages/de/index.ts +39 -0
- package/messages/de/mobileNav.json +13 -0
- package/messages/de/navigation.json +8 -0
- package/messages/de/observability.json +74 -0
- package/messages/de/posts.json +54 -0
- package/messages/de/pricing.json +102 -0
- package/messages/de/support.json +9 -0
- package/messages/de/teams.json +8 -0
- package/messages/en/admin.json +219 -0
- package/messages/en/aiUsage.json +36 -0
- package/messages/en/buttons.json +19 -0
- package/messages/en/categories.json +35 -0
- package/messages/en/common.json +16 -0
- package/messages/en/dev.json +106 -0
- package/messages/en/docs.json +27 -0
- package/messages/en/entities.json +7 -0
- package/messages/en/features.json +119 -0
- package/messages/en/footer.json +22 -0
- package/messages/en/home.json +57 -0
- package/messages/en/index.ts +39 -0
- package/messages/en/mobileNav.json +13 -0
- package/messages/en/navigation.json +8 -0
- package/messages/en/observability.json +74 -0
- package/messages/en/posts.json +54 -0
- package/messages/en/pricing.json +102 -0
- package/messages/en/support.json +9 -0
- package/messages/en/teams.json +8 -0
- package/messages/es/admin.json +219 -0
- package/messages/es/aiUsage.json +36 -0
- package/messages/es/buttons.json +19 -0
- package/messages/es/categories.json +35 -0
- package/messages/es/common.json +16 -0
- package/messages/es/dev.json +101 -0
- package/messages/es/docs.json +27 -0
- package/messages/es/entities.json +7 -0
- package/messages/es/features.json +119 -0
- package/messages/es/footer.json +22 -0
- package/messages/es/home.json +57 -0
- package/messages/es/index.ts +39 -0
- package/messages/es/mobileNav.json +13 -0
- package/messages/es/navigation.json +8 -0
- package/messages/es/observability.json +74 -0
- package/messages/es/posts.json +54 -0
- package/messages/es/pricing.json +102 -0
- package/messages/es/support.json +9 -0
- package/messages/es/teams.json +8 -0
- package/messages/fr/admin.json +219 -0
- package/messages/fr/aiUsage.json +36 -0
- package/messages/fr/buttons.json +19 -0
- package/messages/fr/categories.json +35 -0
- package/messages/fr/common.json +16 -0
- package/messages/fr/dev.json +101 -0
- package/messages/fr/docs.json +27 -0
- package/messages/fr/entities.json +7 -0
- package/messages/fr/features.json +119 -0
- package/messages/fr/footer.json +22 -0
- package/messages/fr/home.json +57 -0
- package/messages/fr/index.ts +39 -0
- package/messages/fr/mobileNav.json +13 -0
- package/messages/fr/navigation.json +8 -0
- package/messages/fr/observability.json +74 -0
- package/messages/fr/posts.json +54 -0
- package/messages/fr/pricing.json +102 -0
- package/messages/fr/support.json +9 -0
- package/messages/fr/teams.json +8 -0
- package/messages/it/admin.json +219 -0
- package/messages/it/aiUsage.json +36 -0
- package/messages/it/buttons.json +19 -0
- package/messages/it/categories.json +35 -0
- package/messages/it/common.json +16 -0
- package/messages/it/dev.json +101 -0
- package/messages/it/docs.json +27 -0
- package/messages/it/entities.json +7 -0
- package/messages/it/features.json +119 -0
- package/messages/it/footer.json +22 -0
- package/messages/it/home.json +57 -0
- package/messages/it/index.ts +39 -0
- package/messages/it/mobileNav.json +13 -0
- package/messages/it/navigation.json +8 -0
- package/messages/it/observability.json +74 -0
- package/messages/it/posts.json +54 -0
- package/messages/it/pricing.json +102 -0
- package/messages/it/support.json +9 -0
- package/messages/it/teams.json +8 -0
- package/messages/pt/admin.json +219 -0
- package/messages/pt/aiUsage.json +36 -0
- package/messages/pt/buttons.json +19 -0
- package/messages/pt/categories.json +35 -0
- package/messages/pt/common.json +16 -0
- package/messages/pt/dev.json +101 -0
- package/messages/pt/docs.json +27 -0
- package/messages/pt/entities.json +7 -0
- package/messages/pt/features.json +119 -0
- package/messages/pt/footer.json +22 -0
- package/messages/pt/home.json +57 -0
- package/messages/pt/index.ts +39 -0
- package/messages/pt/mobileNav.json +13 -0
- package/messages/pt/navigation.json +8 -0
- package/messages/pt/observability.json +74 -0
- package/messages/pt/posts.json +54 -0
- package/messages/pt/pricing.json +102 -0
- package/messages/pt/support.json +9 -0
- package/messages/pt/teams.json +8 -0
- package/migrations/089_add_editor_team_role.sql +39 -0
- package/migrations/090_demo_users_teams.sql +540 -0
- package/migrations/091_greek_teams_billing.sql +523 -0
- package/migrations/092_billing_sample_data.sql +774 -0
- package/migrations/093_pages_sample_data.sql +1158 -0
- package/migrations/094_posts_sample_data.sql +278 -0
- package/migrations/095_tasks_sample_data.sql +440 -0
- package/migrations/096_customers_sample_data.sql +358 -0
- package/migrations/097_scheduled_actions_sample_data.sql +111 -0
- package/package.json +22 -0
- package/public/docs/desktop-layout-example.png +0 -0
- package/styles/components.css +11 -0
- package/styles/globals.css +179 -0
- package/templates/(public)/blog/[slug]/page.tsx +65 -0
- package/templates/(public)/layout.tsx +25 -0
- package/templates/(public)/page.tsx +200 -0
- package/templates/(public)/support/page.tsx +321 -0
- package/templates/dashboard/(main)/agent-multi/page.tsx +63 -0
- package/templates/dashboard/(main)/agent-single/page.tsx +142 -0
- package/templates/dashboard/(main)/settings/ai-usage/page.tsx +157 -0
- package/templates/superadmin/ai-observability/[traceId]/page.tsx +27 -0
- package/templates/superadmin/ai-observability/page.tsx +17 -0
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
# Default Theme Introduction
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
The **Default Theme** (also known as "Boilerplate") is the reference implementation for the NextSpark system. It serves as both a working example and a starting point for creating custom themes.
|
|
6
|
+
|
|
7
|
+
**Key Characteristics:**
|
|
8
|
+
- **Production-Ready** - Fully functional theme with complete features
|
|
9
|
+
- **Reference Implementation** - Demonstrates best practices and patterns
|
|
10
|
+
- **Minimal but Complete** - Essential features without unnecessary complexity
|
|
11
|
+
- **Highly Customizable** - Easy to extend or use as a base for new themes
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
### As a Reference
|
|
16
|
+
|
|
17
|
+
The default theme showcases:
|
|
18
|
+
- **Theme Structure** - How to organize theme files and directories
|
|
19
|
+
- **Entity Configuration** - Example entity (Tasks) with complete setup
|
|
20
|
+
- **Public Templates** - Landing page, features, pricing, and support pages
|
|
21
|
+
- **Styling System** - OKLCH color system with Tailwind CSS v4
|
|
22
|
+
- **Internationalization** - English and Spanish translations
|
|
23
|
+
- **Plugin Integration** - AI plugin integration example
|
|
24
|
+
|
|
25
|
+
### As a Starting Point
|
|
26
|
+
|
|
27
|
+
Use the default theme to:
|
|
28
|
+
- **Bootstrap New Projects** - Start with working foundation
|
|
29
|
+
- **Learn Theme System** - Understand theme architecture
|
|
30
|
+
- **Create Custom Themes** - Copy and modify for your brand
|
|
31
|
+
- **Test Features** - Verify core functionality works correctly
|
|
32
|
+
|
|
33
|
+
## Key Features
|
|
34
|
+
|
|
35
|
+
### 1. Modern Design System
|
|
36
|
+
|
|
37
|
+
**Color System:**
|
|
38
|
+
- OKLCH color space for perceptual uniformity
|
|
39
|
+
- Comprehensive color palette (background, foreground, primary, secondary, etc.)
|
|
40
|
+
- Chart colors (5 variations)
|
|
41
|
+
- Sidebar-specific colors
|
|
42
|
+
- Automatic dark mode support
|
|
43
|
+
|
|
44
|
+
**Typography:**
|
|
45
|
+
- **Sans:** Open Sans (body text)
|
|
46
|
+
- **Serif:** Source Serif 4 (headings)
|
|
47
|
+
- **Mono:** IBM Plex Mono (code)
|
|
48
|
+
|
|
49
|
+
**Spacing:**
|
|
50
|
+
- Consistent spacing scale (xs to 2xl)
|
|
51
|
+
- Custom border radius system (1.5rem base)
|
|
52
|
+
- Comprehensive shadow system
|
|
53
|
+
|
|
54
|
+
### 2. Responsive Layout
|
|
55
|
+
|
|
56
|
+
**Breakpoints:**
|
|
57
|
+
- Mobile-first approach
|
|
58
|
+
- Desktop, tablet, and mobile optimized
|
|
59
|
+
- Custom mobile navigation with bottom bar
|
|
60
|
+
- Responsive sidebar for dashboard
|
|
61
|
+
|
|
62
|
+
**Mobile Features:**
|
|
63
|
+
- Bottom navigation with 5 configurable items
|
|
64
|
+
- Central action button (highlighted)
|
|
65
|
+
- "More" sheet for additional options
|
|
66
|
+
- Touch-optimized interactions
|
|
67
|
+
|
|
68
|
+
### 3. Task Management Entity
|
|
69
|
+
|
|
70
|
+
**Complete CRUD Operations:**
|
|
71
|
+
- Create, read, update, delete tasks
|
|
72
|
+
- Searchable and filterable
|
|
73
|
+
- Sortable columns
|
|
74
|
+
- Bulk operations support
|
|
75
|
+
|
|
76
|
+
**Features:**
|
|
77
|
+
- Metadata system support
|
|
78
|
+
- API access enabled
|
|
79
|
+
- Multi-language support
|
|
80
|
+
- RLS (Row Level Security) ready
|
|
81
|
+
|
|
82
|
+
**Permissions:**
|
|
83
|
+
- All roles can manage tasks (member, colaborator, admin)
|
|
84
|
+
- User-scoped data access
|
|
85
|
+
- Dashboard integration
|
|
86
|
+
|
|
87
|
+
### 4. Public Pages
|
|
88
|
+
|
|
89
|
+
**Available Templates:**
|
|
90
|
+
- **Home** (`/`) - Landing page
|
|
91
|
+
- **Features** (`/features`) - Feature showcase
|
|
92
|
+
- **Pricing** (`/pricing`) - Pricing plans
|
|
93
|
+
- **Support** (`/support`) - Support information
|
|
94
|
+
|
|
95
|
+
**Characteristics:**
|
|
96
|
+
- Server-side rendered
|
|
97
|
+
- SEO optimized
|
|
98
|
+
- Responsive design
|
|
99
|
+
- Internationalized content
|
|
100
|
+
|
|
101
|
+
### 5. Internationalization
|
|
102
|
+
|
|
103
|
+
**Supported Languages:**
|
|
104
|
+
- **English** (en) - Primary
|
|
105
|
+
- **Spanish** (es) - Default
|
|
106
|
+
|
|
107
|
+
**Translation Namespaces:**
|
|
108
|
+
- `common` - Shared UI elements
|
|
109
|
+
- `dashboard` - Dashboard-specific content
|
|
110
|
+
- `settings` - Settings pages
|
|
111
|
+
- `auth` - Authentication flows
|
|
112
|
+
- `public` - Public pages
|
|
113
|
+
- `validation` - Form validation
|
|
114
|
+
- `tasks` - Task entity translations
|
|
115
|
+
|
|
116
|
+
### 6. Plugin Integration
|
|
117
|
+
|
|
118
|
+
**Included Plugin:**
|
|
119
|
+
- **AI Plugin** - Artificial intelligence features integration
|
|
120
|
+
|
|
121
|
+
**Integration Points:**
|
|
122
|
+
- Plugin configuration in `theme.config.ts`
|
|
123
|
+
- Plugin documentation accessible
|
|
124
|
+
- Seamless plugin functionality
|
|
125
|
+
|
|
126
|
+
## Theme Structure
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
contents/themes/default/
|
|
130
|
+
├── theme.config.ts # Theme configuration and metadata
|
|
131
|
+
├── app.config.ts # Application config overrides
|
|
132
|
+
├── dashboard.config.ts # Dashboard configuration
|
|
133
|
+
│
|
|
134
|
+
├── entities/ # Theme-specific entities
|
|
135
|
+
│ └── tasks/
|
|
136
|
+
│ ├── tasks.config.ts # Entity configuration
|
|
137
|
+
│ ├── tasks.fields.ts # Field definitions
|
|
138
|
+
│ ├── messages/ # Entity translations
|
|
139
|
+
│ │ ├── en.json
|
|
140
|
+
│ │ └── es.json
|
|
141
|
+
│ └── migrations/ # Database migrations
|
|
142
|
+
│ ├── 001_tasks_table.sql
|
|
143
|
+
│ ├── 002_task_metas.sql
|
|
144
|
+
│ └── 003_tasks_sample_data.sql
|
|
145
|
+
│
|
|
146
|
+
├── messages/ # Theme-wide translations
|
|
147
|
+
│ ├── en.json
|
|
148
|
+
│ └── es.json
|
|
149
|
+
│
|
|
150
|
+
├── templates/ # Page templates
|
|
151
|
+
│ └── (public)/
|
|
152
|
+
│ ├── layout.tsx # Public layout
|
|
153
|
+
│ ├── page.tsx # Home page
|
|
154
|
+
│ ├── features/page.tsx # Features page
|
|
155
|
+
│ ├── pricing/page.tsx # Pricing page
|
|
156
|
+
│ └── support/page.tsx # Support page
|
|
157
|
+
│
|
|
158
|
+
├── styles/ # Theme styles
|
|
159
|
+
│ ├── globals.css # Global CSS overrides
|
|
160
|
+
│ └── components.css # Component-specific styles
|
|
161
|
+
│
|
|
162
|
+
├── public/ # Static assets
|
|
163
|
+
│ ├── brand/ # Brand assets (logos, favicons)
|
|
164
|
+
│ ├── images/ # Theme images
|
|
165
|
+
│ ├── fonts/ # Custom fonts
|
|
166
|
+
│ └── docs/ # Documentation images
|
|
167
|
+
│
|
|
168
|
+
└── docs/ # Theme documentation
|
|
169
|
+
├── 01-overview/
|
|
170
|
+
└── 02-features/
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Configuration Overview
|
|
174
|
+
|
|
175
|
+
### Theme Configuration (`theme.config.ts`)
|
|
176
|
+
|
|
177
|
+
**Metadata:**
|
|
178
|
+
```typescript
|
|
179
|
+
{
|
|
180
|
+
name: 'easy-home',
|
|
181
|
+
displayName: 'Boilerplate',
|
|
182
|
+
version: '1.0.0',
|
|
183
|
+
author: 'NextSpark Team',
|
|
184
|
+
plugins: ['ai']
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**Styles:**
|
|
189
|
+
- CSS variable definitions
|
|
190
|
+
- Color system (OKLCH)
|
|
191
|
+
- Typography system
|
|
192
|
+
- Spacing and shadows
|
|
193
|
+
|
|
194
|
+
**Components:**
|
|
195
|
+
- Component overrides (optional)
|
|
196
|
+
- Custom components (optional)
|
|
197
|
+
|
|
198
|
+
### Application Configuration (`app.config.ts`)
|
|
199
|
+
|
|
200
|
+
**Overrides:**
|
|
201
|
+
- App name and version
|
|
202
|
+
- Supported locales (en, es)
|
|
203
|
+
- Default locale (es)
|
|
204
|
+
- CORS origins
|
|
205
|
+
- Documentation settings
|
|
206
|
+
- Mobile navigation configuration
|
|
207
|
+
|
|
208
|
+
**Notable Settings:**
|
|
209
|
+
- Documentation enabled and public
|
|
210
|
+
- Plugin docs hidden in production
|
|
211
|
+
- 5-item mobile bottom navigation
|
|
212
|
+
- Configurable "More" sheet items
|
|
213
|
+
|
|
214
|
+
## Active Theme Selection
|
|
215
|
+
|
|
216
|
+
**Environment Variable:**
|
|
217
|
+
```bash
|
|
218
|
+
NEXT_PUBLIC_ACTIVE_THEME=default
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Build-Time Selection:**
|
|
222
|
+
- Theme selected during build/dev startup
|
|
223
|
+
- Registry system loads theme configuration
|
|
224
|
+
- Styles compiled and injected
|
|
225
|
+
- Translations loaded
|
|
226
|
+
- Templates rendered
|
|
227
|
+
|
|
228
|
+
## Getting Started
|
|
229
|
+
|
|
230
|
+
### 1. Activate Theme
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
# Set in .env.local
|
|
234
|
+
NEXT_PUBLIC_ACTIVE_THEME=default
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### 2. Build Registry
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
pnpm registry:build
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### 3. Start Development
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
pnpm dev
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### 4. Access Application
|
|
250
|
+
|
|
251
|
+
- **Dashboard:** http://localhost:5173/dashboard
|
|
252
|
+
- **Home:** http://localhost:5173/
|
|
253
|
+
- **Tasks:** http://localhost:5173/dashboard/tasks
|
|
254
|
+
|
|
255
|
+
## Use Cases
|
|
256
|
+
|
|
257
|
+
### Learning the System
|
|
258
|
+
|
|
259
|
+
**Best for:**
|
|
260
|
+
- New developers learning the boilerplate
|
|
261
|
+
- Understanding theme architecture
|
|
262
|
+
- Exploring entity system
|
|
263
|
+
- Testing core features
|
|
264
|
+
|
|
265
|
+
**Approach:**
|
|
266
|
+
- Study theme structure
|
|
267
|
+
- Review configuration files
|
|
268
|
+
- Examine entity implementation
|
|
269
|
+
- Test in browser
|
|
270
|
+
|
|
271
|
+
### Starting New Project
|
|
272
|
+
|
|
273
|
+
**Best for:**
|
|
274
|
+
- Rapid project initialization
|
|
275
|
+
- Client projects needing base theme
|
|
276
|
+
- MVPs and prototypes
|
|
277
|
+
- Standard SaaS applications
|
|
278
|
+
|
|
279
|
+
**Approach:**
|
|
280
|
+
- Copy default theme
|
|
281
|
+
- Rename to project-specific name
|
|
282
|
+
- Customize colors and typography
|
|
283
|
+
- Add/modify entities
|
|
284
|
+
- Update translations
|
|
285
|
+
- Customize public pages
|
|
286
|
+
|
|
287
|
+
### Reference Implementation
|
|
288
|
+
|
|
289
|
+
**Best for:**
|
|
290
|
+
- Creating custom themes
|
|
291
|
+
- Verifying core functionality
|
|
292
|
+
- Comparing implementations
|
|
293
|
+
- Learning best practices
|
|
294
|
+
|
|
295
|
+
**Approach:**
|
|
296
|
+
- Reference when stuck
|
|
297
|
+
- Compare implementations
|
|
298
|
+
- Copy proven patterns
|
|
299
|
+
- Verify expected behavior
|
|
300
|
+
|
|
301
|
+
## Customization Possibilities
|
|
302
|
+
|
|
303
|
+
The default theme can be customized in several ways:
|
|
304
|
+
|
|
305
|
+
**Visual:**
|
|
306
|
+
- Colors (OKLCH color system)
|
|
307
|
+
- Typography (font families)
|
|
308
|
+
- Spacing and sizing
|
|
309
|
+
- Border radius
|
|
310
|
+
- Shadows
|
|
311
|
+
|
|
312
|
+
**Structure:**
|
|
313
|
+
- Add/remove entities
|
|
314
|
+
- Modify public pages
|
|
315
|
+
- Change navigation
|
|
316
|
+
- Add custom components
|
|
317
|
+
|
|
318
|
+
**Functionality:**
|
|
319
|
+
- Enable/disable features
|
|
320
|
+
- Add plugins
|
|
321
|
+
- Configure permissions
|
|
322
|
+
- Adjust mobile navigation
|
|
323
|
+
|
|
324
|
+
**Content:**
|
|
325
|
+
- Update translations
|
|
326
|
+
- Change brand assets
|
|
327
|
+
- Modify page copy
|
|
328
|
+
- Add documentation
|
|
329
|
+
|
|
330
|
+
## Next Steps
|
|
331
|
+
|
|
332
|
+
- **[Customization](./02-customization.md)** - Learn how to customize the theme
|
|
333
|
+
- **[Components](../02-features/01-components.md)** - Explore theme components
|
|
334
|
+
- **[Styling](../02-features/02-styling.md)** - Understand the styling system
|
|
335
|
+
- **[Core Documentation](/docs/core/theme-system/introduction)** - Deep dive into theme system
|