@cogito.ai/cli 0.4.2 → 0.4.3

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 (101) hide show
  1. package/README.md +29 -22
  2. package/dist/index.js +9 -15
  3. package/dist/templates/web-nextjs/.github/copilot-instructions.md +5 -6
  4. package/dist/templates/web-nextjs/README.md +25 -24
  5. package/dist/templates/web-nextjs/apps/docs/.source/browser.ts +18 -8
  6. package/dist/templates/web-nextjs/apps/docs/.source/dynamic.ts +11 -5
  7. package/dist/templates/web-nextjs/apps/docs/.source/server.ts +37 -17
  8. package/dist/templates/web-nextjs/apps/docs/app/docs/[[...slug]]/page.tsx +1 -6
  9. package/dist/templates/web-nextjs/apps/docs/app/docs/layout.tsx +1 -4
  10. package/dist/templates/web-nextjs/apps/docs/app/llms-full.txt/route.ts +3 -1
  11. package/dist/templates/web-nextjs/apps/docs/next-env.d.ts +1 -1
  12. package/dist/templates/web-nextjs/apps/web/.github/copilot-instructions.md +53 -6
  13. package/dist/templates/web-nextjs/apps/web/.github/skills/impeccable/SKILL.md +55 -0
  14. package/dist/templates/web-nextjs/apps/web/DESIGN.md +65 -0
  15. package/dist/templates/web-nextjs/apps/web/messages/en.json +81 -5
  16. package/dist/templates/web-nextjs/apps/web/messages/zh.json +81 -5
  17. package/dist/templates/web-nextjs/apps/web/next.config.ts +3 -3
  18. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(auth)/forgot-password/page.tsx +174 -39
  19. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(auth)/login/page.tsx +13 -3
  20. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(auth)/reset-password/page.tsx +4 -1
  21. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(auth)/signup/page.tsx +18 -17
  22. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(protected)/dashboard/page.tsx +1 -5
  23. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(protected)/settings/layout.tsx +1 -5
  24. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(protected)/settings/profile/page.tsx +2 -8
  25. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/about/page.tsx +3 -6
  26. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/globals.css +17 -5
  27. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/help/page.tsx +1 -5
  28. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/layout.tsx +10 -8
  29. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/page.tsx +22 -6
  30. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/privacy/page.tsx +3 -6
  31. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/terms/page.tsx +1 -5
  32. package/dist/templates/web-nextjs/apps/web/src/app/auth/callback/route.ts +2 -3
  33. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/app-sidebar.tsx +13 -16
  34. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/chart-area-interactive.tsx +122 -146
  35. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/data-table.tsx +84 -149
  36. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/nav-documents.tsx +7 -16
  37. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/nav-main.tsx +4 -4
  38. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/nav-secondary.tsx +4 -4
  39. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/nav-user.tsx +12 -21
  40. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/page.tsx +10 -13
  41. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/section-cards.tsx +5 -9
  42. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/site-header.tsx +6 -7
  43. package/dist/templates/web-nextjs/apps/web/src/components/landing/features.tsx +63 -0
  44. package/dist/templates/web-nextjs/apps/web/src/components/landing/footer.tsx +48 -0
  45. package/dist/templates/web-nextjs/apps/web/src/components/landing/header.tsx +97 -0
  46. package/dist/templates/web-nextjs/apps/web/src/components/landing/hero.tsx +45 -0
  47. package/dist/templates/web-nextjs/apps/web/src/components/landing/how-it-works.tsx +35 -0
  48. package/dist/templates/web-nextjs/apps/web/src/components/landing/pricing-teaser.tsx +23 -0
  49. package/dist/templates/web-nextjs/apps/web/src/components/profile/profile-form.tsx +6 -4
  50. package/dist/templates/web-nextjs/apps/web/src/components/providers/theme-provider.tsx +16 -0
  51. package/dist/templates/web-nextjs/apps/web/src/components/ui/alert-dialog.tsx +32 -49
  52. package/dist/templates/web-nextjs/apps/web/src/components/ui/alert.tsx +16 -23
  53. package/dist/templates/web-nextjs/apps/web/src/components/ui/avatar.tsx +25 -38
  54. package/dist/templates/web-nextjs/apps/web/src/components/ui/badge.tsx +16 -18
  55. package/dist/templates/web-nextjs/apps/web/src/components/ui/breadcrumb.tsx +19 -26
  56. package/dist/templates/web-nextjs/apps/web/src/components/ui/button.tsx +23 -24
  57. package/dist/templates/web-nextjs/apps/web/src/components/ui/card.tsx +19 -36
  58. package/dist/templates/web-nextjs/apps/web/src/components/ui/chart.tsx +60 -94
  59. package/dist/templates/web-nextjs/apps/web/src/components/ui/checkbox.tsx +8 -11
  60. package/dist/templates/web-nextjs/apps/web/src/components/ui/collapsible.tsx +5 -17
  61. package/dist/templates/web-nextjs/apps/web/src/components/ui/command.tsx +25 -48
  62. package/dist/templates/web-nextjs/apps/web/src/components/ui/dialog.tsx +21 -35
  63. package/dist/templates/web-nextjs/apps/web/src/components/ui/drawer.tsx +24 -35
  64. package/dist/templates/web-nextjs/apps/web/src/components/ui/dropdown-menu.tsx +26 -55
  65. package/dist/templates/web-nextjs/apps/web/src/components/ui/field.tsx +62 -76
  66. package/dist/templates/web-nextjs/apps/web/src/components/ui/form.tsx +19 -34
  67. package/dist/templates/web-nextjs/apps/web/src/components/ui/input-otp.tsx +13 -20
  68. package/dist/templates/web-nextjs/apps/web/src/components/ui/input.tsx +6 -6
  69. package/dist/templates/web-nextjs/apps/web/src/components/ui/label.tsx +6 -6
  70. package/dist/templates/web-nextjs/apps/web/src/components/ui/pagination.tsx +21 -42
  71. package/dist/templates/web-nextjs/apps/web/src/components/ui/popover.tsx +16 -31
  72. package/dist/templates/web-nextjs/apps/web/src/components/ui/progress.tsx +5 -8
  73. package/dist/templates/web-nextjs/apps/web/src/components/ui/radio-group.tsx +8 -8
  74. package/dist/templates/web-nextjs/apps/web/src/components/ui/scroll-area.tsx +10 -12
  75. package/dist/templates/web-nextjs/apps/web/src/components/ui/select.tsx +26 -41
  76. package/dist/templates/web-nextjs/apps/web/src/components/ui/separator.tsx +7 -7
  77. package/dist/templates/web-nextjs/apps/web/src/components/ui/sheet.tsx +29 -38
  78. package/dist/templates/web-nextjs/apps/web/src/components/ui/sidebar.tsx +157 -189
  79. package/dist/templates/web-nextjs/apps/web/src/components/ui/skeleton.tsx +3 -3
  80. package/dist/templates/web-nextjs/apps/web/src/components/ui/slider.tsx +10 -15
  81. package/dist/templates/web-nextjs/apps/web/src/components/ui/sonner.tsx +13 -7
  82. package/dist/templates/web-nextjs/apps/web/src/components/ui/switch.tsx +9 -9
  83. package/dist/templates/web-nextjs/apps/web/src/components/ui/table.tsx +24 -48
  84. package/dist/templates/web-nextjs/apps/web/src/components/ui/tabs.tsx +21 -31
  85. package/dist/templates/web-nextjs/apps/web/src/components/ui/textarea.tsx +5 -5
  86. package/dist/templates/web-nextjs/apps/web/src/components/ui/theme-toggle.tsx +23 -0
  87. package/dist/templates/web-nextjs/apps/web/src/components/ui/toggle-group.tsx +15 -16
  88. package/dist/templates/web-nextjs/apps/web/src/components/ui/toggle.tsx +14 -15
  89. package/dist/templates/web-nextjs/apps/web/src/components/ui/tooltip.tsx +8 -12
  90. package/dist/templates/web-nextjs/apps/web/src/core/repositories/IAuthRepository.ts +2 -0
  91. package/dist/templates/web-nextjs/apps/web/src/core/types/auth.ts +1 -3
  92. package/dist/templates/web-nextjs/apps/web/src/features/auth/actions.ts +57 -1
  93. package/dist/templates/web-nextjs/apps/web/src/features/auth/index.ts +2 -0
  94. package/dist/templates/web-nextjs/apps/web/src/hooks/use-mobile.ts +4 -4
  95. package/dist/templates/web-nextjs/apps/web/src/i18n/config.ts +1 -1
  96. package/dist/templates/web-nextjs/apps/web/src/infra/db/SupabaseAuthRepository.ts +48 -4
  97. package/dist/templates/web-nextjs/apps/web/src/infra/db/client.ts +1 -4
  98. package/dist/templates/web-nextjs/apps/web/src/lib/utils.ts +2 -2
  99. package/dist/templates/web-nextjs/apps/web/src/lib/validations/auth.ts +13 -0
  100. package/dist/templates/web-nextjs/apps/web/src/styles/tokens.css +58 -0
  101. package/package.json +1 -1
