kofi-stack-template-generator 2.1.27 → 2.1.36

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 (117) hide show
  1. package/.turbo/turbo-build.log +6 -6
  2. package/.turbo/turbo-typecheck.log +1 -1
  3. package/dist/index.js +1359 -13
  4. package/package.json +8 -8
  5. package/src/generator.ts +57 -0
  6. package/src/templates.generated.ts +108 -15
  7. package/templates/admin/next.config.ts.hbs +7 -0
  8. package/templates/admin/package.json.hbs +38 -0
  9. package/templates/admin/postcss.config.mjs.hbs +7 -0
  10. package/templates/admin/src/app/analytics/page.tsx.hbs +39 -0
  11. package/templates/admin/src/app/globals.css.hbs +2 -0
  12. package/templates/admin/src/app/layout.tsx.hbs +33 -0
  13. package/templates/admin/src/app/page.tsx.hbs +47 -0
  14. package/templates/admin/src/app/settings/page.tsx.hbs +74 -0
  15. package/templates/admin/src/app/users/page.tsx.hbs +16 -0
  16. package/templates/admin/src/components/admin-sidebar.tsx.hbs +51 -0
  17. package/templates/admin/src/components/stats-cards.tsx.hbs +28 -0
  18. package/templates/admin/src/components/user-table.tsx.hbs +65 -0
  19. package/templates/admin/tsconfig.json.hbs +15 -0
  20. package/templates/design-system/next.config.ts.hbs +7 -0
  21. package/templates/design-system/package.json.hbs +35 -0
  22. package/templates/design-system/postcss.config.mjs.hbs +7 -0
  23. package/templates/design-system/src/app/blocks/page.tsx.hbs +140 -0
  24. package/templates/design-system/src/app/colors/page.tsx.hbs +34 -0
  25. package/templates/design-system/src/app/components/page.tsx.hbs +110 -0
  26. package/templates/design-system/src/app/globals.css.hbs +2 -0
  27. package/templates/design-system/src/app/layout.tsx.hbs +46 -0
  28. package/templates/design-system/src/app/page.tsx.hbs +65 -0
  29. package/templates/design-system/src/app/typography/page.tsx.hbs +112 -0
  30. package/templates/design-system/src/components/color-palette.tsx.hbs +117 -0
  31. package/templates/design-system/tsconfig.json.hbs +13 -0
  32. package/templates/marketing/nextjs/package.json.hbs +1 -1
  33. package/templates/marketing/payload/package.json.hbs +1 -1
  34. package/templates/marketing/payload/src/Footer/config.ts.hbs +178 -0
  35. package/templates/marketing/payload/src/Footer/hooks/revalidateFooter.ts.hbs +13 -0
  36. package/templates/marketing/payload/src/Footer/index.ts.hbs +1 -0
  37. package/templates/marketing/payload/src/Header/RowLabel.tsx.hbs +21 -0
  38. package/templates/marketing/payload/src/Header/config.ts.hbs +208 -0
  39. package/templates/marketing/payload/src/Header/hooks/revalidateHeader.ts.hbs +13 -0
  40. package/templates/marketing/payload/src/Header/index.ts.hbs +1 -0
  41. package/templates/marketing/payload/src/access/anyone.ts.hbs +3 -0
  42. package/templates/marketing/payload/src/access/authenticated.ts.hbs +9 -0
  43. package/templates/marketing/payload/src/access/authenticatedOrPublished.ts.hbs +13 -0
  44. package/templates/marketing/payload/src/access/index.ts.hbs +3 -0
  45. package/templates/marketing/payload/src/app/(frontend)/next/seed/route.ts.hbs +31 -0
  46. package/templates/marketing/payload/src/collections/Categories/index.ts.hbs +28 -0
  47. package/templates/marketing/payload/src/collections/FAQs/index.ts.hbs +100 -0
  48. package/templates/marketing/payload/src/collections/Media.ts.hbs +148 -28
  49. package/templates/marketing/payload/src/collections/Pages/hooks/revalidatePage.ts.hbs +43 -0
  50. package/templates/marketing/payload/src/collections/Pages/index.ts.hbs +142 -0
  51. package/templates/marketing/payload/src/collections/Posts/hooks/populateAuthors.ts.hbs +41 -0
  52. package/templates/marketing/payload/src/collections/Posts/hooks/revalidatePost.ts.hbs +44 -0
  53. package/templates/marketing/payload/src/collections/Posts/index.ts.hbs +244 -0
  54. package/templates/marketing/payload/src/collections/Users/index.ts.hbs +26 -0
  55. package/templates/marketing/payload/src/collections/index.ts.hbs +6 -4
  56. package/templates/marketing/payload/src/components/BeforeDashboard/SeedButton/index.scss.hbs +12 -0
  57. package/templates/marketing/payload/src/components/BeforeDashboard/SeedButton/index.tsx.hbs +89 -0
  58. package/templates/marketing/payload/src/components/BeforeDashboard/index.scss.hbs +24 -0
  59. package/templates/marketing/payload/src/components/BeforeDashboard/index.tsx.hbs +69 -0
  60. package/templates/marketing/payload/src/components/BeforeLogin/index.tsx.hbs +14 -0
  61. package/templates/marketing/payload/src/components/Link/index.tsx.hbs +79 -0
  62. package/templates/marketing/payload/src/components/Media/index.tsx.hbs +67 -0
  63. package/templates/marketing/payload/src/components/RichText/index.tsx.hbs +44 -0
  64. package/templates/marketing/payload/src/endpoints/seed/home.ts.hbs +76 -0
  65. package/templates/marketing/payload/src/endpoints/seed/image-1.ts.hbs +5 -0
  66. package/templates/marketing/payload/src/endpoints/seed/image-2.ts.hbs +5 -0
  67. package/templates/marketing/payload/src/endpoints/seed/image-hero.ts.hbs +5 -0
  68. package/templates/marketing/payload/src/endpoints/seed/index.ts.hbs +235 -0
  69. package/templates/marketing/payload/src/endpoints/seed/post-1.ts.hbs +252 -0
  70. package/templates/marketing/payload/src/fields/defaultLexical.ts.hbs +73 -0
  71. package/templates/marketing/payload/src/fields/index.ts.hbs +3 -0
  72. package/templates/marketing/payload/src/fields/link.ts.hbs +139 -0
  73. package/templates/marketing/payload/src/fields/linkGroup.ts.hbs +28 -0
  74. package/templates/marketing/payload/src/globals/index.ts.hbs +2 -2
  75. package/templates/marketing/payload/src/heros/HighImpact/index.tsx.hbs +53 -0
  76. package/templates/marketing/payload/src/heros/LowImpact/index.tsx.hbs +48 -0
  77. package/templates/marketing/payload/src/heros/MediumImpact/index.tsx.hbs +46 -0
  78. package/templates/marketing/payload/src/heros/PostHero/index.tsx.hbs +68 -0
  79. package/templates/marketing/payload/src/heros/ProductShowcase/index.tsx.hbs +88 -0
  80. package/templates/marketing/payload/src/heros/RenderHero.tsx.hbs +27 -0
  81. package/templates/marketing/payload/src/heros/config.ts.hbs +112 -0
  82. package/templates/marketing/payload/src/heros/index.ts.hbs +7 -0
  83. package/templates/marketing/payload/src/hooks/index.ts.hbs +2 -0
  84. package/templates/marketing/payload/src/hooks/populatePublishedAt.ts.hbs +15 -0
  85. package/templates/marketing/payload/src/hooks/revalidateRedirects.ts.hbs +11 -0
  86. package/templates/marketing/payload/src/payload.config.ts.hbs +32 -8
  87. package/templates/marketing/payload/src/providers/HeaderTheme/index.tsx.hbs +34 -0
  88. package/templates/marketing/payload/src/providers/Theme/InitTheme/index.tsx.hbs +44 -0
  89. package/templates/marketing/payload/src/providers/Theme/index.tsx.hbs +60 -0
  90. package/templates/marketing/payload/src/providers/Theme/shared.ts.hbs +17 -0
  91. package/templates/marketing/payload/src/providers/Theme/types.ts.hbs +10 -0
  92. package/templates/marketing/payload/src/providers/index.tsx.hbs +18 -0
  93. package/templates/marketing/payload/src/utilities/canUseDOM.ts.hbs +1 -0
  94. package/templates/marketing/payload/src/utilities/deepMerge.ts.hbs +35 -0
  95. package/templates/marketing/payload/src/utilities/formatAuthors.ts.hbs +24 -0
  96. package/templates/marketing/payload/src/utilities/formatDateTime.ts.hbs +13 -0
  97. package/templates/marketing/payload/src/utilities/generateMeta.ts.hbs +87 -0
  98. package/templates/marketing/payload/src/utilities/generatePreviewPath.ts.hbs +33 -0
  99. package/templates/marketing/payload/src/utilities/getURL.ts.hbs +26 -0
  100. package/templates/marketing/payload/src/utilities/index.ts.hbs +8 -0
  101. package/templates/marketing/payload/src/utilities/mergeOpenGraph.ts.hbs +26 -0
  102. package/templates/mobile/app.json.hbs +39 -0
  103. package/templates/mobile/babel.config.js.hbs +6 -0
  104. package/templates/mobile/package.json.hbs +30 -0
  105. package/templates/mobile/src/app/(tabs)/_layout.tsx.hbs +27 -0
  106. package/templates/mobile/src/app/(tabs)/index.tsx.hbs +28 -0
  107. package/templates/mobile/src/app/(tabs)/profile.tsx.hbs +44 -0
  108. package/templates/mobile/src/app/_layout.tsx.hbs +13 -0
  109. package/templates/mobile/src/app/index.tsx.hbs +5 -0
  110. package/templates/mobile/tsconfig.json.hbs +10 -0
  111. package/templates/monorepo/package.json.hbs +4 -1
  112. package/templates/web/package.json.hbs +1 -1
  113. package/templates/marketing/payload/src/collections/Pages.ts.hbs +0 -66
  114. package/templates/marketing/payload/src/collections/Posts.ts.hbs +0 -65
  115. package/templates/marketing/payload/src/collections/Users.ts.hbs +0 -25
  116. package/templates/marketing/payload/src/globals/Navigation.ts.hbs +0 -51
  117. package/templates/marketing/payload/src/globals/SiteSettings.ts.hbs +0 -49
