1- import { Database , FileJson , Layers , ShieldCheck , Zap , Globe , Cpu , LayoutTemplate , Bot } from 'lucide-react' ;
1+ import { Database , FileJson , Layers , ShieldCheck , Zap , Globe , Cpu , LayoutTemplate , Bot , LucideIcon } from 'lucide-react' ;
22import { HomeLayout } from 'fumadocs-ui/layouts/home' ;
33import { baseOptions } from '@/app/layout.config' ;
44import { getHomepageTranslations } from '@/lib/homepage-i18n' ;
@@ -15,6 +15,81 @@ export default async function HomePage({
1515 const { lang } = await params ;
1616 const t = getHomepageTranslations ( lang ) ;
1717
18+ const features = [
19+ {
20+ key : 'objectql' ,
21+ icon : Database ,
22+ href : '/docs/objectql' ,
23+ title : t . features . objectql . title ,
24+ description : t . features . objectql . description ,
25+ } ,
26+ {
27+ key : 'objectui' ,
28+ icon : Layers ,
29+ href : '/docs/objectui' ,
30+ title : t . features . objectui . title ,
31+ description : t . features . objectui . description ,
32+ } ,
33+ {
34+ key : 'objectos' ,
35+ icon : Zap ,
36+ href : '/docs/objectos' ,
37+ title : t . features . objectos . title ,
38+ description : t . features . objectos . description ,
39+ } ,
40+ {
41+ key : 'security' ,
42+ icon : ShieldCheck ,
43+ href : '/docs/objectql/security' ,
44+ title : t . features . security . title ,
45+ description : t . features . security . description ,
46+ } ,
47+ {
48+ key : 'zodFirst' ,
49+ icon : FileJson ,
50+ href : '/docs/objectql/schema' ,
51+ title : t . features . zodFirst . title ,
52+ description : t . features . zodFirst . description ,
53+ } ,
54+ {
55+ key : 'universal' ,
56+ icon : Globe ,
57+ href : '/docs/introduction/architecture' ,
58+ title : t . features . universal . title ,
59+ description : t . features . universal . description ,
60+ } ,
61+ ] ;
62+
63+ const personas = [
64+ {
65+ key : 'architect' ,
66+ icon : LayoutTemplate ,
67+ color : 'text-blue-500' ,
68+ href : '/docs/introduction/architecture' ,
69+ title : t . personas . architect . title ,
70+ description : t . personas . architect . description ,
71+ action : t . personas . architect . action ,
72+ } ,
73+ {
74+ key : 'aiEngineer' ,
75+ icon : Bot ,
76+ color : 'text-purple-500' ,
77+ href : '/docs/introduction/metadata-driven' ,
78+ title : t . personas . aiEngineer . title ,
79+ description : t . personas . aiEngineer . description ,
80+ action : t . personas . aiEngineer . action ,
81+ } ,
82+ {
83+ key : 'frameworkBuilder' ,
84+ icon : Cpu ,
85+ color : 'text-green-500' ,
86+ href : '/docs/developers' ,
87+ title : t . personas . frameworkBuilder . title ,
88+ description : t . personas . frameworkBuilder . description ,
89+ action : t . personas . frameworkBuilder . action ,
90+ } ,
91+ ] ;
92+
1893 return (
1994 < HomeLayout { ...baseOptions } i18n >
2095 < main className = "flex min-h-screen flex-col items-center justify-center text-center px-4 py-16 sm:py-24 md:py-32 overflow-hidden bg-background text-foreground selection:bg-primary/20" >
@@ -35,42 +110,15 @@ export default async function HomePage({
35110
36111 { /* Feature Grid */ }
37112 < div className = "mt-24 grid grid-cols-1 gap-6 text-left sm:grid-cols-2 lg:grid-cols-3 max-w-6xl w-full" >
38- < FeatureCard
39- icon = { < Database className = "h-6 w-6" /> }
40- title = { t . features . objectql . title }
41- href = "/docs/objectql"
42- description = { t . features . objectql . description }
43- />
44- < FeatureCard
45- icon = { < Layers className = "h-6 w-6" /> }
46- title = { t . features . objectui . title }
47- href = "/docs/objectui"
48- description = { t . features . objectui . description }
49- />
50- < FeatureCard
51- icon = { < Zap className = "h-6 w-6" /> }
52- title = { t . features . objectos . title }
53- href = "/docs/objectos"
54- description = { t . features . objectos . description }
55- />
56- < FeatureCard
57- icon = { < ShieldCheck className = "h-6 w-6" /> }
58- title = { t . features . security . title }
59- href = "/docs/objectql/security"
60- description = { t . features . security . description }
61- />
62- < FeatureCard
63- icon = { < FileJson className = "h-6 w-6" /> }
64- title = { t . features . zodFirst . title }
65- href = "/docs/objectql/schema"
66- description = { t . features . zodFirst . description }
67- />
68- < FeatureCard
69- icon = { < Globe className = "h-6 w-6" /> }
70- title = { t . features . universal . title }
71- href = "/docs/introduction/architecture"
72- description = { t . features . universal . description }
73- />
113+ { features . map ( ( feature ) => (
114+ < FeatureCard
115+ key = { feature . key }
116+ icon = { < feature . icon className = "h-6 w-6" /> }
117+ title = { feature . title }
118+ href = { feature . href }
119+ description = { feature . description }
120+ />
121+ ) ) }
74122 </ div >
75123
76124 { /* Personas Section */ }
@@ -79,27 +127,16 @@ export default async function HomePage({
79127 { t . personas . heading }
80128 </ h2 >
81129 < div className = "grid grid-cols-1 md:grid-cols-3 gap-6" >
82- < PersonaCard
83- icon = { < LayoutTemplate className = "w-8 h-8 text-blue-500" /> }
84- title = { t . personas . architect . title }
85- description = { t . personas . architect . description }
86- href = "/docs/introduction/architecture"
87- action = { t . personas . architect . action }
88- />
89- < PersonaCard
90- icon = { < Bot className = "w-8 h-8 text-purple-500" /> }
91- title = { t . personas . aiEngineer . title }
92- description = { t . personas . aiEngineer . description }
93- href = "/docs/introduction/metadata-driven"
94- action = { t . personas . aiEngineer . action }
95- />
96- < PersonaCard
97- icon = { < Cpu className = "w-8 h-8 text-green-500" /> }
98- title = { t . personas . frameworkBuilder . title }
99- description = { t . personas . frameworkBuilder . description }
100- href = "/docs/developers"
101- action = { t . personas . frameworkBuilder . action }
102- />
130+ { personas . map ( ( persona ) => (
131+ < PersonaCard
132+ key = { persona . key }
133+ icon = { < persona . icon className = { `w-8 h-8 ${ persona . color } ` } /> }
134+ title = { persona . title }
135+ description = { persona . description }
136+ href = { persona . href }
137+ action = { persona . action }
138+ />
139+ ) ) }
103140 </ div >
104141 </ div >
105142
0 commit comments