Somali Library Books
# Somali Library Books
A digital library + bookstore platform: buy books permanently, rent by the hour/day/week/month,
and read online (PDF/EPUB/audiobook) from any device.
> **Founded and Managed by Ahmed Hassan Idiris**
---
## What's in this scaffold
This is a real, working starting point — not a mockup. It is **not** the full enterprise platform
described in the brief; that is a multi-month build for a small team. Here's exactly what's done
and what's stubbed, so you know where you stand.
### ✅ Built and working
- **Database**: complete Supabase/Postgres schema (`supabase/migrations/0001_init_schema.sql`) —
25+ tables covering users, books, categories, orders, purchases, rentals, subscriptions,
payments, reviews, bookmarks, notes, reading progress, notifications, challenges, achievements,
rewards, AI recommendations, and site settings. Row Level Security is enabled and policied on
every table (owner-only data, public catalog reads, admin overrides). Triggers auto-create a
profile on signup and keep book ratings in sync.
- **Auth**: working sign up / sign in against Supabase Auth (email + password). Middleware
protects `/admin`, `/account`, and `/read` routes and checks the `admin` role server-side.
- **Storefront**: home page, browse/search/filter page, book detail page with a working buy/rent
toggle UI, about page with the founder section.
- **Reading shell**: `/read/[id]` checks auth, loads the book record, and renders a PDF viewer
frame with a reading toolbar (font size, dark/light, bookmark button, fullscreen).
- **Admin**: sidebar shell, overview dashboard, a real Supabase-backed books table, and a settings
page that surfaces founder/system info and lists payment providers.
- **Design system**: the brief's exact palette and type system (Playfair Display / Cinzel / Inter
/ Merriweather, royal blue + gold + emerald) wired into Tailwind, with a glassmorphism card
style used throughout.
### 🚧 Stubbed / not yet built (next passes)
- **Payments**: no Stripe …