patrick.technology
Self-updating developer portfolio and content platform via Telegram webhooks (because managing content shouldn't be harder than building the site)
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