惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
博客园_首页
博客园 - 【当耐特】
V
Visual Studio Blog
博客园 - 叶小钗
月光博客
月光博客
美团技术团队
J
Java Code Geeks
小众软件
小众软件
Y
Y Combinator Blog
博客园 - Franky
Martin Fowler
Martin Fowler
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
IT之家
IT之家
MyScale Blog
MyScale Blog
人人都是产品经理
人人都是产品经理
Microsoft Security Blog
Microsoft Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
酷 壳 – CoolShell
酷 壳 – CoolShell
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
云风的 BLOG
云风的 BLOG

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
How I built a production AI SaaS as a solo developer
Adrian Fraga · 2026-05-26 · via DEV Community

I built Statementory to review UCAS personal statements with AI. Score out of 100, line-by-line annotations, rewrites, improvement plan. The kind of feedback a good teacher gives you, available at 2am the night before the deadline.

Here's what I learned building it solo.

Everything flows from one constraint: the AI takes 5 minutes

Claude processing a full personal statement and generating structured feedback takes 5 to 10 minutes. Vercel serverless functions timeout at 10 to 60 seconds depending on your plan. So the obvious approach — hit the AI API directly from a route handler — was never going to work.

The solution was separating the job from the request. The API route triggers a background job and returns immediately. The job runs on a separate worker for as long as it needs. The user gets an email when it's done.

This is the architecture decision that everything else depends on. If you're building anything with a slow AI call, solve this first.

The bug that ate my first customers' reviews

The Stripe webhook fires, triggers the background job, done. Simple enough.

Except I was awaiting an email send before triggering the job. Resend was occasionally slow. When it took too long, the serverless function timed out before the job ever fired. Payment went through. Review never generated.

The fix: the job fires first, unconditionally. Everything else — emails, logging, analytics — is best effort after that.

I had to write a recovery script that cross-checked Stripe payments against generated reviews and re-triggered the missing ones. That was a fun Sunday.

Lesson: in a webhook handler, the only thing that matters is triggering the downstream job. Everything else waits.

Custom auth over a library

I tried an auth library first. The App Router support felt half-baked for what I needed and I was fighting the abstraction more than it was helping me.

Custom magic-link auth ended up being about 200 lines. User enters email, gets a link, clicks it, gets a session cookie. No OAuth complexity, no provider dependencies, works exactly how I want.

The tradeoff is maintenance. If I ever need OAuth I'm building it myself. For now it's fine.

The PDF problem nobody warns you about

The review is delivered as an HTML email and a downloadable PDF. The PDF is generated by rendering the HTML in a headless browser.

What nobody tells you: certain unicode characters don't render in headless browsers. I had icons in the report that showed as empty squares in the PDF. Took longer to debug than it should have. The fix was replacing unicode characters with pure CSS shapes.

Test your PDFs on the actual generation environment, not your local machine. Fonts and character support differ.

What I'd tell myself at the start

Three things:

First, solve the slow AI call problem before you write anything else. It touches everything.

Second, pin your third party API versions as constants and import them everywhere. A version mismatch across multiple files is a miserable thing to debug.

Third, GDPR compliance is an architecture decision, not a feature you add at the end. Cascade deletes, data anonymisation, unsubscribe tokens — if you're building for European users, design for deletion from day one.

Statementory is live at statementory.com Happy to answer questions in the comments.