feat: implement initial fullstack portfolio application including dashboard, CMS, and analytics features.

This commit is contained in:
Moh Dzulfikri Maulana
2026-03-07 16:32:49 +07:00
commit bdd61d11d3
59 changed files with 11107 additions and 0 deletions

107
prisma/schema.prisma Normal file
View File

@@ -0,0 +1,107 @@
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
}
model User {
id String @id @default(cuid())
email String @unique
name String
password String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Session {
id String @id @default(cuid())
visitorId String
startedAt DateTime @default(now())
lastSeenAt DateTime @updatedAt
pageViews PageView[]
}
model PageView {
id String @id @default(cuid())
sessionId String
path String
createdAt DateTime @default(now())
session Session @relation(fields: [sessionId], references: [id])
}
model Project {
id String @id @default(cuid())
title String
description String
imageUrl String?
liveUrl String?
githubUrl String?
techStack String[] // Array of tech names
featured Boolean @default(false)
order Int @default(0)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Experience {
id String @id @default(cuid())
company String
role String
startDate DateTime
endDate DateTime?
current Boolean @default(false)
description String
highlights String[]
techStack String[]
order Int @default(0)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model ContactMessage {
id String @id @default(cuid())
name String
email String
subject String
message String
read Boolean @default(false)
createdAt DateTime @default(now())
}
enum BlogStatus {
DRAFT
SCHEDULED
PUBLISHED
}
model Blog {
id String @id @default(cuid())
title String
slug String @unique
content String
excerpt String?
status BlogStatus @default(DRAFT)
scheduledAt DateTime?
publishedAt DateTime?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
tags Tag[]
@@index([status])
@@index([scheduledAt])
}
model Tag {
id String @id @default(cuid())
name String @unique
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
blogs Blog[]
}

93
prisma/seed.ts Normal file
View File

@@ -0,0 +1,93 @@
// prisma/seed.ts
import { prisma } from "../src/lib/prisma";
async function main() {
// Seed Projects
await prisma.project.createMany({
data: [
{
title: "Enterprise ERP System",
description:
"Full-scale ERP system built with NestJS microservices, handling inventory, finance, and HR modules for 500+ concurrent users.",
imageUrl: "/projects/erp.png",
liveUrl: "https://demo.example.com",
githubUrl: "https://github.com/username/erp-system",
techStack: ["NestJS", "Next.js", "PostgreSQL", "Redis", "Docker"],
featured: true,
order: 1,
},
{
title: "Real-time Analytics Dashboard",
description:
"Interactive analytics platform with real-time data visualization, WebSocket integration, and multi-tenant architecture.",
imageUrl: "/projects/dashboard.png",
liveUrl: "https://analytics.example.com",
githubUrl: "https://github.com/username/analytics",
techStack: ["Next.js", "NestJS", "Prisma", "Chart.js", "PostgreSQL"],
featured: true,
order: 2,
},
{
title: "API Gateway & Auth Service",
description:
"Scalable API Gateway with JWT authentication, rate limiting, and microservice orchestration using Clean Architecture principles.",
imageUrl: "/projects/gateway.png",
githubUrl: "https://github.com/username/api-gateway",
techStack: ["NestJS", "Redis", "JWT", "Docker", "Kubernetes"],
featured: true,
order: 3,
},
],
});
// Seed Experiences
await prisma.experience.createMany({
data: [
{
company: "Tech Corp Indonesia",
role: "Senior Fullstack Engineer",
startDate: new Date("2022-01-01"),
current: true,
description:
"Leading development of enterprise-grade web applications with focus on scalability and clean architecture.",
highlights: [
"Architected microservices-based ERP system serving 500+ concurrent users",
"Reduced API response time by 60% through Redis caching & query optimization",
"Mentored 3 junior developers on NestJS patterns and SOLID principles",
"Implemented CI/CD pipeline cutting deployment time from 2 hours to 15 minutes",
],
techStack: [
"Next.js",
"NestJS",
"PostgreSQL",
"Redis",
"Docker",
"AWS",
],
order: 1,
},
{
company: "Startup Fintech",
role: "Fullstack Developer",
startDate: new Date("2020-03-01"),
endDate: new Date("2021-12-31"),
current: false,
description:
"Built core financial services platform from ground up with emphasis on security and performance.",
highlights: [
"Developed payment processing system handling Rp 50B+ monthly transactions",
"Built real-time notification system using WebSockets and Redis pub/sub",
"Implemented automated testing achieving 85%+ code coverage",
],
techStack: ["React", "Node.js", "Express", "MongoDB", "PostgreSQL"],
order: 2,
},
],
});
console.log("✅ Seed completed");
}
main()
.catch(console.error)
.finally(() => prisma.$disconnect());