You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version: 0.1.0 (MVP) | Status: Active Development | License: Private
A full-stack TypeScript/Next.js web application that serves as both an interactive personal portfolio and an educational design pattern playground. The system demonstrates all 23 Gang of Four (GoF) design patterns implemented within a production-grade architecture, targeting CS students, recruiters, and software engineering educators.
Traditional developer portfolios are static, single-purpose pages that fail to demonstrate depth of software engineering knowledge. Simultaneously, CS curricula often teach design patterns in isolation — without grounding them in real, working systems. This project resolves both problems by merging portfolio functionality with a living, interactive pattern showcase.
1.2 Project Objectives
Objective
Description
Portfolio Showcase
Present projects, blog posts, resume, articles, and podcast content in a unified, dynamic interface
Pattern Playground
Implement all 23 GoF design patterns as first-class, observable features of the running application
Educational Reference
Provide a production-grade codebase that CS students and educators can study and extend
Future AI Integration
Architect the system to support LLM-powered content generation and intelligent assistants
1.3 Technology Stack Rationale
Layer
Technology
Rationale
Frontend Framework
Next.js 16 + React 19
App Router support, SSR/CSR flexibility, API routes co-location
Language
TypeScript 5.9 (strict)
Type safety essential for pattern demonstrations; generics power Strategy/Iterator/Composite
AudioPlayerContext with StoppedState, PlayingState, PausedState
app/models/podcast/
Template Method
Content export algorithm with pluggable format steps
src/patterns/
Mediator
ContactFormMediator — orchestrates form validation and submission
app/services/contact/
Memento
FeedStateMemento + FeedStateCaretaker — snapshot/restore filter state
app/models/feed/
Interpreter
Grammar evaluator for expression parsing
src/patterns/
Visitor
MetricsVisitor, TagsVisitor — analytics traversal of content trees
app/components/dashboard/
3.3 Data Model
erDiagram
USER {
string id PK "cuid"
string email UK
string name
string image
string role
string provider
string providerAccountId
datetime createdAt
datetime updatedAt
}
POST {
string id PK "cuid"
string title
string content
boolean published
string authorId FK
datetime createdAt
datetime updatedAt
}
USER ||--o{ POST : "authors"
React Context API is used for global state (theme, language, admin role) rather than a third-party store — keeping the pattern surface visible without framework magic.
Singleton services are instantiated once at module load, ensuring pattern correctness is observable at runtime.
Bun is used as the script runner for seeding and integration tests in CI, while npm/Node.js remains the primary application runtime for Docker compatibility.
Static mock data (app/data/) drives the portfolio sections in the MVP; the REST API layer is designed to replace this data source as database models are added.
5. Testing
5.1 Current Coverage
Layer
Framework
Status
Pattern Unit Tests
Bun (bun:test)
✅ 140+ test cases across all 23 patterns
Integration — Auth + DB
Bun script (scripts/integration-auth-db.ts)
✅ Automated in CI
Integration — HTTP CRUD
Bun script (scripts/integration-http-crud.ts)
✅ Automated in CI
Integration — Admin Users
Bun script (scripts/integration-http-admin-users.ts)
✅ Automated in CI
Unit Tests — React Components
Jest / React Testing Library
🔲 To be defined
E2E Tests
Playwright
🔲 To be defined
5.2 Running Pattern Tests
# Creational patterns
bun test src/patterns/TESTS.ts
# Structural patterns
bun test src/patterns/STRUCTURAL_TESTS.ts
# Behavioral patterns
bun test src/patterns/BEHAVIORAL_TESTS.ts
# All patterns
bun test src/patterns/
5.3 Running Integration Tests
# Prerequisites: database running and migrations applied
npm run db:up
npx prisma migrate deploy
# Auth + database
npm run integration:auth-db
# HTTP CRUD endpoints
npm run integration:http-crud
# Admin user management
npm run integration:http-admin-users
Target coverage: 80% for critical paths, 60% overall.
6. Deployment
6.1 Prerequisites
Node.js 18+
Docker & Docker Compose
Bun (for scripts and CI)
Google Cloud SDK (for GCP deployment)
6.2 Local Development
# 1. Clone the repository
git clone <repository-url>cd personal-profile-prototype
# 2. Install dependencies (Bun lock file present)
bun install
# or: npm install# 3. Configure environment
cp .env.example .env
# 4. Start PostgreSQL
npm run db:up # docker compose up -d# 5. Apply database migrations
npx prisma migrate dev
# 6. Seed the database
npm run prisma:seed
# 7. Start development server
npm run dev # Webpack dev server → http://localhost:3000# or: npm run dev:turbo # Turbopack (faster, experimental)
6.3 Required Environment Variables
# DatabaseDATABASE_URL=postgresql://user:password@localhost:5432/personal_profile_prototype# NextAuthNEXTAUTH_URL=http://localhost:3000NEXTAUTH_SECRET=<random-256-bit-secret># Google OAuth (optional for dev)GOOGLE_CLIENT_ID=<gcp-oauth-client-id>GOOGLE_CLIENT_SECRET=<gcp-oauth-client-secret># Test credentials (dev/staging only)ADMIN_TEST_EMAIL=admin@example.comADMIN_TEST_PASSWORD=admin123VIEWER_TEST_PASSWORD=viewer123# AppNODE_ENV=developmentNEXT_PUBLIC_API_URL=http://localhost:3000
6.4 Docker Production Build
# Build image
docker build -t personal-profile:0.1.0 .# Run with production env
docker run -p 3000:3000 --env-file .env.production personal-profile:0.1.0
# Or use production compose
docker compose -f docker-compose.prod.yml up -d
Stage 2 (production):node:18-alpine — copies built assets only, runs as non-root user nextjs
6.5 CI/CD Pipeline
flowchart TD
A(["📦 Push to main / PR Opened"]) --> B
subgraph CI ["🔄 ci.yml — GitHub Actions"]
direction TB
B["1. Setup Bun"] --> C["2. bun install --frozen-lockfile"]
C --> D["3. prisma generate"]
D --> E["4. prisma migrate deploy\n(ephemeral PostgreSQL service)"]
E --> F["5. prisma seed"]
F --> G["6. integration:auth-db"]
G --> H["7. bun run build"]
H --> I["8. Start dev server\n→ wait for /api/auth/session"]
I --> J["9. integration:http-crud"]
J --> K["10. integration:http-admin-users"]
end
K --> L{"Push to\nmain / staging?"}
L -- "No" --> M(["✅ CI Complete"])
L -- "Yes" --> N
subgraph CD ["🚀 deploy-gcp.yml — GitHub Actions"]
direction TB
N["1. Authenticate to GCP\n(Workload Identity Federation)"] --> O["2. docker build\n→ tag with git SHA + latest"]
O --> P["3. docker push\n→ Google Container Registry (gcr.io)"]
P --> Q["4. gcloud run deploy\n→ Cloud Run (us-central1)\n--set-secrets from Secret Manager"]
Q --> R["5. gcloud run services describe\n→ output live URL"]
end
R --> S(["🌐 Live on Cloud Run"])
Loading
6.6 Deployment Targets
Environment
Platform
Trigger
Development
Local Docker Compose
Manual
Staging
GCP Cloud Run (staging branch)
Push to staging
Production
GCP Cloud Run (prod)
Push to main
7. Maintenance
7.1 Scalability
Horizontal scaling: GCP Cloud Run auto-scales container instances based on request load; stateless Next.js design supports this natively.
Database scaling: Migrate from single PostgreSQL container to GCP Cloud SQL with read replicas as traffic grows.
Content volume: The Composite tree and Adapter pattern ensure new content types can be added without modifying existing rendering logic.
7.2 Monitoring & Logging
Area
Current
Planned
Client errors
console.log + Toast notifications
Sentry / GCP Error Reporting
Server errors
Next.js default
Structured JSON logs → GCP Cloud Logging
Performance
Manual
Core Web Vitals via Vercel Analytics or GCP
Uptime
None
StatusPage.io / GCP Uptime Checks
Analytics
AnalyticsSystem singleton (client-side)
Google Analytics / Plausible
7.3 Maintenance Schedule
Cadence
Task
Weekly
Review CI failures; check error logs for patterns
Monthly
npm audit + dependency security patches; analyze failed API requests
Quarterly
Major framework version upgrades; security audit; load testing; DR drill
Cloud Run revision rollback via gcloud run services update-traffic
7.5 Future Enhancements
AI-Native Content Generation: Integrate an LLM API to auto-generate blog post drafts, project descriptions, and resume bullet points
Database-backed portfolio: Migrate static data/content.ts to Prisma-managed Project, Article, Podcast, and Template models
Full-text search: Add PostgreSQL full-text search or Algolia for the content feed
Accessibility audit: Complete WCAG 2.1 AA remediation and add automated axe-core checks to CI
Progressive Web App (PWA): Add service worker and offline support via next-pwa
Kubernetes manifests: Add Helm chart for multi-region, production-scale deployment
Quick Reference: npm Scripts
npm run dev # Start Webpack dev server
npm run dev:turbo # Start Turbopack dev server
npm run build # Type-check + Next.js production build
npm run start # Start production server
npm run lint # ESLint
npm run db:up # docker compose up -d (PostgreSQL)
npm run db:down # docker compose down
npm run db:logs # Follow PostgreSQL container logs
npm run prisma:generate # Generate Prisma client
npm run prisma:migrate:dev # Apply migrations (dev)
npm run prisma:seed # Seed database via Bun
npm run integration:auth-db # Auth + database integration test
npm run integration:http-crud # HTTP CRUD integration test
npm run integration:http-admin-users # Admin users integration test
Generated from codebase analysis · April 2026 · Personal Profile Prototype v0.1.0
About
Personal-Profile-Prototype: A highly scalable CMS-style personal portfolio. Architected with 14+ Gang of Four (GoF) Design Patterns to systematically manage dynamic layouts, content hierarchies, themes, and complex workflows.