@@ -0,0 +1,110 @@
1
+ import { Button } from '@repo/ui/components/button'
2
+ import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@repo/ui/components/card'
3
+ import { Input } from '@repo/ui/components/input'
4
+ import { Label } from '@repo/ui/components/label'
5
+ import { Badge } from '@repo/ui/components/badge'
6
+ import { Separator } from '@repo/ui/components/separator'
7
+
8
+ export default function ComponentsPage() {
9
+ return (
10
+ <div className="container mx-auto max-w-6xl px-6 py-10 space-y-12">
11
+ <div className="space-y-4">
12
+ <h1 className="text-4xl font-bold tracking-tight">Components</h1>
13
+ <p className="text-xl text-muted-foreground">
14
+ UI components from the shared @repo/ui package.
15
+ </p>
16
+ </div>
17
+
18
+ <section className="space-y-6">
19
+ <h2 className="text-2xl font-semibold border-b pb-2">Buttons</h2>
20
+ <div className="flex flex-wrap gap-4">
21
+ <Button>Default</Button>
22
+ <Button variant="secondary">Secondary</Button>
23
+ <Button variant="destructive">Destructive</Button>
24
+ <Button variant="outline">Outline</Button>
25
+ <Button variant="ghost">Ghost</Button>
26
+ <Button variant="link">Link</Button>
27
+ </div>
28
+ <div className="flex flex-wrap gap-4">
29
+ <Button size="sm">Small</Button>
30
+ <Button size="default">Default</Button>
31
+ <Button size="lg">Large</Button>
32
+ </div>
33
+ </section>
34
+
35
+ <Separator />
36
+
37
+ <section className="space-y-6">
38
+ <h2 className="text-2xl font-semibold border-b pb-2">Cards</h2>
39
+ <div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
40
+ <Card>
41
+ <CardHeader>
42
+ <CardTitle>Card Title</CardTitle>
43
+ <CardDescription>Card description goes here.</CardDescription>
44
+ </CardHeader>
45
+ <CardContent>
46
+ <p>Card content with some example text.</p>
47
+ </CardContent>
48
+ <CardFooter>
49
+ <Button size="sm">Action</Button>
50
+ </CardFooter>
51
+ </Card>
52
+
53
+ <Card>
54
+ <CardHeader>
55
+ <CardTitle>Another Card</CardTitle>
56
+ <CardDescription>Different content example.</CardDescription>
57
+ </CardHeader>
58
+ <CardContent>
59
+ <p>More card content here.</p>
60
+ </CardContent>
61
+ </Card>
62
+
63
+ <Card>
64
+ <CardHeader>
65
+ <CardTitle>Third Card</CardTitle>
66
+ <CardDescription>Yet another card example.</CardDescription>
67
+ </CardHeader>
68
+ <CardContent>
69
+ <p>Additional content for this card.</p>
70
+ </CardContent>
71
+ </Card>
72
+ </div>
73
+ </section>
74
+
75
+ <Separator />
76
+
77
+ <section className="space-y-6">
78
+ <h2 className="text-2xl font-semibold border-b pb-2">Form Elements</h2>
79
+ <div className="grid gap-6 md:grid-cols-2">
80
+ <div className="space-y-4">
81
+ <div className="space-y-2">
82
+ <Label htmlFor="email">Email</Label>
83
+ <Input id="email" type="email" placeholder="Enter your email" />
84
+ </div>
85
+ <div className="space-y-2">
86
+ <Label htmlFor="password">Password</Label>
87
+ <Input id="password" type="password" placeholder="Enter password" />
88
+ </div>
89
+ <div className="space-y-2">
90
+ <Label htmlFor="disabled">Disabled Input</Label>
91
+ <Input id="disabled" disabled placeholder="Disabled input" />
92
+ </div>
93
+ </div>
94
+ </div>
95
+ </section>
96
+
97
+ <Separator />
98
+
99
+ <section className="space-y-6">
100
+ <h2 className="text-2xl font-semibold border-b pb-2">Badges</h2>
101
+ <div className="flex flex-wrap gap-4">
102
+ <Badge>Default</Badge>
103
+ <Badge variant="secondary">Secondary</Badge>
104
+ <Badge variant="destructive">Destructive</Badge>
105
+ <Badge variant="outline">Outline</Badge>
106
+ </div>
107
+ </section>
108
+ </div>
109
+ )
110
+ }
@@ -0,0 +1,2 @@
1
+ @import "tailwindcss";
2
+ @import "@repo/ui/styles.css";
@@ -0,0 +1,46 @@
1
+ import type { Metadata } from 'next'
2
+ import { ThemeProvider } from 'next-themes'
3
+ import './globals.css'
4
+
5
+ export const metadata: Metadata = {
6
+ title: '{{projectName}} Design System',
7
+ description: 'Design system documentation and component showcase',
8
+ }
9
+
10
+ export default function RootLayout({
11
+ children,
12
+ }: {
13
+ children: React.ReactNode
14
+ }) {
15
+ return (
16
+ <html lang="en" suppressHydrationWarning>
17
+ <body className="min-h-screen bg-background font-sans antialiased">
18
+ <ThemeProvider
19
+ attribute="class"
20
+ defaultTheme="system"
21
+ enableSystem
22
+ disableTransitionOnChange
23
+ >
24
+ <div className="relative flex min-h-screen flex-col">
25
+ <header className="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
26
+ <div className="container flex h-14 items-center">
27
+ <div className="mr-4 flex">
28
+ <a href="/" className="mr-6 flex items-center space-x-2">
29
+ <span className="font-bold">{{projectName}} Design System</span>
30
+ </a>
31
+ <nav className="flex items-center space-x-6 text-sm font-medium">
32
+ <a href="/colors" className="transition-colors hover:text-foreground/80 text-foreground/60">Colors</a>
33
+ <a href="/typography" className="transition-colors hover:text-foreground/80 text-foreground/60">Typography</a>
34
+ <a href="/components" className="transition-colors hover:text-foreground/80 text-foreground/60">Components</a>
35
+ <a href="/blocks" className="transition-colors hover:text-foreground/80 text-foreground/60">Blocks</a>
36
+ </nav>
37
+ </div>
38
+ </div>
39
+ </header>
40
+ <main className="flex-1">{children}</main>
41
+ </div>
42
+ </ThemeProvider>
43
+ </body>
44
+ </html>
45
+ )
46
+ }
@@ -0,0 +1,65 @@
1
+ import { Card, CardDescription, CardHeader, CardTitle } from '@repo/ui/components/card'
2
+ import { Separator } from '@repo/ui/components/separator'
3
+
4
+ export default function Home() {
5
+ return (
6
+ <main className="container mx-auto max-w-4xl px-6 py-16">
7
+ <header className="mb-12 text-center">
8
+ <h1 className="text-4xl font-bold tracking-tight text-foreground">
9
+ Design System & Blocks
10
+ </h1>
11
+ <p className="mt-4 text-lg text-muted-foreground max-w-2xl mx-auto">
12
+ Explore the component library and design tokens for {{projectName}}.
13
+ </p>
14
+ </header>
15
+
16
+ <Separator className="mb-12" />
17
+
18
+ <div className="grid gap-6 md:grid-cols-2 lg:grid-cols-4">
19
+ <a href="/colors" className="group">
20
+ <Card className="h-full transition-all hover:border-primary/50 hover:shadow-md">
21
+ <CardHeader>
22
+ <CardTitle className="text-xl">Colors</CardTitle>
23
+ <CardDescription className="text-base">
24
+ View the color palette and brand colors.
25
+ </CardDescription>
26
+ </CardHeader>
27
+ </Card>
28
+ </a>
29
+
30
+ <a href="/typography" className="group">
31
+ <Card className="h-full transition-all hover:border-primary/50 hover:shadow-md">
32
+ <CardHeader>
33
+ <CardTitle className="text-xl">Typography</CardTitle>
34
+ <CardDescription className="text-base">
35
+ Typography scale and font styles.
36
+ </CardDescription>
37
+ </CardHeader>
38
+ </Card>
39
+ </a>
40
+
41
+ <a href="/components" className="group">
42
+ <Card className="h-full transition-all hover:border-primary/50 hover:shadow-md">
43
+ <CardHeader>
44
+ <CardTitle className="text-xl">Components</CardTitle>
45
+ <CardDescription className="text-base">
46
+ View all shadcn UI components.
47
+ </CardDescription>
48
+ </CardHeader>
49
+ </Card>
50
+ </a>
51
+
52
+ <a href="/blocks" className="group">
53
+ <Card className="h-full transition-all hover:border-primary/50 hover:shadow-md">
54
+ <CardHeader>
55
+ <CardTitle className="text-xl">Blocks</CardTitle>
56
+ <CardDescription className="text-base">
57
+ Pre-built marketing blocks.
58
+ </CardDescription>
59
+ </CardHeader>
60
+ </Card>
61
+ </a>
62
+ </div>
63
+ </main>
64
+ )
65
+ }
@@ -0,0 +1,112 @@
1
+ export default function TypographyPage() {
2
+ return (
3
+ <div className="container mx-auto max-w-4xl px-6 py-10 space-y-12">
4
+ <div className="space-y-4">
5
+ <h1 className="text-4xl font-bold tracking-tight">Typography</h1>
6
+ <p className="text-xl text-muted-foreground">
7
+ Typography scale and text styles for {{projectName}}.
8
+ </p>
9
+ </div>
10
+
11
+ <section className="space-y-6">
12
+ <h2 className="text-2xl font-semibold border-b pb-2">Headings</h2>
13
+ <div className="space-y-4">
14
+ <div className="flex items-baseline gap-4">
15
+ <span className="text-sm text-muted-foreground w-20">h1</span>
16
+ <h1 className="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl">
17
+ Heading One
18
+ </h1>
19
+ </div>
20
+ <div className="flex items-baseline gap-4">
21
+ <span className="text-sm text-muted-foreground w-20">h2</span>
22
+ <h2 className="scroll-m-20 text-3xl font-semibold tracking-tight">
23
+ Heading Two
24
+ </h2>
25
+ </div>
26
+ <div className="flex items-baseline gap-4">
27
+ <span className="text-sm text-muted-foreground w-20">h3</span>
28
+ <h3 className="scroll-m-20 text-2xl font-semibold tracking-tight">
29
+ Heading Three
30
+ </h3>
31
+ </div>
32
+ <div className="flex items-baseline gap-4">
33
+ <span className="text-sm text-muted-foreground w-20">h4</span>
34
+ <h4 className="scroll-m-20 text-xl font-semibold tracking-tight">
35
+ Heading Four
36
+ </h4>
37
+ </div>
38
+ </div>
39
+ </section>
40
+
41
+ <section className="space-y-6">
42
+ <h2 className="text-2xl font-semibold border-b pb-2">Body Text</h2>
43
+ <div className="space-y-4">
44
+ <div>
45
+ <span className="text-sm text-muted-foreground">Large</span>
46
+ <p className="text-lg text-muted-foreground">
47
+ The quick brown fox jumps over the lazy dog. This is large body text.
48
+ </p>
49
+ </div>
50
+ <div>
51
+ <span className="text-sm text-muted-foreground">Default</span>
52
+ <p className="leading-7">
53
+ The quick brown fox jumps over the lazy dog. This is default body text with proper line height for readability.
54
+ </p>
55
+ </div>
56
+ <div>
57
+ <span className="text-sm text-muted-foreground">Small</span>
58
+ <p className="text-sm text-muted-foreground">
59
+ The quick brown fox jumps over the lazy dog. This is small text.
60
+ </p>
61
+ </div>
62
+ <div>
63
+ <span className="text-sm text-muted-foreground">Muted</span>
64
+ <p className="text-sm text-muted-foreground">
65
+ The quick brown fox jumps over the lazy dog. This is muted text for secondary content.
66
+ </p>
67
+ </div>
68
+ </div>
69
+ </section>
70
+
71
+ <section className="space-y-6">
72
+ <h2 className="text-2xl font-semibold border-b pb-2">Inline Styles</h2>
73
+ <div className="space-y-4">
74
+ <p>
75
+ This is <strong>bold text</strong> for emphasis.
76
+ </p>
77
+ <p>
78
+ This is <em>italic text</em> for emphasis.
79
+ </p>
80
+ <p>
81
+ This is <code className="relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold">inline code</code> for technical terms.
82
+ </p>
83
+ <p>
84
+ This is a <a href="#" className="font-medium text-primary underline underline-offset-4">link</a> for navigation.
85
+ </p>
86
+ </div>
87
+ </section>
88
+
89
+ <section className="space-y-6">
90
+ <h2 className="text-2xl font-semibold border-b pb-2">Lists</h2>
91
+ <div className="grid gap-8 md:grid-cols-2">
92
+ <div>
93
+ <span className="text-sm text-muted-foreground mb-2 block">Unordered List</span>
94
+ <ul className="my-6 ml-6 list-disc [&>li]:mt-2">
95
+ <li>First item in the list</li>
96
+ <li>Second item in the list</li>
97
+ <li>Third item in the list</li>
98
+ </ul>
99
+ </div>
100
+ <div>
101
+ <span className="text-sm text-muted-foreground mb-2 block">Ordered List</span>
102
+ <ol className="my-6 ml-6 list-decimal [&>li]:mt-2">
103
+ <li>First numbered item</li>
104
+ <li>Second numbered item</li>
105
+ <li>Third numbered item</li>
106
+ </ol>
107
+ </div>
108
+ </div>
109
+ </section>
110
+ </div>
111
+ )
112
+ }
@@ -0,0 +1,117 @@
1
+ 'use client'
2
+
3
+ import { cn } from '@repo/ui/lib/utils'
4
+ import { useState } from 'react'
5
+
6
+ interface ColorSwatchProps {
7
+ name: string
8
+ variable: string
9
+ className: string
10
+ textClassName?: string
11
+ }
12
+
13
+ function ColorSwatch({ name, variable, className, textClassName }: ColorSwatchProps) {
14
+ const [copied, setCopied] = useState(false)
15
+
16
+ const copyToClipboard = () => {
17
+ navigator.clipboard.writeText(variable)
18
+ setCopied(true)
19
+ setTimeout(() => setCopied(false), 2000)
20
+ }
21
+
22
+ return (
23
+ <button type="button" onClick={copyToClipboard} className="group text-left w-full">
24
+ <div
25
+ className={cn(
26
+ 'h-20 rounded-lg border flex items-end justify-between p-3 transition-all group-hover:scale-[1.02] group-hover:shadow-md',
27
+ className
28
+ )}
29
+ >
30
+ <span className={cn('text-xs font-medium', textClassName)}>
31
+ {copied ? 'Copied!' : name}
32
+ </span>
33
+ </div>
34
+ <p className="mt-2 text-xs text-muted-foreground font-mono">{variable}</p>
35
+ </button>
36
+ )
37
+ }
38
+
39
+ interface ColorGroupProps {
40
+ title: string
41
+ colors: ColorSwatchProps[]
42
+ }
43
+
44
+ function ColorGroup({ title, colors }: ColorGroupProps) {
45
+ return (
46
+ <div className="space-y-4">
47
+ <h3 className="text-lg font-semibold">{title}</h3>
48
+ <div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4">
49
+ {colors.map((color) => (
50
+ <ColorSwatch key={color.variable} {...color} />
51
+ ))}
52
+ </div>
53
+ </div>
54
+ )
55
+ }
56
+
57
+ export function ColorPalette() {
58
+ const colorGroups: ColorGroupProps[] = [
59
+ {
60
+ title: 'Base Colors',
61
+ colors: [
62
+ { name: 'Background', variable: 'bg-background', className: 'bg-background', textClassName: 'text-foreground' },
63
+ { name: 'Foreground', variable: 'bg-foreground', className: 'bg-foreground', textClassName: 'text-background' },
64
+ { name: 'Card', variable: 'bg-card', className: 'bg-card', textClassName: 'text-card-foreground' },
65
+ { name: 'Popover', variable: 'bg-popover', className: 'bg-popover', textClassName: 'text-popover-foreground' },
66
+ ],
67
+ },
68
+ {
69
+ title: 'Brand Colors',
70
+ colors: [
71
+ { name: 'Primary', variable: 'bg-primary', className: 'bg-primary', textClassName: 'text-primary-foreground' },
72
+ { name: 'Primary FG', variable: 'bg-primary-foreground', className: 'bg-primary-foreground', textClassName: 'text-primary' },
73
+ { name: 'Secondary', variable: 'bg-secondary', className: 'bg-secondary', textClassName: 'text-secondary-foreground' },
74
+ { name: 'Secondary FG', variable: 'bg-secondary-foreground', className: 'bg-secondary-foreground', textClassName: 'text-secondary' },
75
+ { name: 'Accent', variable: 'bg-accent', className: 'bg-accent', textClassName: 'text-accent-foreground' },
76
+ ],
77
+ },
78
+ {
79
+ title: 'Semantic Colors',
80
+ colors: [
81
+ { name: 'Muted', variable: 'bg-muted', className: 'bg-muted', textClassName: 'text-muted-foreground' },
82
+ { name: 'Muted FG', variable: 'bg-muted-foreground', className: 'bg-muted-foreground', textClassName: 'text-muted' },
83
+ { name: 'Destructive', variable: 'bg-destructive', className: 'bg-destructive', textClassName: 'text-destructive-foreground' },
84
+ { name: 'Border', variable: 'bg-border', className: 'bg-border', textClassName: 'text-foreground' },
85
+ { name: 'Ring', variable: 'bg-ring', className: 'bg-ring', textClassName: 'text-background' },
86
+ ],
87
+ },
88
+ {
89
+ title: 'Chart Colors',
90
+ colors: [
91
+ { name: 'Chart 1', variable: 'bg-chart-1', className: 'bg-chart-1', textClassName: 'text-white' },
92
+ { name: 'Chart 2', variable: 'bg-chart-2', className: 'bg-chart-2', textClassName: 'text-white' },
93
+ { name: 'Chart 3', variable: 'bg-chart-3', className: 'bg-chart-3', textClassName: 'text-white' },
94
+ { name: 'Chart 4', variable: 'bg-chart-4', className: 'bg-chart-4', textClassName: 'text-foreground' },
95
+ { name: 'Chart 5', variable: 'bg-chart-5', className: 'bg-chart-5', textClassName: 'text-foreground' },
96
+ ],
97
+ },
98
+ {
99
+ title: 'Sidebar Colors',
100
+ colors: [
101
+ { name: 'Sidebar', variable: 'bg-sidebar', className: 'bg-sidebar', textClassName: 'text-sidebar-foreground' },
102
+ { name: 'Sidebar FG', variable: 'bg-sidebar-foreground', className: 'bg-sidebar-foreground', textClassName: 'text-sidebar' },
103
+ { name: 'Sidebar Primary', variable: 'bg-sidebar-primary', className: 'bg-sidebar-primary', textClassName: 'text-sidebar-primary-foreground' },
104
+ { name: 'Sidebar Accent', variable: 'bg-sidebar-accent', className: 'bg-sidebar-accent', textClassName: 'text-sidebar-accent-foreground' },
105
+ { name: 'Sidebar Border', variable: 'bg-sidebar-border', className: 'bg-sidebar-border', textClassName: 'text-sidebar-foreground' },
106
+ ],
107
+ },
108
+ ]
109
+
110
+ return (
111
+ <div className="space-y-12">
112
+ {colorGroups.map((group) => (
113
+ <ColorGroup key={group.title} {...group} />
114
+ ))}
115
+ </div>
116
+ )
117
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "@repo/config-typescript/nextjs.json",
3
+ "compilerOptions": {
4
+ "baseUrl": ".",
5
+ "paths": {
6
+ "@/*": ["./src/*"],
7
+ "@repo/ui": ["../../packages/ui/src"],
8
+ "@repo/ui/*": ["../../packages/ui/src/*"]
9
+ }
10
+ },
11
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
12
+ "exclude": ["node_modules"]
13
+ }
@@ -3,7 +3,7 @@
3
3
  "version": "0.1.0",