@@ -7,11 +7,7 @@ import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'
7
7
  import { Button } from '@/components/ui/button'
8
8
  import { Separator } from '@/components/ui/separator'
9
9
 
10
- export default async function ProfilePage({
11
- params,
12
- }: {
13
- params: Promise<{ locale: string }>
14
- }) {
10
+ export default async function ProfilePage({ params }: { params: Promise<{ locale: string }> }) {
15
11
  const { locale } = await params
16
12
  const user = await getCurrentUser()
17
13
 
@@ -49,9 +45,7 @@ export default async function ProfilePage({
49
45
  <p className="text-sm text-muted-foreground">{email}</p>
50
46
  </div>
51
47
  </div>
52
- <p className="text-sm text-muted-foreground">
53
- Avatar upload feature coming soon.
54
- </p>
48
+ <p className="text-sm text-muted-foreground">Avatar upload feature coming soon.</p>
55
49
  </CardContent>
56
50
  </Card>
57
51
 
@@ -1,10 +1,6 @@
1
1
  import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
2
2
 
3
- export default async function AboutPage({
4
- params,
5
- }: {
6
- params: Promise<{ locale: string }>
7
- }) {
3
+ export default async function AboutPage({ params }: { params: Promise<{ locale: string }> }) {
8
4
  const { locale } = await params
9
5
 
10
6
  return (
@@ -16,7 +12,8 @@ export default async function AboutPage({
16
12
  </CardHeader>
17
13
  <CardContent>
18
14
  <p className="text-muted-foreground">
19
- This page is a placeholder. Replace it with your actual about information before shipping.
15
+ This page is a placeholder. Replace it with your actual about information before
16
+ shipping.
20
17
  </p>
21
18
  </CardContent>
22
19
  </Card>
@@ -1,12 +1,24 @@
1
1
  @import "../../styles/tw-animate.css";
2
2
  @import "../../styles/shadcn-tailwind.css";
3
3
  @import "tailwindcss";
4
+ @import "../../styles/tokens.css";
4
5
 
5
6
  @custom-variant dark (&:is(.dark *));
6
7
 
7
8
  @theme inline {
8
- --font-heading: var(--font-sans);
9
+ --font-heading: var(--font-geist, var(--font-sans));
9
10
  --font-sans: var(--font-sans);
11
+
12
+ /* Semantic tokens registered as Tailwind utilities */
13
+ --color-surface: var(--color-surface);
14
+ --color-surface-elevated: var(--color-surface-elevated);
15
+ --color-muted-custom: var(--color-muted);
16
+ --color-muted-foreground-custom: var(--color-muted-foreground);
17
+ --color-border-custom: var(--color-border);
18
+ --color-primary-custom: var(--color-primary);
19
+ --color-primary-foreground-custom: var(--color-primary-foreground);
20
+
21
+ /* shadcn/ui tokens */
10
22
  --color-sidebar-ring: var(--sidebar-ring);
11
23
  --color-sidebar-border: var(--sidebar-border);
12
24
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
@@ -119,11 +131,11 @@
119
131
  @layer base {
120
132
  * {
121
133
  @apply border-border outline-ring/50;
122
- }
134
+ }
123
135
  body {
124
136
  @apply bg-background text-foreground;
125
- }
137
+ }
126
138
  html {
127
139
  @apply font-sans;
128
- }
129
- }
140
+ }
141
+ }
@@ -1,10 +1,6 @@
1
1
  import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
2
2
 
3
- export default async function HelpPage({
4
- params,
5
- }: {
6
- params: Promise<{ locale: string }>
7
- }) {
3
+ export default async function HelpPage({ params }: { params: Promise<{ locale: string }> }) {
8
4
  const { locale } = await params
9
5
 
10
6
  return (
@@ -1,15 +1,17 @@
1
1
  import type { Metadata } from 'next'
2
- import { Inter } from 'next/font/google'
2
+ import { Geist } from 'next/font/google'
3
3
  import { NextIntlClientProvider } from 'next-intl'
4
4
  import { getMessages } from 'next-intl/server'
5
5
  import { notFound } from 'next/navigation'
6
6
  import { Toaster } from '@/components/ui/sonner'
7
+ import { ThemeProvider } from '@/components/providers/theme-provider'
7
8
  import { isLocale } from '@/i18n/config'
8
9
  import './globals.css'
9
10
 
10
- const inter = Inter({
11
+ const geist = Geist({
11
12
  subsets: ['latin'],
12
- variable: '--font-sans',
13
+ variable: '--font-geist',
14
+ fallback: ['system-ui', 'sans-serif'],
13
15
  })
14
16
 
15
17
  export const metadata: Metadata = {
@@ -33,11 +35,11 @@ export default async function LocaleLayout({
33
35
  const messages = await getMessages()
34
36
 
35
37
  return (
36
- <html lang={locale} suppressHydrationWarning>
37
- <body className={`${inter.variable} min-h-screen bg-background font-sans antialiased`}>
38
- <NextIntlClientProvider messages={messages}>
39
- {children}
40
- </NextIntlClientProvider>
38
+ <html lang={locale} suppressHydrationWarning className={geist.variable}>
39
+ <body className={`${geist.variable} min-h-screen bg-background font-sans antialiased`}>
40
+ <ThemeProvider>
41
+ <NextIntlClientProvider messages={messages}>{children}</NextIntlClientProvider>
42
+ </ThemeProvider>
41
43
  <Toaster />
42
44
  </body>
43
45
  </html>
@@ -1,12 +1,28 @@
1
1
  import { useTranslations } from 'next-intl'
2
+ import { Header } from '@/components/landing/header'
3
+ import { Hero } from '@/components/landing/hero'
4
+ import { Features } from '@/components/landing/features'
5
+ import { HowItWorks } from '@/components/landing/how-it-works'
6
+ import { PricingTeaser } from '@/components/landing/pricing-teaser'
7
+ import { Footer } from '@/components/landing/footer'
2
8
 
3
- export default function HomePage() {
4
- const t = useTranslations('home')
9
+ export default function HomePage({ params }: { params: Promise<{ locale: string }> }) {
10
+ return <HomePageContent params={params} />
11
+ }
12
+
13
+ async function HomePageContent({ params }: { params: Promise<{ locale: string }> }) {
14
+ const { locale } = await params
5
15
 
6
16
  return (
7
- <main className="flex min-h-screen flex-col items-center justify-center p-24">
8
- <h1 className="text-4xl font-bold">{t('title')}</h1>
9
- <p className="mt-4 text-gray-600">{t('description')}</p>
10
- </main>
17
+ <div className="flex min-h-screen flex-col">
18
+ <Header locale={locale} />
19
+ <main className="flex-1">
20
+ <Hero locale={locale} />
21
+ <Features />
22
+ <HowItWorks />
23
+ <PricingTeaser />
24
+ </main>
25
+ <Footer locale={locale} />
26
+ </div>
11
27
  )
12
28
  }
@@ -1,10 +1,6 @@
1
1
  import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
2
2
 
3
- export default async function PrivacyPage({
4
- params,
5
- }: {
6
- params: Promise<{ locale: string }>
7
- }) {
3
+ export default async function PrivacyPage({ params }: { params: Promise<{ locale: string }> }) {
8
4
  const { locale } = await params
9
5
 
10
6
  return (
@@ -16,7 +12,8 @@ export default async function PrivacyPage({
16
12
  </CardHeader>
17
13
  <CardContent>
18
14
  <p className="text-muted-foreground">
19
- This template page is a placeholder. Replace it with your actual privacy policy before shipping.
15
+ This template page is a placeholder. Replace it with your actual privacy policy before
16
+ shipping.
20
17
  </p>
21
18
  </CardContent>
22
19
  </Card>
@@ -1,10 +1,6 @@
1
1
  import Link from 'next/link'
2
2
 
3
- export default async function TermsPage({
4
- params,
5
- }: {
6
- params: Promise<{ locale: string }>
7
- }) {
3
+ export default async function TermsPage({ params }: { params: Promise<{ locale: string }> }) {
8
4
  const { locale } = await params
9
5
 
10
6
  return (
@@ -10,9 +10,8 @@ export async function GET(request: NextRequest) {
10
10
  const nextParam = searchParams.get('next')
11
11
 
12
12
  // Whitelist check to prevent open redirect attacks
13
- const safePath = nextParam && ALLOWED_NEXT.includes(nextParam)
14
- ? nextParam
15
- : `/${defaultLocale}/dashboard`
13
+ const safePath =
14
+ nextParam && ALLOWED_NEXT.includes(nextParam) ? nextParam : `/${defaultLocale}/dashboard`
16
15
 
17
16
  if (code) {
18
17
  const supabase = await getServerClient()
@@ -1,6 +1,6 @@
1
- "use client"
1
+ 'use client'
2
2
 
3
- import * as React from "react"
3
+ import * as React from 'react'
4
4
  import {
5
5
  IconDashboard,
6
6
  IconHelp,
@@ -8,11 +8,11 @@ import {
8
8
  IconInnerShadowTop,
9
9
  IconSettings,
10
10
  IconShield,
11
- } from "@tabler/icons-react"
11
+ } from '@tabler/icons-react'
12
12
 
13
- import { NavMain } from "@/components/dashboard/nav-main"
14
- import { NavSecondary } from "@/components/dashboard/nav-secondary"
15
- import { NavUser } from "@/components/dashboard/nav-user"
13
+ import { NavMain } from '@/components/dashboard/nav-main'
14
+ import { NavSecondary } from '@/components/dashboard/nav-secondary'
15
+ import { NavUser } from '@/components/dashboard/nav-user'
16
16
  import {
17
17
  Sidebar,
18
18
  SidebarContent,
@@ -21,7 +21,7 @@ import {
21
21
  SidebarMenu,
22
22
  SidebarMenuButton,
23
23
  SidebarMenuItem,
24
- } from "@/components/ui/sidebar"
24
+ } from '@/components/ui/sidebar'
25
25
 
26
26
  export function AppSidebar({
27
27
  user,
@@ -33,12 +33,12 @@ export function AppSidebar({
33
33
  }) {
34
34
  const navMain = [
35
35
  {
36
- title: "Dashboard",
36
+ title: 'Dashboard',
37
37
  url: `/${locale}/dashboard`,
38
38
  icon: IconDashboard,
39
39
  },
40
40
  {
41
- title: "Settings",
41
+ title: 'Settings',
42
42
  url: `/${locale}/settings/profile`,
43
43
  icon: IconSettings,
44
44
  },
@@ -46,17 +46,17 @@ export function AppSidebar({
46
46
 
47
47
  const navSecondary = [
48
48
  {
49
- title: "Help",
49
+ title: 'Help',
50
50
  url: `/${locale}/help`,
51
51
  icon: IconHelp,
52
52
  },
53
53
  {
54
- title: "Privacy Policy",
54
+ title: 'Privacy Policy',
55
55
  url: `/${locale}/privacy`,
56
56
  icon: IconShield,
57
57
  },
58
58
  {
59
- title: "About",
59
+ title: 'About',
60
60
  url: `/${locale}/about`,
61
61
  icon: IconInfoCircle,
62
62
  },
@@ -67,10 +67,7 @@ export function AppSidebar({
67
67
  <SidebarHeader>
68
68
  <SidebarMenu>
69
69
  <SidebarMenuItem>
70
- <SidebarMenuButton
71
- asChild
72
- className="data-[slot=sidebar-menu-button]:p-1.5!"
73
- >
70
+ <SidebarMenuButton asChild className="data-[slot=sidebar-menu-button]:p-1.5!">
74
71
  <a href={`/${locale}/dashboard`}>
75
72
  <IconInnerShadowTop className="size-5!" />
76
73
  <span className="text-base font-semibold">AgentDock</span>