Designing Session Cookies That Don't Leak
A field report on building Better-Auth sessions with HTTP-only cookies, rotating tokens, and a cache layer that survives deploys.
- #better-auth
- #cookies
loading route
Hi, I'm hocein — a Full-Stack Developer who enjoys building modern applications with Next.js, React, TypeScript, PostgreSQL, and Prisma.
// try it · type 'help'
// 01 · about
I'm a software developer with a strong passion for the Next.js ecosystem (TypeScript + Tailwind), Go-powered API routes, and database orchestration via Prisma across SQLite, MySQL, and PostgreSQL.
I obsess over auth done right — Better-Auth sessions, HTTP-only cookies, and caching layers that keep REST endpoints fast without leaking state.
// 02 · articles
Half terminal-confessions, half field notes from production.
A field report on building Better-Auth sessions with HTTP-only cookies, rotating tokens, and a cache layer that survives deploys.
Server components, partial prerendering, and the small dance of streaming UI without paying for hydration twice.
A safe playbook for shadow databases, expand-and-contract schemas, and rollbacks you'll actually trust.
// 03 · projects
An interactive DevTools-styled tour of JavaScript itself — built while going deep on how the language actually works, with a real sandboxed REPL and an instrumented (not simulated) event loop visualizer.
Studivo is a multi-tenant SaaS for managing study halls (سالن مطالعه): real-time seat booking and live seat maps, subscription/renewal tracking, role-based staff dashboards, and per-hall public booking pages. Built with Next.js, Prisma, and PostgreSQL.
// 04 · uses
Hardware, OS, and software I actually reach for. No affiliate links, just opinions.
// 05 · contact
Got an idea, a server on fire, or just want to nerd out? Drop a message.
// or reach out on