4
4
  "private": true,
5
5
  "scripts": {
6
- "dev": "next dev --turbopack -p 3001",
6
+ "dev": "next dev --turbopack --port 3000",
7
7
  "build": "next build",
8
8
  "start": "next start",
9
9
  "lint": "biome check .",
@@ -3,7 +3,7 @@
3
3
  "version": "0.1.0",
4
4
  "private": true,
5
5
  "scripts": {
6
- "dev": "next dev -p 3001",
6
+ "dev": "next dev --port 3000",
7
7
  "build": "next build",
8
8
  "start": "next start",
9
9
  "lint": "biome check .",
@@ -0,0 +1,178 @@
1
+ import type { GlobalConfig } from "payload"
2
+
3
+ import { link } from "@/fields/link"
4
+ import { revalidateFooter } from "./hooks/revalidateFooter"
5
+
6
+ export const Footer: GlobalConfig = {
7
+ slug: "footer",
8
+ access: {
9
+ read: () => true,
10
+ },
11
+ fields: [
12
+ // Link Columns - organized groups of links
13
+ {
14
+ name: "columns",
15
+ type: "array",
16
+ label: "Link Columns",
17
+ maxRows: 5,
18
+ admin: {
19
+ initCollapsed: true,
20
+ description: "Add columns of links (e.g., Solutions, Resources, Company)",
21
+ },
22
+ fields: [
23
+ {
24
+ name: "title",
25
+ type: "text",
26
+ required: true,
27
+ label: "Column Title",
28
+ },
29
+ {
30
+ name: "links",
31
+ type: "array",
32
+ label: "Links",
33
+ maxRows: 10,
34
+ fields: [
35
+ link({
36
+ appearances: false,
37
+ }),
38
+ ],
39
+ admin: {
40
+ initCollapsed: true,
41
+ },
42
+ },
43
+ ],
44
+ },
45
+ // Social Links
46
+ {
47
+ name: "socialLinks",
48
+ type: "group",
49
+ label: "Social Links",
50
+ admin: {
51
+ description: "Add your social media profile URLs",
52
+ },
53
+ fields: [
54
+ {
55
+ name: "twitter",
56
+ type: "text",
57
+ label: "X (Twitter)",
58
+ admin: {
59
+ placeholder: "https://x.com/yourhandle",
60
+ },
61
+ },
62
+ {
63
+ name: "instagram",
64
+ type: "text",
65
+ label: "Instagram",
66
+ admin: {
67
+ placeholder: "https://instagram.com/yourhandle",
68
+ },
69
+ },
70
+ {
71
+ name: "linkedin",
72
+ type: "text",
73
+ label: "LinkedIn",
74
+ admin: {
75
+ placeholder: "https://linkedin.com/company/yourcompany",
76
+ },
77
+ },
78
+ {
79
+ name: "github",
80
+ type: "text",
81
+ label: "GitHub",
82
+ admin: {
83
+ placeholder: "https://github.com/yourorg",
84
+ },
85
+ },
86
+ {
87
+ name: "youtube",
88
+ type: "text",
89
+ label: "YouTube",
90
+ admin: {
91
+ placeholder: "https://youtube.com/@yourchannel",
92
+ },
93
+ },
94
+ ],
95
+ },
96
+ // Newsletter Section
97
+ {
98
+ name: "newsletter",
99
+ type: "group",
100
+ label: "Newsletter",
101
+ admin: {
102
+ description: "Configure the newsletter signup section",
103
+ },
104
+ fields: [
105
+ {
106
+ name: "enabled",
107
+ type: "checkbox",
108
+ label: "Enable Newsletter Signup",
109
+ defaultValue: true,
110
+ },
111
+ {
112
+ name: "title",
113
+ type: "text",
114
+ label: "Title",
115
+ defaultValue: "Newsletter",
116
+ admin: {
117
+ condition: (_, siblingData) => siblingData?.enabled,
118
+ },
119
+ },
120
+ {
121
+ name: "description",
122
+ type: "textarea",
123
+ label: "Description",
124
+ defaultValue: "Stay up to date with the latest updates and news.",
125
+ admin: {
126
+ condition: (_, siblingData) => siblingData?.enabled,
127
+ },
128
+ },
129
+ {
130
+ name: "buttonText",
131
+ type: "text",
132
+ label: "Button Text",
133
+ defaultValue: "Subscribe",
134
+ admin: {
135
+ condition: (_, siblingData) => siblingData?.enabled,
136
+ },
137
+ },
138
+ {
139
+ name: "placeholder",
140
+ type: "text",
141
+ label: "Email Placeholder",
142
+ defaultValue: "Enter your email",
143
+ admin: {
144
+ condition: (_, siblingData) => siblingData?.enabled,
145
+ },
146
+ },
147
+ ],
148
+ },
149
+ // Copyright and Bottom Bar
150
+ {
151
+ name: "copyrightText",
152
+ type: "text",
153
+ label: "Copyright Text",
154
+ defaultValue: "{{projectName}}",
155
+ admin: {
156
+ description: "Company name for copyright (year is added automatically)",
157
+ },
158
+ },
159
+ {
160
+ name: "bottomLinks",
161
+ type: "array",
162
+ label: "Bottom Bar Links",
163
+ maxRows: 4,
164
+ admin: {
165
+ description: "Links shown in the bottom bar (e.g., Contact Support, Privacy Policy)",
166
+ initCollapsed: true,
167
+ },
168
+ fields: [
169
+ link({
170
+ appearances: false,
171
+ }),
172
+ ],
173
+ },
174
+ ],
175
+ hooks: {
176
+ afterChange: [revalidateFooter],
177
+ },
178
+ }