Bookwise
2025Library management system
Bookwise is a full-stack library management system. Members discover, borrow and return books through an approval-based flow. Admins manage users and inventory behind protected routes. Background jobs send emails, reminders and overdue notices.
- Next.js
- Drizzle
- Upstash Redis
- QStash
- Nodemailer
A tour of Bookwise
Approval-based sign-up, role-based access for admins, and background jobs for email.
01The reader-facing library
The catalog members see after signing in, with search, filters and borrowing.

The catalog is the entry point for members. Each book exposes availability, a borrow CTA, and a request flow that gates writes behind authentication and rate limiting.
- Next.js
- App Router
- NextAuth
02Admin dashboard
Where admins approve members, manage inventory and track borrowing. Every route checks the user's role.

admin · overview
Admin routes live behind a middleware that rejects unauthenticated and non-admin sessions before the page renders. Inventory and member tables update optimistically, with a server confirmation pass that rolls the UI back on conflict.
- NextAuth
- RBAC
- Drizzle ORM
- Server Actions
03Email automation
Emails go out through QStash and Nodemailer. Status changes send an email right away; overdue reminders are scheduled jobs that stay off the request path.

account approved
QStash holds the schedule and survives application restarts; the workers are pure HTTP endpoints, so the email pipeline scales independently from the web tier. Failures retry with exponential backoff and dead-letter visibility.
- QStash
- Nodemailer
- Webhooks
04Rate limiting
A Redis-backed limiter in front of write endpoints throttles each IP and account to slow down brute-force and scraping.

The limiter is a sliding window in Upstash Redis. Endpoints expose standard X-RateLimit-* headers so honest clients can back off cleanly; abusive clients get 429s before the database is touched.
- Upstash Redis
- Sliding window
- Middleware







