How okeson453/portfolio works
Purpose and Runtime
Okeson is a cybersecurity-focused professional portfolio with public content, interactive security tools, user accounts, and blog administration. It runs as a Next.js 15 App Router application using React 19, TypeScript, Tailwind CSS, and server/API routes. Primary entry points are app/layout.tsx, app/page.tsx, and middleware.ts.
Public Site and Content Delivery
Public routes render portfolio sections, projects, experience, skills, legal pages, and contact content. The home page composes reusable presentation components; dedicated routes support project and blog detail pages. Blog content includes local MDX posts and route-based views.
• app/page.tsx
• app/projects/[slug]/page.tsx
• app/blog/[slug]/page.tsx
SEO/discovery are first-class route outputs through sitemaps, robots, RSS, and dynamic Open Graph image endpoints.
• app/sitemap.ts
• app/feed.xml/route.ts
• app/api/og/blog/route.tsx
Authentication, Accounts, and Protected Areas
Authentication is implemented through route handlers for registration, login, logout, JWT refresh, session lookup, email/password recovery, email verification, device management, and two-factor verification. Client account state and settings UI are separated into hooks and route pages. Middleware is the likely request-level boundary for route protection/security policy.
• app/api/auth/login/route.ts
• app/api/auth/refresh/route.ts
• app/settings/security/two-factor/page.tsx
Authenticated experiences include the user dashboard plus admin and dashboard-admin views.
• app/dashboard/page.tsx
• app/admin/layout.tsx
• app/admin/blog/page.tsx
Persistence and Operational APIs
Prisma defines the relational persistence model, migrations, and seed process; local database startup is encapsulated in a script. API handlers form the server boundary for account, comments, contact, search, feature flags, metrics, health, and chat operations.
• prisma/schema.prisma
• prisma/migrations/add_refresh_token_model/migration.sql
• scripts/db-up.sh
Email-related flows include contact delivery and blog subscriptions/history/scheduling. Resend is the declared production email provider; scheduled publishing is exposed through a cron route.
• app/api/contact/route.ts
• app/api/blog/subscribe/route.ts
• app/api/cron/blog-publish/route.ts
Interactive Client Features
Client-side components provide security scanning, password assessment, chat, comments, search, command palette, offline behavior, theme control, and settings forms. Shared hooks encapsulate client state such as auth, realtime behavior, feature flags, uploads, and two-factor flows.
• components/SecurityScanner.tsx
• components/SecurityChatWidget.tsx
• hooks/useAuth.ts
The root UI composes shared navigation, global UI, providers, and progressive/deferred sections, preserving server rendering where possible and isolating interactive behavior.
• components/Navigation.tsx
• components/GlobalUIComponents.tsx
• components/providers/ClientInitializer.tsx
Security, Reliability, and Observability Boundaries
Security-related providers and UI surface CSP nonce handling, client security initialization, security status, threat intelligence, and compliance indicators. Sentry client/server configuration supports error monitoring. Health and metrics routes provide operational integration points.
• components/providers/CSPNonceProvider.tsx
• components/security/ThreatIntelligenceFeed.tsx
• app/api/health/route.ts
Deployment and Delivery
The primary deployment target is Vercel, with repository workflows also covering CI/CD, E2E, Lighthouse, and optional Netlify deployment. A service worker and offline page support PWA/offline behavior. Environment configuration includes app URL, Resend credentials, and JWT secrets.
• vercel.json
• .github/workflows/deploy-vercel.yml
• public/sw.js
Main entry points: layout.tsx App shell & home · schema.prisma Prisma data layer · middleware.ts Request security boundary · route.ts Operational APIs
Components 17
Client Experience
- Browser / PWA · Offline-capable public and authenticated experience.
public/sw.js - Interactive features · Security tools, chat, comments, search, and settings UI.
components/SecurityScanner.tsx - Client initialization · Bootstraps client-side global behavior and providers.
components/providers/ClientInitializer.tsx
Next.js Application
- App shell & home · Root layout and composed public portfolio experience.
app/layout.tsx - Public content routes · Project and MDX-backed blog detail views.
app/blog/[slug]/page.tsx - SEO & discovery outputs · Sitemap, RSS, and dynamic social images.
app/sitemap.ts - Request security boundary · Applies route protection and request-level security policy.
middleware.ts - Authentication API · Login, registration, sessions, refresh, recovery, verification, and 2FA.
app/api/auth/login/route.ts - Dashboard & admin · User dashboard, account settings, and blog administration.
app/admin/layout.tsx - Operational APIs · Contact, comments, search, flags, metrics, health, and chat.
app/api/health/route.ts - Email & publishing jobs · Subscriptions and scheduled blog publishing.
app/api/cron/blog-publish/route.ts
Data & External Services
- Prisma data layer · Relational models, migrations, and seeded persistence.
prisma/schema.prisma - Relational database
- Resend · Production email delivery provider.
Delivery & Operations
- Monitoring & health · Sentry error monitoring plus health and metrics integration.
- Vercel deployment · Primary production deployment target.
vercel.json - CI/CD workflow · Build and deployment automation.
.github/workflows/deploy-vercel.yml
Connections 20
- Browser / PWA → Request security boundary: requests
- Request security boundary → App shell & home: allows public routes
- Request security boundary → Authentication API: auth requests
- Request security boundary → Dashboard & admin: guards access
- App shell & home → Public content routes: links to content
- App shell & home → Client initialization: hydrates providers
- Client initialization → Interactive features: enables
- Interactive features → Operational APIs: uses
- Interactive features → Authentication API: account state
- Authentication API → Prisma data layer: reads and writes
- Dashboard & admin → Prisma data layer: manages content and accounts
- Operational APIs → Prisma data layer: persists application data
- Prisma data layer → Relational database: queries
- Email & publishing jobs → Prisma data layer: loads subscriptions and posts
- Email & publishing jobs → Resend: sends email
- Operational APIs → Resend: delivers contact mail
- App shell & home → SEO & discovery outputs: publishes discovery metadata
- Operational APIs → Monitoring & health: health and metrics
- CI/CD workflow → Vercel deployment: deploys
- Vercel deployment → App shell & home: hosts