diff --git a/src/app/[locale]/page.tsx b/src/app/[locale]/page.tsx
index 0e497f6..e22f264 100644
--- a/src/app/[locale]/page.tsx
+++ b/src/app/[locale]/page.tsx
@@ -5,8 +5,14 @@ import { ExperienceSection } from "@/features/experience/experience-section";
import { TechStackSection } from "@/features/skills/tech-stack-section";
import { ProjectsSection } from "@/features/projects/projects-section";
import { ContactSection } from "@/features/messages/contact-section";
+import { prisma } from "@/core/db/prisma";
+
+export default async function HomePage() {
+ const publishedProjects = await prisma.project.findMany({
+ where: { isPublished: true },
+ orderBy: { createdAt: "desc" }
+ });
-export default function HomePage() {
return (
<>
@@ -14,7 +20,7 @@ export default function HomePage() {
-
+
diff --git a/src/features/projects/projects-section.tsx b/src/features/projects/projects-section.tsx
index 0ea2265..4028e3e 100644
--- a/src/features/projects/projects-section.tsx
+++ b/src/features/projects/projects-section.tsx
@@ -15,66 +15,18 @@ import {
} from "lucide-react";
import { useTranslations } from "next-intl";
-export function ProjectsSection() {
+export function ProjectsSection({ initialProjects }: { initialProjects?: any[] }) {
const t = useTranslations("Projects");
const [activeFilter, setActiveFilter] = useState("all");
- const projects = [
- {
- id: "1",
- title: t("items.apiGateway.title"),
- description: t("items.apiGateway.description"),
- category: "backend",
- tags: ["Spring Boot", "Kafka", "Redis", "Docker"],
- metrics: t.has("items.apiGateway.metrics") ? t("items.apiGateway.metrics") : undefined,
- },
- {
- id: "2",
- title: t("items.paymentEngine.title"),
- description: t("items.paymentEngine.description"),
- category: "backend",
- tags: ["Java", "Kafka", "PostgreSQL", "gRPC"],
- metrics: t.has("items.paymentEngine.metrics") ? t("items.paymentEngine.metrics") : undefined,
- },
- {
- id: "3",
- title: t("items.onboarding.title"),
- description: t("items.onboarding.description"),
- category: "frontend",
- tags: ["React", "Next.js", "TypeScript", "Tailwind"],
- repoUrl: "#",
- liveUrl: "#",
- },
- {
- id: "4",
- title: t("items.dashboard.title"),
- description: t("items.dashboard.description"),
- category: "frontend",
- tags: ["React", "Chart.js", "WebSocket", "REST"],
- repoUrl: "#",
- },
- {
- id: "5",
- title: t("items.mobileApp.title"),
- description: t("items.mobileApp.description"),
- category: "mobile",
- tags: ["React Native", "TypeScript", "Redux"],
- },
- {
- id: "6",
- title: t("items.authService.title"),
- description: t("items.authService.description"),
- category: "backend",
- tags: ["Spring Security", "OAuth2", "JWT", "Redis"],
- metrics: t.has("items.authService.metrics") ? t("items.authService.metrics") : undefined,
- },
- ];
+ // Use initialProjects from DB or fallback to empty array
+ const projects = initialProjects || [];
const filters = [
{ value: "all", label: t("filters.all"), icon: },
- { value: "backend", label: t("filters.backend"), icon: },
- { value: "frontend", label: t("filters.frontend"), icon: },
- { value: "mobile", label: t("filters.mobile"), icon: },
+ { value: "Enterprise Backend", label: "Backend", icon: },
+ { value: "Frontend Development", label: "Frontend", icon: },
+ { value: "Mobile Development", label: "Mobile", icon: },
];
const filteredProjects =
@@ -131,21 +83,21 @@ export function ProjectsSection() {
{/* Category badge */}
- {project.category === "backend" ? (
+ {project.category === "Enterprise Backend" ? (
- ) : project.category === "frontend" ? (
+ ) : project.category === "Frontend Development" ? (
) : (
)}
- {project.category}
+ {project.category.replace(" Development", "").replace("Enterprise ", "")}
{project.repoUrl && (
@@ -169,6 +121,17 @@ export function ProjectsSection() {
+ {/* Image banner */}
+ {project.imageUrl && (
+
+

+
+ )}
+
{/* Title & description */}
{project.title}
@@ -187,9 +150,9 @@ export function ProjectsSection() {
)}
- {/* Tags */}
+ {/* Tags (Using generic category slice due to PRISMA missing tags yet) */}
- {project.tags.map((tag) => (
+ {(project.tags || [project.category.split(" ")[0]]).map((tag: string) => (