@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,65 @@
|
|
|
1
|
+
import { notFound } from 'next/navigation'
|
|
2
|
+
import { PageRenderer } from '@/app/components/page-renderer'
|
|
3
|
+
import { PostHeader } from '@/themes/default/entities/posts/components/post-header'
|
|
4
|
+
import { PostsService } from '@/themes/default/entities/posts/posts.service'
|
|
5
|
+
import type { Metadata } from 'next'
|
|
6
|
+
|
|
7
|
+
// Enable ISR with 1 hour revalidation
|
|
8
|
+
export const revalidate = 3600
|
|
9
|
+
|
|
10
|
+
interface PageProps {
|
|
11
|
+
params: Promise<{ slug: string }>
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export async function generateMetadata({ params }: PageProps): Promise<Metadata> {
|
|
15
|
+
const resolvedParams = await params
|
|
16
|
+
const metadata = await PostsService.getPublishedMetadata(resolvedParams.slug)
|
|
17
|
+
|
|
18
|
+
if (!metadata) {
|
|
19
|
+
return {
|
|
20
|
+
title: 'Not Found'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return {
|
|
25
|
+
title: metadata.seoTitle || `${metadata.title} | Blog`,
|
|
26
|
+
description: metadata.seoDescription || metadata.excerpt || undefined,
|
|
27
|
+
openGraph: {
|
|
28
|
+
title: metadata.seoTitle || metadata.title,
|
|
29
|
+
description: metadata.seoDescription || metadata.excerpt || undefined,
|
|
30
|
+
images: metadata.ogImage ? [metadata.ogImage] : metadata.featuredImage ? [metadata.featuredImage] : [],
|
|
31
|
+
type: 'article',
|
|
32
|
+
},
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
async function BlogPostPage({ params }: PageProps) {
|
|
37
|
+
const resolvedParams = await params
|
|
38
|
+
const post = await PostsService.getPublishedBySlug(resolvedParams.slug)
|
|
39
|
+
|
|
40
|
+
if (!post) {
|
|
41
|
+
notFound()
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<div className="min-h-screen bg-background py-8" data-cy="public-posts-page">
|
|
46
|
+
{/* Post Header */}
|
|
47
|
+
<PostHeader post={post} />
|
|
48
|
+
|
|
49
|
+
{/* Post Content (Blocks) */}
|
|
50
|
+
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
51
|
+
<PageRenderer
|
|
52
|
+
page={{
|
|
53
|
+
id: post.id,
|
|
54
|
+
title: post.title,
|
|
55
|
+
slug: post.slug,
|
|
56
|
+
blocks: post.blocks,
|
|
57
|
+
locale: 'en',
|
|
58
|
+
}}
|
|
59
|
+
/>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export default BlogPostPage
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PublicNavbar } from '@nextsparkjs/core/components/app/layouts/PublicNavbar'
|
|
2
|
+
import { PublicFooter } from '@nextsparkjs/core/components/app/layouts/PublicFooter'
|
|
3
|
+
|
|
4
|
+
function PublicLayout({
|
|
5
|
+
children
|
|
6
|
+
}: {
|
|
7
|
+
children: React.ReactNode
|
|
8
|
+
}) {
|
|
9
|
+
return (
|
|
10
|
+
<div className="min-h-screen bg-background flex flex-col">
|
|
11
|
+
{/* Public Navbar */}
|
|
12
|
+
<PublicNavbar />
|
|
13
|
+
|
|
14
|
+
{/* Main Content */}
|
|
15
|
+
<main className="flex-1">
|
|
16
|
+
{children}
|
|
17
|
+
</main>
|
|
18
|
+
|
|
19
|
+
{/* Public Footer */}
|
|
20
|
+
<PublicFooter />
|
|
21
|
+
</div>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default PublicLayout
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import Link from 'next/link'
|
|
4
|
+
import { Button } from '@nextsparkjs/core/components/ui/button'
|
|
5
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@nextsparkjs/core/components/ui/card'
|
|
6
|
+
import { Badge } from '@nextsparkjs/core/components/ui/badge'
|
|
7
|
+
|
|
8
|
+
import { useAuth } from '@nextsparkjs/core/hooks/useAuth'
|
|
9
|
+
import { useTranslations } from 'next-intl'
|
|
10
|
+
import { CheckCircle2, Code2, Database, Lock, Mail, Palette, Zap, Server, Shield, Layers } from 'lucide-react'
|
|
11
|
+
|
|
12
|
+
function Home() {
|
|
13
|
+
const { user, isLoading } = useAuth()
|
|
14
|
+
const t = useTranslations('home')
|
|
15
|
+
|
|
16
|
+
const techStack = [
|
|
17
|
+
{ name: 'Next.js 15', icon: <Zap className="w-4 h-4" />, badge: t('techStack.appRouter') },
|
|
18
|
+
{ name: 'React 19 + TypeScript', icon: <Code2 className="w-4 h-4" />, badge: t('techStack.latest') },
|
|
19
|
+
{ name: 'Better Auth', icon: <Lock className="w-4 h-4" />, badge: t('techStack.secure') },
|
|
20
|
+
{ name: 'PostgreSQL', icon: <Database className="w-4 h-4" />, badge: t('techStack.supabase') },
|
|
21
|
+
{ name: 'TanStack Query', icon: <Server className="w-4 h-4" />, badge: t('techStack.v5') },
|
|
22
|
+
{ name: 'shadcn/ui', icon: <Palette className="w-4 h-4" />, badge: t('techStack.components') },
|
|
23
|
+
{ name: 'React Hook Form + Zod', icon: <Shield className="w-4 h-4" />, badge: t('techStack.validation') },
|
|
24
|
+
{ name: 'Tailwind CSS v4', icon: <Layers className="w-4 h-4" />, badge: t('techStack.styling') },
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
const features = [
|
|
28
|
+
{ name: t('features.emailAuth'), icon: <Mail className="w-4 h-4 text-blue-500" /> },
|
|
29
|
+
{ name: t('features.googleOAuth'), icon: <CheckCircle2 className="w-4 h-4 text-blue-500" /> },
|
|
30
|
+
{ name: t('features.protectedRoutes'), icon: <CheckCircle2 className="w-4 h-4 text-blue-500" /> },
|
|
31
|
+
{ name: t('features.emailVerification'), icon: <CheckCircle2 className="w-4 h-4 text-blue-500" /> },
|
|
32
|
+
{ name: t('features.passwordReset'), icon: <CheckCircle2 className="w-4 h-4 text-blue-500" /> },
|
|
33
|
+
{ name: t('features.entityManagement'), icon: <CheckCircle2 className="w-4 h-4 text-blue-500" /> },
|
|
34
|
+
{ name: t('features.pluginSystem'), icon: <CheckCircle2 className="w-4 h-4 text-blue-500" /> },
|
|
35
|
+
{ name: t('features.themeSupport'), icon: <CheckCircle2 className="w-4 h-4 text-blue-500" /> },
|
|
36
|
+
{ name: t('features.i18nSystem'), icon: <CheckCircle2 className="w-4 h-4 text-blue-500" /> },
|
|
37
|
+
{ name: t('features.apiRoutes'), icon: <CheckCircle2 className="w-4 h-4 text-blue-500" /> },
|
|
38
|
+
{ name: t('features.colorMode'), icon: <CheckCircle2 className="w-4 h-4 text-blue-500" /> },
|
|
39
|
+
{ name: t('features.aiIntegration'), icon: <CheckCircle2 className="w-4 h-4 text-blue-500" />, badge: 'Coming Soon' },
|
|
40
|
+
{ name: t('features.teams'), icon: <CheckCircle2 className="w-4 h-4 text-blue-500" />, badge: 'Coming Soon' },
|
|
41
|
+
{ name: t('features.memberships'), icon: <CheckCircle2 className="w-4 h-4 text-blue-500" />, badge: 'Coming Soon' },
|
|
42
|
+
{ name: t('features.amplitude'), icon: <CheckCircle2 className="w-4 h-4 text-blue-500" />, badge: 'Coming Soon' },
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<div className="min-h-screen bg-gradient-to-b from-background to-muted/20">
|
|
47
|
+
<div className="container max-w-7xl mx-auto px-4 py-16">
|
|
48
|
+
{/* Hero Section */}
|
|
49
|
+
<div className="text-center mb-16">
|
|
50
|
+
<Badge variant="secondary" className="mb-4">
|
|
51
|
+
{t('hero.badge')}
|
|
52
|
+
</Badge>
|
|
53
|
+
<h1 className="text-6xl font-bold bg-gradient-to-r from-primary to-primary/60 bg-clip-text text-transparent mb-4">
|
|
54
|
+
{t('hero.title')}
|
|
55
|
+
</h1>
|
|
56
|
+
<p className="text-xl text-muted-foreground max-w-2xl mx-auto">
|
|
57
|
+
{t('hero.description')}
|
|
58
|
+
</p>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
{/* Auth Section */}
|
|
62
|
+
{!isLoading && (
|
|
63
|
+
<Card className="mb-12 border-2">
|
|
64
|
+
<CardContent className="p-8">
|
|
65
|
+
{user ? (
|
|
66
|
+
<div className="text-center space-y-4">
|
|
67
|
+
<div className="inline-flex items-center gap-2 px-4 py-2 bg-primary/10 rounded-full">
|
|
68
|
+
<div className="w-2 h-2 bg-green-500 rounded-full animate-pulse" />
|
|
69
|
+
<span className="text-sm font-medium">{t('auth.authenticated')}</span>
|
|
70
|
+
</div>
|
|
71
|
+
<p className="text-lg">
|
|
72
|
+
{t('auth.welcomeBack', { email: user.email })}
|
|
73
|
+
</p>
|
|
74
|
+
<Link href="/dashboard">
|
|
75
|
+
<Button size="lg" className="gap-2">
|
|
76
|
+
<Layers className="w-4 h-4" />
|
|
77
|
+
{t('auth.goToDashboard')}
|
|
78
|
+
</Button>
|
|
79
|
+
</Link>
|
|
80
|
+
</div>
|
|
81
|
+
) : (
|
|
82
|
+
<div className="text-center space-y-6">
|
|
83
|
+
<h2 className="text-2xl font-semibold">{t('auth.getStarted')}</h2>
|
|
84
|
+
<p className="text-muted-foreground">
|
|
85
|
+
{t('auth.experience')}
|
|
86
|
+
</p>
|
|
87
|
+
<div className="flex justify-center gap-4">
|
|
88
|
+
<Link href="/signup">
|
|
89
|
+
<Button size="lg" className="gap-2">
|
|
90
|
+
<Zap className="w-4 h-4" />
|
|
91
|
+
{t('auth.createAccount')}
|
|
92
|
+
</Button>
|
|
93
|
+
</Link>
|
|
94
|
+
<Link href="/login">
|
|
95
|
+
<Button size="lg" variant="outline" className="gap-2">
|
|
96
|
+
<Lock className="w-4 h-4" />
|
|
97
|
+
{t('auth.signIn')}
|
|
98
|
+
</Button>
|
|
99
|
+
</Link>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
)}
|
|
103
|
+
</CardContent>
|
|
104
|
+
</Card>
|
|
105
|
+
)}
|
|
106
|
+
|
|
107
|
+
{/* Tech Stack & Features Grid */}
|
|
108
|
+
<div className="grid lg:grid-cols-2 gap-8">
|
|
109
|
+
<Card>
|
|
110
|
+
<CardHeader>
|
|
111
|
+
<CardTitle className="flex items-center gap-2">
|
|
112
|
+
<Code2 className="w-5 h-5" />
|
|
113
|
+
{t('techStack.title')}
|
|
114
|
+
</CardTitle>
|
|
115
|
+
<CardDescription>
|
|
116
|
+
{t('techStack.description')}
|
|
117
|
+
</CardDescription>
|
|
118
|
+
</CardHeader>
|
|
119
|
+
<CardContent>
|
|
120
|
+
<div className="space-y-3">
|
|
121
|
+
{techStack.map((tech, index) => (
|
|
122
|
+
<div key={index} className="flex items-center justify-between p-3 rounded-lg bg-muted/50 hover:bg-muted transition-colors">
|
|
123
|
+
<div className="flex items-center gap-3">
|
|
124
|
+
{tech.icon}
|
|
125
|
+
<span className="font-medium">{tech.name}</span>
|
|
126
|
+
</div>
|
|
127
|
+
<Badge variant="outline">{tech.badge}</Badge>
|
|
128
|
+
</div>
|
|
129
|
+
))}
|
|
130
|
+
</div>
|
|
131
|
+
</CardContent>
|
|
132
|
+
</Card>
|
|
133
|
+
|
|
134
|
+
<Card>
|
|
135
|
+
<CardHeader>
|
|
136
|
+
<CardTitle className="flex items-center gap-2">
|
|
137
|
+
<Zap className="w-5 h-5" />
|
|
138
|
+
{t('features.title')}
|
|
139
|
+
</CardTitle>
|
|
140
|
+
<CardDescription>
|
|
141
|
+
{t('features.description')}
|
|
142
|
+
</CardDescription>
|
|
143
|
+
</CardHeader>
|
|
144
|
+
<CardContent>
|
|
145
|
+
<div className="grid grid-cols-2 gap-3">
|
|
146
|
+
{features.map((feature, index) => (
|
|
147
|
+
<div key={index} className="flex items-center justify-between gap-2 p-3 rounded-lg bg-muted/50">
|
|
148
|
+
<div className="flex items-center gap-2">
|
|
149
|
+
{feature.icon}
|
|
150
|
+
<span className="text-sm font-medium">{feature.name}</span>
|
|
151
|
+
</div>
|
|
152
|
+
{feature.badge && (
|
|
153
|
+
<Badge variant="secondary" className="text-xs whitespace-nowrap">
|
|
154
|
+
{feature.badge}
|
|
155
|
+
</Badge>
|
|
156
|
+
)}
|
|
157
|
+
</div>
|
|
158
|
+
))}
|
|
159
|
+
</div>
|
|
160
|
+
</CardContent>
|
|
161
|
+
</Card>
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
{/* Call to Action for Public */}
|
|
165
|
+
{!user && (
|
|
166
|
+
<Card className="mt-8 bg-gradient-to-r from-primary/10 to-primary/5 border-primary/20">
|
|
167
|
+
<CardContent className="p-8 text-center">
|
|
168
|
+
<h2 className="text-2xl font-bold mb-4">{t('cta.readyToStart')}</h2>
|
|
169
|
+
<p className="text-muted-foreground mb-6 max-w-2xl mx-auto">
|
|
170
|
+
{t('cta.description')}
|
|
171
|
+
</p>
|
|
172
|
+
<div className="flex justify-center gap-4">
|
|
173
|
+
<Link href="/pricing">
|
|
174
|
+
<Button size="lg" variant="outline" className="gap-2">
|
|
175
|
+
<Palette className="w-4 h-4" />
|
|
176
|
+
{t('cta.viewPricing')}
|
|
177
|
+
</Button>
|
|
178
|
+
</Link>
|
|
179
|
+
<Link href="/signup">
|
|
180
|
+
<Button size="lg" className="gap-2">
|
|
181
|
+
<Zap className="w-4 h-4" />
|
|
182
|
+
{t('cta.startFreeTrial')}
|
|
183
|
+
</Button>
|
|
184
|
+
</Link>
|
|
185
|
+
</div>
|
|
186
|
+
</CardContent>
|
|
187
|
+
</Card>
|
|
188
|
+
)}
|
|
189
|
+
|
|
190
|
+
{/* Footer */}
|
|
191
|
+
<div className="mt-16 text-center text-sm text-muted-foreground">
|
|
192
|
+
<p>{t('footer.builtWith')}</p>
|
|
193
|
+
<p className="mt-2">{t('footer.readyForProduction')}</p>
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
)
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export default Home
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@nextsparkjs/core/components/ui/card'
|
|
2
|
+
import { Badge } from '@nextsparkjs/core/components/ui/badge'
|
|
3
|
+
import { Separator } from '@nextsparkjs/core/components/ui/separator'
|
|
4
|
+
import { Button } from '@nextsparkjs/core/components/ui/button'
|
|
5
|
+
import {
|
|
6
|
+
BookOpen,
|
|
7
|
+
MessageCircle,
|
|
8
|
+
Mail,
|
|
9
|
+
ExternalLink,
|
|
10
|
+
Shield,
|
|
11
|
+
Settings,
|
|
12
|
+
User,
|
|
13
|
+
CreditCard,
|
|
14
|
+
HelpCircle,
|
|
15
|
+
CheckCircle2
|
|
16
|
+
} from 'lucide-react'
|
|
17
|
+
import Link from 'next/link'
|
|
18
|
+
|
|
19
|
+
function SupportPage() {
|
|
20
|
+
const quickLinks = [
|
|
21
|
+
{
|
|
22
|
+
title: "Getting Started",
|
|
23
|
+
description: "Learn the basics of using our platform",
|
|
24
|
+
icon: <BookOpen className="h-6 w-6" />,
|
|
25
|
+
items: [
|
|
26
|
+
"Creating your account",
|
|
27
|
+
"Setting up your profile",
|
|
28
|
+
"First steps tutorial",
|
|
29
|
+
"Understanding the dashboard"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
title: "Account Management",
|
|
34
|
+
description: "Manage your account settings and preferences",
|
|
35
|
+
icon: <User className="h-6 w-6" />,
|
|
36
|
+
items: [
|
|
37
|
+
"Profile settings",
|
|
38
|
+
"Password management",
|
|
39
|
+
"Email preferences",
|
|
40
|
+
"Account deletion"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
title: "Security & Privacy",
|
|
45
|
+
description: "Keep your account safe and secure",
|
|
46
|
+
icon: <Shield className="h-6 w-6" />,
|
|
47
|
+
items: [
|
|
48
|
+
"Two-factor authentication",
|
|
49
|
+
"Privacy settings",
|
|
50
|
+
"Data protection",
|
|
51
|
+
"Security best practices"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
title: "Billing & Subscriptions",
|
|
56
|
+
description: "Manage your payments and subscriptions",
|
|
57
|
+
icon: <CreditCard className="h-6 w-6" />,
|
|
58
|
+
items: [
|
|
59
|
+
"Payment methods",
|
|
60
|
+
"Subscription plans",
|
|
61
|
+
"Billing history",
|
|
62
|
+
"Refund policy"
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
|
|
67
|
+
const features = [
|
|
68
|
+
{
|
|
69
|
+
category: "Dashboard Features",
|
|
70
|
+
icon: <Settings className="h-5 w-5" />,
|
|
71
|
+
items: [
|
|
72
|
+
{
|
|
73
|
+
name: "Task Management",
|
|
74
|
+
description: "Create, edit, and organize your tasks efficiently",
|
|
75
|
+
status: "Available"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "Real-time Notifications",
|
|
79
|
+
description: "Get instant updates about important events",
|
|
80
|
+
status: "Available"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: "Dark/Light Mode",
|
|
84
|
+
description: "Switch between themes for comfortable viewing",
|
|
85
|
+
status: "Available"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "Mobile Responsive",
|
|
89
|
+
description: "Access your account from any device",
|
|
90
|
+
status: "Available"
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
category: "Account Settings",
|
|
96
|
+
icon: <User className="h-5 w-5" />,
|
|
97
|
+
items: [
|
|
98
|
+
{
|
|
99
|
+
name: "Profile Management",
|
|
100
|
+
description: "Update your personal information and preferences",
|
|
101
|
+
status: "Available"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: "Password Security",
|
|
105
|
+
description: "Change password and manage security settings",
|
|
106
|
+
status: "Available"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: "Notification Settings",
|
|
110
|
+
description: "Control how and when you receive notifications",
|
|
111
|
+
status: "Available"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: "Privacy Controls",
|
|
115
|
+
description: "Manage your data privacy and visibility settings",
|
|
116
|
+
status: "Available"
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
|
|
122
|
+
const faqs = [
|
|
123
|
+
{
|
|
124
|
+
question: "¿Cómo puedo cambiar mi contraseña?",
|
|
125
|
+
answer: "Ve a Dashboard > Settings > Password. Ingresa tu contraseña actual y luego la nueva contraseña dos veces para confirmarla."
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
question: "¿Puedo cambiar mi tema a modo oscuro?",
|
|
129
|
+
answer: "Sí! Usa el botón de luna/sol en la esquina superior derecha de cualquier página para alternar entre modo claro y oscuro."
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
question: "¿Cómo administro mis tareas?",
|
|
133
|
+
answer: "Ve a Dashboard > Tasks para ver, crear, editar y eliminar tus tareas. Puedes marcarlas como completadas haciendo clic en el checkbox."
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
question: "¿Dónde configuro mis notificaciones?",
|
|
137
|
+
answer: "En Dashboard > Settings > Notifications puedes controlar qué tipos de notificaciones quieres recibir y cómo."
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
question: "¿Cómo contacto soporte técnico?",
|
|
141
|
+
answer: "Puedes contactarnos a través del email support@boilerplate.com o usando el chat en vivo durante horarios de oficina."
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
question: "¿Mis datos están seguros?",
|
|
145
|
+
answer: "Sí, usamos encriptación de nivel empresarial y seguimos las mejores prácticas de seguridad para proteger tu información."
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
|
|
149
|
+
const contactOptions = [
|
|
150
|
+
{
|
|
151
|
+
title: "Email Support",
|
|
152
|
+
description: "Get help via email within 24 hours",
|
|
153
|
+
icon: <Mail className="h-6 w-6" />,
|
|
154
|
+
action: "support@boilerplate.com",
|
|
155
|
+
link: "mailto:support@boilerplate.com"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
title: "Live Chat",
|
|
159
|
+
description: "Chat with our support team",
|
|
160
|
+
icon: <MessageCircle className="h-6 w-6" />,
|
|
161
|
+
action: "Start Chat",
|
|
162
|
+
link: "#"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
title: "Documentation",
|
|
166
|
+
description: "Browse our complete documentation",
|
|
167
|
+
icon: <BookOpen className="h-6 w-6" />,
|
|
168
|
+
action: "View Docs",
|
|
169
|
+
link: "/docs"
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
|
|
173
|
+
return (
|
|
174
|
+
<div className="container max-w-7xl mx-auto px-4 py-8">
|
|
175
|
+
{/* Hero Section */}
|
|
176
|
+
<div className="text-center mb-12">
|
|
177
|
+
<div className="inline-flex items-center gap-2 bg-primary/10 text-primary px-3 py-1 rounded-full text-sm font-medium mb-4">
|
|
178
|
+
<HelpCircle className="h-4 w-4" />
|
|
179
|
+
Support Center
|
|
180
|
+
</div>
|
|
181
|
+
<h1 className="text-4xl font-bold mb-4">
|
|
182
|
+
¿Cómo podemos ayudarte?
|
|
183
|
+
</h1>
|
|
184
|
+
<p className="text-xl text-muted-foreground max-w-2xl mx-auto">
|
|
185
|
+
Encuentra respuestas a tus preguntas, aprende a usar la plataforma y contacta nuestro equipo de soporte.
|
|
186
|
+
</p>
|
|
187
|
+
</div>
|
|
188
|
+
|
|
189
|
+
{/* Quick Start Guide */}
|
|
190
|
+
<div className="mb-12">
|
|
191
|
+
<h2 className="text-2xl font-bold mb-6">Guías de Inicio Rápido</h2>
|
|
192
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
193
|
+
{quickLinks.map((section, index) => (
|
|
194
|
+
<Card key={index} className="h-full">
|
|
195
|
+
<CardHeader>
|
|
196
|
+
<div className="flex items-center gap-3">
|
|
197
|
+
<div className="p-2 bg-primary/10 rounded-lg text-primary">
|
|
198
|
+
{section.icon}
|
|
199
|
+
</div>
|
|
200
|
+
<div>
|
|
201
|
+
<CardTitle className="text-lg">{section.title}</CardTitle>
|
|
202
|
+
<CardDescription>{section.description}</CardDescription>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
</CardHeader>
|
|
206
|
+
<CardContent>
|
|
207
|
+
<ul className="space-y-2">
|
|
208
|
+
{section.items.map((item, itemIndex) => (
|
|
209
|
+
<li key={itemIndex} className="flex items-center gap-2 text-sm">
|
|
210
|
+
<CheckCircle2 className="h-4 w-4 text-green-500" />
|
|
211
|
+
{item}
|
|
212
|
+
</li>
|
|
213
|
+
))}
|
|
214
|
+
</ul>
|
|
215
|
+
</CardContent>
|
|
216
|
+
</Card>
|
|
217
|
+
))}
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
|
|
221
|
+
{/* Features Documentation */}
|
|
222
|
+
<div className="mb-12">
|
|
223
|
+
<h2 className="text-2xl font-bold mb-6">Funcionalidades Disponibles</h2>
|
|
224
|
+
<div className="space-y-6">
|
|
225
|
+
{features.map((category, index) => (
|
|
226
|
+
<Card key={index}>
|
|
227
|
+
<CardHeader>
|
|
228
|
+
<div className="flex items-center gap-3">
|
|
229
|
+
<div className="p-2 bg-blue-500/10 rounded-lg text-blue-600">
|
|
230
|
+
{category.icon}
|
|
231
|
+
</div>
|
|
232
|
+
<CardTitle>{category.category}</CardTitle>
|
|
233
|
+
</div>
|
|
234
|
+
</CardHeader>
|
|
235
|
+
<CardContent>
|
|
236
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
237
|
+
{category.items.map((feature, featureIndex) => (
|
|
238
|
+
<div key={featureIndex} className="flex items-start gap-3 p-3 rounded-lg border">
|
|
239
|
+
<CheckCircle2 className="h-5 w-5 text-green-500 mt-0.5" />
|
|
240
|
+
<div className="flex-1">
|
|
241
|
+
<div className="flex items-center gap-2 mb-1">
|
|
242
|
+
<h4 className="font-medium">{feature.name}</h4>
|
|
243
|
+
<Badge variant="secondary" className="text-xs">
|
|
244
|
+
{feature.status}
|
|
245
|
+
</Badge>
|
|
246
|
+
</div>
|
|
247
|
+
<p className="text-sm text-muted-foreground">
|
|
248
|
+
{feature.description}
|
|
249
|
+
</p>
|
|
250
|
+
</div>
|
|
251
|
+
</div>
|
|
252
|
+
))}
|
|
253
|
+
</div>
|
|
254
|
+
</CardContent>
|
|
255
|
+
</Card>
|
|
256
|
+
))}
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
|
|
260
|
+
{/* FAQ Section */}
|
|
261
|
+
<div className="mb-12">
|
|
262
|
+
<h2 className="text-2xl font-bold mb-6">Preguntas Frecuentes</h2>
|
|
263
|
+
<div className="space-y-4">
|
|
264
|
+
{faqs.map((faq, index) => (
|
|
265
|
+
<Card key={index}>
|
|
266
|
+
<CardHeader>
|
|
267
|
+
<CardTitle className="text-lg">{faq.question}</CardTitle>
|
|
268
|
+
</CardHeader>
|
|
269
|
+
<CardContent>
|
|
270
|
+
<p className="text-muted-foreground">{faq.answer}</p>
|
|
271
|
+
</CardContent>
|
|
272
|
+
</Card>
|
|
273
|
+
))}
|
|
274
|
+
</div>
|
|
275
|
+
</div>
|
|
276
|
+
|
|
277
|
+
{/* Contact Support */}
|
|
278
|
+
<div className="mb-8">
|
|
279
|
+
<h2 className="text-2xl font-bold mb-6">¿Necesitas más ayuda?</h2>
|
|
280
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
|
|
281
|
+
{contactOptions.map((option, index) => (
|
|
282
|
+
<Card key={index} className="text-center">
|
|
283
|
+
<CardHeader>
|
|
284
|
+
<div className="flex justify-center mb-3">
|
|
285
|
+
<div className="p-3 bg-primary/10 rounded-full text-primary">
|
|
286
|
+
{option.icon}
|
|
287
|
+
</div>
|
|
288
|
+
</div>
|
|
289
|
+
<CardTitle className="text-lg">{option.title}</CardTitle>
|
|
290
|
+
<CardDescription>{option.description}</CardDescription>
|
|
291
|
+
</CardHeader>
|
|
292
|
+
<CardContent>
|
|
293
|
+
<Button asChild className="w-full">
|
|
294
|
+
<Link href={option.link} target={option.link.startsWith('http') ? '_blank' : undefined}>
|
|
295
|
+
{option.action}
|
|
296
|
+
{option.link.startsWith('http') && <ExternalLink className="ml-2 h-4 w-4" />}
|
|
297
|
+
</Link>
|
|
298
|
+
</Button>
|
|
299
|
+
</CardContent>
|
|
300
|
+
</Card>
|
|
301
|
+
))}
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
|
|
305
|
+
{/* Back to App */}
|
|
306
|
+
<div className="text-center">
|
|
307
|
+
<Separator className="mb-6" />
|
|
308
|
+
<p className="text-muted-foreground mb-4">
|
|
309
|
+
¿Listo para continuar usando la aplicación?
|
|
310
|
+
</p>
|
|
311
|
+
<Button asChild>
|
|
312
|
+
<Link href="/dashboard">
|
|
313
|
+
Volver al Dashboard
|
|
314
|
+
</Link>
|
|
315
|
+
</Button>
|
|
316
|
+
</div>
|
|
317
|
+
</div>
|
|
318
|
+
)
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export default SupportPage
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { ChatPanel, ORCHESTRATOR_AGENT_BADGES } from '@/themes/default/components/ai-chat/ChatPanel'
|
|
4
|
+
import { useOrchestratorChat } from '@/themes/default/lib/hooks/useOrchestratorChat'
|
|
5
|
+
import { Sparkles } from 'lucide-react'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* AI Orchestrator Test Page
|
|
9
|
+
*
|
|
10
|
+
* This page demonstrates the multi-agent orchestrator pattern.
|
|
11
|
+
* Messages are routed to specialized agents based on intent:
|
|
12
|
+
* - Task Agent: manages tasks, to-dos, deadlines
|
|
13
|
+
* - Customer Agent: manages customers, accounts, sales
|
|
14
|
+
* - Page Agent: manages pages, blocks, content
|
|
15
|
+
*/
|
|
16
|
+
export default function AiOrchestratorTemplate() {
|
|
17
|
+
const {
|
|
18
|
+
messages,
|
|
19
|
+
input,
|
|
20
|
+
setInput,
|
|
21
|
+
isLoading,
|
|
22
|
+
sendMessage,
|
|
23
|
+
clearChat,
|
|
24
|
+
error,
|
|
25
|
+
sessionId,
|
|
26
|
+
} = useOrchestratorChat()
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<ChatPanel
|
|
30
|
+
cyPrefix="orchestrator-chat"
|
|
31
|
+
messages={messages}
|
|
32
|
+
input={input}
|
|
33
|
+
onInputChange={setInput}
|
|
34
|
+
onSend={sendMessage}
|
|
35
|
+
isLoading={isLoading}
|
|
36
|
+
error={error}
|
|
37
|
+
sessionId={sessionId}
|
|
38
|
+
showSessionDebug
|
|
39
|
+
agentBadges={ORCHESTRATOR_AGENT_BADGES}
|
|
40
|
+
showAgentLegend
|
|
41
|
+
header={{
|
|
42
|
+
title: 'AI Orchestrator Test',
|
|
43
|
+
subtitle: 'Multi-agent routing: Tasks, Customers, Pages',
|
|
44
|
+
icon: Sparkles,
|
|
45
|
+
iconClassName: 'bg-amber-100 dark:bg-amber-900/30',
|
|
46
|
+
showClearButton: true,
|
|
47
|
+
onClear: clearChat,
|
|
48
|
+
}}
|
|
49
|
+
emptyState={{
|
|
50
|
+
icon: Sparkles,
|
|
51
|
+
title: 'Test the Orchestrator',
|
|
52
|
+
description: 'Try these examples:',
|
|
53
|
+
suggestions: [
|
|
54
|
+
'Show me my pending tasks',
|
|
55
|
+
'List all customers',
|
|
56
|
+
'Create a landing page for Product X',
|
|
57
|
+
'Hello!',
|
|
58
|
+
'Create something new',
|
|
59
|
+
],
|
|
60
|
+
}}
|
|
61
|
+
/>
|
|
62
|
+
)
|
|
63
|
+
}
|