back to projects
Prisma Press — Blogging Platform API

project

Backend API

Prisma Press — Blogging Platform API

A full-featured blogging platform API with posts, comments, admin moderation, and Stripe-powered subscriptions.

$ stack --list

TypeScriptExpress.jsPrismaPostgreSQLStripeJWT

description

Prisma Press is a RESTful blogging platform built with Express 5, TypeScript, and Prisma ORM over PostgreSQL. Users register, get a profile automatically, and can create, edit, and publish posts with tags, thumbnails, and view counts (tracked via transaction on each read). Comments support admin moderation with approve/reject states. Auth uses JWT access and refresh tokens delivered as httpOnly cookies, with the refresh token rotating a fresh access token so the client never has to handle raw tokens. It also includes a working Stripe integration — checkout sessions, webhook-verified payment events, and a subscription status endpoint tied to each user's account.

challenges

Keeping local subscription state in sync with Stripe's webhook events was the hardest part — the database has to reflect whatever Stripe says happened (payment succeeded, subscription renewed or cancelled) without a race condition if a user checks their status right after paying. Designing the refresh-token rotation so expired access tokens renew silently via httpOnly cookies, without ever exposing a token to client-side JavaScript, took a few iterations to get right.

next up

Add full-text search and tag-based filtering across posts, a public analytics endpoint so authors can track their own post performance, and rate limiting on the comment endpoints.