Bookpheral

Visit Website

STACK

Next JS, TypeScript, React, Tailwind CSS, Express, Drizzle ORM, PostgreSQL, Supabase, Redis, Paystack, Turborepo

TYPE

EdTech Platform

STATUS

Beta Testing

Bookpheral's screenshot
Bookpheral's screenshot

Bookpheral is a two-sided platform connecting African educators, lecturers and independent authors (Earners) with the students and readers (Buyers) who buy their books. It's a Turborepo monorepo I co-founded and built from the ground up: a Next.js marketing site, a React/Vite creator and admin dashboard, and an Express/Drizzle/PostgreSQL API, with a companion React Native reader (see Bookpheral Mobile). Earners upload an EPUB, DOCX, or PDF manuscript, which goes through review before it's listed for sale. Buyers purchase through Paystack and read in a protected in-browser viewer — PDF.js today, with a server-rendered reader (where the raw file never reaches the client) planned as the platform's core anti-piracy story. Every account is capped at one active reading device, enforced atomically in Redis so a second sign-in hard-kicks the first and emails the account holder. A dedicated attendance feature lets an educator run a link-gated, geofenced class check-in — a deliberate, narrow exception to an otherwise firm "no classroom/LMS features" product boundary. Revenue splits 70/30 (educator/platform) by default, 75/25 for members of the Founding Educators Circle, the first 100 educators who joined ahead of launch.

GOALS

Building Bookpheral as a co-founder rather than just a hired engineer changed how I weigh technical decisions — a lot of the architecture here (the split-payment model, the device-limit design, what counts as in scope for "attendance" versus a full LMS) came out of product and business conversations as much as engineering ones. Modelling money correctly, where a rounding or ordering mistake is a real financial bug and not just a UI glitch, made me far more disciplined about writing the fee and split math as small, directly testable functions rather than inline checkout logic. It's also the project that's taught me the most about content-protection tradeoffs: client-side DRM is inherently a speed bump, not a lock, and being honest about that with ourselves shaped the roadmap toward server-rendered delivery instead of over-promising what a PDF.js viewer alone can guarantee.

Bookpheral's screenshot
Bookpheral's screenshot

CHALLENGES

Three problems shaped this more than any others. The first was content protection: we shipped a client-side PDF.js viewer to get a working reader out quickly, then recognised that a viewer rendering the actual file in the browser is a speed bump, not a lock — real protection needs a server-rendered reader where the raw file never reaches the client at all, which turned "add DRM" from a feature into a migration we're still completing. The second was stopping one paid account from being read on multiple devices at once: two near-simultaneous logins both have to agree on whether a device slot is already taken, which pushed me toward Redis's atomicity primitives instead of a naive read-then-write that two requests could both pass. The third, and the one that touched the most code, was payments: Bookpheral was originally designed around a wallet model, where the platform held each sale and earners withdrew their balance on request, until it became clear that model doesn't satisfy how a processor like Paystack requires marketplace funds to move for compliance reasons. That forced a rebuild onto a split-payment model — every earner gets a Paystack subaccount and is paid directly out of the transaction at the moment of charge, never from a balance Bookpheral holds. Making that compliant meant reworking checkout end to end: computing and recording each earner's split (and any co-author's) before the charge completes, treating the listed price as the one number the buyer actually pays so the gateway fee is carved back out of it to work out real earnings, refusing a sale outright if anyone owed a share hasn't linked a payout account yet, and retiring the old wallet withdrawal flow to a legacy, read-only path instead of ripping it out from under balances that already existed.

Bookpheral's screenshot
Bookpheral's screenshot

Contact

Interested in working with me?