Skip to main content

patrick.technology

Self-updating developer portfolio and content platform via Telegram webhooks (because managing content shouldn't be harder than building the site)

typescriptnext.jsexpressprismapostgresqltelegramwebhooksrailway
Progress90%

What it is

A full-stack personal website and content platform built from scratch, running in production at patrick.technology. It started as a simple blog and evolved into an AI-integrated publishing system with its own credit economy, and a cast of configurable AI co-founders.

Architecture

Two services on Railway behind a custom domain (api.patrick.technology):

  • Frontend — Next.js App Router with server components and streaming. Static pages are SSR'd at request time; admin pages are client components behind session-cookie auth with CSRF protection. Content-Security-Policy, canonical URLs, JSON-LD structured data, and llms.txt are all baked in.
  • Backend — Express.js REST API with Prisma ORM. Sessions in Redis. Image uploads proxied through Cloudinary. Prisma migrations run automatically on deploy via AUTO_RUN_PRISMA_MIGRATIONS. Metrics endpoint with a Prometheus-compatible format.

Content

Four distinct content types, each with its own route, feed, and RSS: Section Purpose Blog Long-form essays and analysis Research Annotated deep dives into AI and systems Diary Field log — building in public from Israel Stream Quick takes and observations All content is managed through a custom admin dashboard — no CMS dependency. Posts support revisions, reactions, voting, and related-post linking.

AI Team

Two configurable AI agents — Aurel (Co-Founder & Chief of Staff) and Søren (Co-Founder & CTO) — each with their own system prompt, knowledge base, and chat interface. Visitors can open a chat modal and talk to either agent. The admin can update their personalities, capabilities, and shared knowledge base (about Patrick, the company, current projects) without touching code.

Gamification & Credit Economy

Visitors accumulate credits through site interactions. Credits unlock:

  • Priority DM — pay credits to send a direct message that lands in Telegram
  • Energy boosts — boost individual projects in the radial orbital timeline visualization (two tiers: small and large)
  • Save progress — cross-session credit persistence via email prompt The credit economy parameters (earn rates, costs, thresholds) are configurable from the admin without a deploy.

Telegram Integration

The entire site can be operated from a phone via a Telegram bot:

  • Post diary entries by sending a message (with optional photo)
  • Receive Priority DM notifications instantly
  • Admin-only commands verified by Telegram user ID
  • Webhook with secret-token validation; retries with exponential backoff

Interesting Engineering Details

  • Animated SVG hero — 16 nodes, 23 edges, signal particles via SMIL animateMotion, all defined in pure TypeScript coordinate arrays — no canvas, no library
  • Living changelog — a real-time feed that rebuilds itself on content changes via a server-sent rebuild queue
  • Radial orbital timeline — interactive D3-style React component showing projects as orbiting nodes with energy states and expandable detail panels
  • OpenAPI spec — backend routes documented with a generated OpenAPI 3.0 schema
  • Two-config consolidation — merged a silently-ignored next.config.ts into the Railway-loaded next.config.mjs, recovering lost image format settings and security headers

Scale & Operations

  • CI via GitHub Actions (lint, type-check, backend tests)
  • Zero-downtime deploys on Railway with automatic rollback on health-check failure
  • Custom domain (api.patrick.technology) decouples the backend URL from Railway service names — surviving future infrastructure moves without a frontend redeploy

Stack

Next.js 14 (App Router) · TypeScript · Express.js · Prisma · PostgreSQL · Redis · Railway · Cloudinary · Telegram Bot API · Anthropic Claude · OpenAI · Resend