case/postgress-playing.md
Open source

Short Stories

Full-stack developer

Fiction platform — publish stories, follow authors, lists & series, Postgres full-text search.

Visual for Short Stories
Details

Short Stories (short-stories in the root package.json) is a small fiction platform: users register, write short stories, publish them, and readers browse, search, comment, and like. The repo folder is named PostgressPlaying — a pnpm monorepo with separate frontend and backend packages, backed by PostgreSQL.

What it does

Stories support draft, published, and archived states, view counts, tags, and rich detail pages with comments, similar stories, and more by the same author.

Auth & profiles use email/password with JWT, public profiles, and optional avatars via Cloudflare R2 presigned uploads.

Social features include likes, comments, and following other users.

Organization covers series (ordered stories), personal reading lists (public or private), and drag-and-drop ordering in the UI with @dnd-kit.

Discovery includes a home feed, PostgreSQL full-text search on title, summary, and content, plus tag filtering.

Admin is a protected panel for moderation-style tasks.

Local dev typically runs Postgres via Docker Compose (short_stories database on port 5432).

How it’s built

Classic SPA + JSON API: the React client talks to the backend on port 3000 (default); the API owns business logic and persistence.

LayerStack
FrontendReact 19, TypeScript, Vite, React Router, TanStack Query, Chakra UI, Axios
BackendFastify (CORS, Helmet), REST under /api/*, Zod validation, bcrypt + JWT middleware
DataPrisma ORM, PostgreSQL 16, migrations + seed/clear scripts
OpsRoot scripts dev:backend, dev:frontend, build; env via .env.example (DB, JWT, R2)

Source and setup: github.com/BenPPG/PostgressPlaying

Next step

Need a similar site, integration, or refresh? Tell me what you are building.

Discuss a project