Building CASOR E-Library: a reader, a shelf and an approval queue

Published
Reading time
1 min read

How the academic library platform fits together: PDF uploads, a gated catalogue, reading progress per book and the admin tools behind it.

CASOR E-Library is a digital academic library for students. I started it in July 2025 under a working name, StackShelf, and it took the CASOR name in August. I built the catalogue, the reader, the upload flow and the admin tools.

It runs on Next.js 15 and TypeScript, with PostgreSQL through Prisma, Clerk for sign-in, UploadThing for files, TanStack Query and react-pdf for reading.

Uploads and the approval queue

A book is a PDF of up to 64MB plus an optional cover image of up to 4MB. Every book has an approved flag that starts as false, and the public library only ever lists approved books.

Admins get a queue where they can approve, reject, feature or unfeature a book. Approving one sends the uploader a notification that it's now in the library. To be honest about the current state: the upload route auto-approves new books for now, so the queue is ready but not yet in the way.

Reading

The reader shows one page at a time with page, zoom and rotate controls. Progress is stored once per reader per book, with the current page, the percentage and a completed flag that flips at 100%. Readers can also keep bookmarks by page, highlights and notes.

Search matches the title, author or description without caring about case, can be narrowed by genre and author, and remembers recent searches.

Beyond the shelf

The schema grew to 21 models. Besides books and reading, there are book clubs with discussions, forum posts, reviews, reading goals and reading lists, reports and moderation actions, and notification settings.

The site is live on Vercel.