Adapted from the onelinestory repository docs. Private repo.
A collaborative writing platform where many people contribute exactly one sentence at a time to build short stories together.
Each story has a title, optional prompt, target word count (default 1,500), a progress bar, and a feed of the last 5 sentences. Writers are assigned an active story, contribute one sentence (280 chars max), and can shuffle/skip. Users create accounts, see stories they've contributed to, upvote stories, and pin favorites under Your Stories.
Next.js 13+ (App Router) · Prisma ORM · PostgreSQL · iron-session · TailwindCSS · lucide-react · Cloudflare Turnstile CAPTCHA (optional).
/write — story title + prompt, word progress bar, last-N sentences + SHOW MORE, WRITE + SHUFFLE, submission popup (Next Story / Continue Reading / Save This Story)/story/[id] — full story text, progress, Reddit-style upvote (login, one per user)/board — story cards with hot/new/top sorting and week/month/all ranges/account — username, recovery key, contributed + saved storiesvalidateSentence.ts)ADMIN_USERNAMES env-gated list/bulk-delete endpointsGET /api/stories/assign · POST /api/stories/[id]/sentence · GET /api/stories/[id]/full · voting endpoints · GET /api/stories/board · /api/me/* (profile, stories, progress, saved) · /api/auth/* (login, signup, logout, recover)
All knobs centralized in src/config.ts: sentence limits, target words, context tail size, board sort/rank (hot via reddit or wilson algo), feature flags (skip, downvotes, captcha), theme/font-scale.
git clone <repo> && cd onelinestory/web
pnpm install
docker compose up -d # local Postgres
pnpm dlx prisma migrate dev && pnpm dlx prisma generate
pnpm dev # http://localhost:3000/write
black-candle-technologies/onelinestory (private)