Manikantkr-1004 /
BookHub
BookHub is a sophisticated online platform combining a feature-rich bookstore with a lively reading community, AI-powered, employing Angular for an immersive frontend experience.
35/100 healthLoading repository data…
UnknownHawkins / repository
BookHub is an enterprise-grade digital library and social reading platform designed with a modern full-stack architecture. It enables users to discover books through Google Books, generate AI-powered digital books, write reviews, rate titles, and build personalized libraries. Built with Next.js, Express, PostgreSQL, Prisma, Clerk Authentication.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
BookHub is a high-performance, full-stack Digital Library & Social Reading Platform designed as a scalable Turborepo Monorepo. Built using Next.js, Express, serverless PostgreSQL (Prisma), and cached Redis, it features robust Clerk authentication and deep AI integration with DeepSeek and Google Books.
BookHub utilizes a modern monorepo topology with isolated workspaces and shared packages.
graph TD
subgraph Client Layer [Frontend - Vercel]
NextJS["Next.js App Router (Hobby/Prod)"]
Zustand["Zustand State Store"]
ReactQuery["React Query (Cache Layer)"]
end
subgraph Auth Provider
Clerk["Clerk JWT Authentication"]
end
subgraph API Layer [Backend - Render]
Express["Express API Server"]
Prisma["Prisma ORM Client"]
end
subgraph Database & Cache
Postgres[(Neon PostgreSQL Serverless)]
Redis[(Upstash Redis Cache)]
end
subgraph External Integrations
DeepSeek["DeepSeek AI (E-Book Generator)"]
GoogleBooks["Google Books API"]
end
%% Relations
NextJS -->|JWT Bearer Token| Express
NextJS -->|Auth Token| Clerk
Express -->|Verify JWT| Clerk
Express -->|Prisma Pooler| Postgres
Express -->|Rate Limit / Cache| Redis
Express -->|Generate Chapters| DeepSeek
Express -->|Fetch External Volume| GoogleBooks
BOOK_REVIEW_APP/
├── apps/
│ ├── web/ # Next.js 15 App Router Frontend
│ │ ├── src/app/ # App routes (Dashboard, Library, Admin, Auth)
│ │ └── src/store/ # Zustand Auth & UI state stores
│ └── api/ # Express.js + TS Backend API
│ ├── src/controllers/ # Route controllers (AI, Auth, Books, Reviews)
│ ├── src/middlewares/ # Auth (Clerk JWT), CORS Sanitizers, Error handlers
│ └── prisma/ # Neon Postgres Schemas & Migrations
└── packages/
└── shared/ # Shared TypeScript Type Definitions & Zod Schemas
| Layer | Component | Description |
|---|---|---|
| Monorepo | Turborepo | High-performance build cache system & task runner |
| Frontend | Next.js 15 | App Router, Server/Client components, dynamic SSR |
| Backend | Express + TS | REST API server compiled & watched via tsx |
| Auth | Clerk Express | User identity and secure session management |
| Database | Neon Postgres | Serverless PostgreSQL with PGBouncer pooling |
| Caching | Upstash Redis | Low-latency caching for API rate-limiting |
| ORM | Prisma | Typesafe database client generation & migration tool |
| Validation | Zod | Shared frontend/backend API validation schemas |
When a user views details or requests an AI E-Book for a search result returned directly from the Google Books API, the backend automatically performs a non-destructive upsert. It connects categories and authors dynamically, and binds them to a unique record. This ensures users can instantly rate, write reviews, and post vibe checks on externally fetched books without duplicate data conflicts.
The E-book module requests DeepSeek to generate a complete chapter-by-chapter reading version of the book's content (at least 5 chapters, 1,500–2,000 words per chapter).
500 server errors are never exposed to the client.To prevent browser preflight checks (OPTIONS) from failing due to minor configuration discrepancies (like adding a trailing slash to environment variables on Render), the Express server runs a custom sanitizer middleware:
let allowedOrigin = process.env.CLIENT_URL || "http://localhost:3000";
if (allowedOrigin.endsWith("/")) {
allowedOrigin = allowedOrigin.slice(0, -1);
}
POST /api/auth/register — Create local user account matching Clerk ID.POST /api/auth/login — Sign in and create local session token.POST /api/auth/refresh — Refresh expired JWT token.GET /api/books — Fetch catalog books (supports filtering, search, pagination).POST /api/books — Store/import a book to the local database.GET /api/books/:id — Fetch detailed book information, stats, and reviews.POST /api/books/:id/digital-book — Retrieve or generate full AI E-book chapters.POST /api/reviews — Post a review (headline, vibe, rating, optional sticker badge).POST /api/reviews/:id/like — Toggle a like on a review.POST /api/reviews/:id/report — Report a review for moderation.git clone https://github.com/UnknownHawkins/BOOK_REVIEW_APP.git
cd BOOK_REVIEW_APP
npm install
Create /apps/api/.env:
DATABASE_URL="postgresql://neondb_owner:...&pgbouncer=true"
DIRECT_URL="postgresql://neondb_owner:..."
PORT=5000
NODE_ENV=development
JWT_SECRET="dev_secret_key"
DEEPSEEK_API_KEY="your_api_key"
GEMINI_API_KEY="your_api_key"
GOOGLE_BOOKS_API_KEY="your_api_key"
UPSTASH_REDIS_REST_URL="https://..."
UPSTASH_REDIS_REST_TOKEN="..."
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="pk_test_..."
CLERK_SECRET_KEY="sk_test_..."
Create /apps/web/.env.local:
NEXT_PUBLIC_API_URL=http://localhost:5000/api
NEXT_PUBLIC_SITE_URL=http://localhost:3000
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/auth/login
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/auth/register
NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=/
NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=/
Run the parallel workspace developers:
npm run dev
apps/web.cd ../.. && npx turbo run build --filter=bookhub-web
.next).apps/api.npm install && npx prisma generatenpx tsx src/index.tsCLIENT_URL env variable to Vercel's live deployment URL (no trailing slash).Selected from shared topics, language and repository description—not editorial ratings.
Manikantkr-1004 /
BookHub is a sophisticated online platform combining a feature-rich bookstore with a lively reading community, AI-powered, employing Angular for an immersive frontend experience.
35/100 health