Readwise is a Next.js (React) web application developed as part of the research project:
"Accelerating Book Recommendations: Real-Time Personalization on Social Review Platforms with FAISS and LDA"
It enables users to discover, review, and discuss books through real-time, personalized recommendations powered by FAISS and LDA.
- β‘ Real-Time Recommendations: Sub-50ms latency using FAISS and topic modeling (LDA).
- π§ User Onboarding: Multi-step flow to initialize reading preferences.
- π¬ Social Interactions: Thread creation, comments, and ratings on books.
- π Book Discovery: Search, trending books, metadata, and reviews.
- π€ User Profiles: View personal threads and recommendation history.
- π³ Purchase / Rental System: Rent or buy books directly within the app.
- π Responsive UI: Built with Tailwind CSS, dark/light theme switcher, and Geist fonts.
- Node.js: v18.x or higher
- npm: For dependency management
- Backend API: e.g.,
https://x.ai/api - Fonts:
GeistMonoVF.woffandGeistVF.woffshould be placed inapp/fonts/
git clone https://github.com/one-Alive/readwise.git
cd readwisenpm installCreate a .env.local file in the root directory for clerk api
npm run devOpen http://localhost:3000 in your browser.
/auth/sign-up/auth/sign-in
welcome.tsxβ Welcome screeninterests.tsxβ Select interestsrecommendation.tsxβ Preview personalized recommendationsfinal.tsxβ Finalize and save preferences
-
Trending:
/discover -
Search:
/search -
Book Details:
/details/[id]- Includes:
BookMetadataCard,SampleReviewCard, andComments
- Includes:
- Create threads:
/create-thread - View threads and engage:
/thread/[id] - Rate books using the
Ratingcomponent
- View user activity:
/profile/[id] - Explore personal threads via
ThreadsTab
- Rent:
/rentals/[id]/[user_id] - Buy:
/purchase/[id]/[user_id]
Located in the ss/ folder:
homepage.pngonboarding.pngbook-details.pngrecommendations.pngprofile.png
readwise/
βββ app/
β βββ (auth)/
β β βββ onboarding/
β β βββ sign-in/
β β βββ sign-up/
β βββ (root)/
β β βββ create-thread/
β β βββ details/[id]/
β β βββ discover/
β β βββ profile/[id]/
β β βββ purchase/[id]/[user_id]/
β β βββ rentals/[id]/[user_id]/
β β βββ search/
β β βββ thread/[id]/
β βββ fonts/
β βββ ThemeProvider.tsx
βββ components/
β βββ cards/
β βββ forms/
β βββ onboarding/
β βββ shared/
β βββ ui/
βββ lib/
β βββ actions/
β βββ validations/
β βββ utils.ts
βββ public/
βββ ss/
βββ .env.local
βββ next.config.mjs
βββ tailwind.config.ts
βββ tsconfig.json
βββ README.md
npm run devβ Start development servernpm run buildβ Build for productionnpm run startβ Launch production build
- Next.js β App Router, SSR, SSG
- React + TypeScript β Component-driven development
- Tailwind CSS β Utility-first styling
- Axios β For API communication
- Geist Fonts β Custom font system
- React:
https://cdn.jsdelivr.net/npm/[email protected]/umd/react.production.min.js - ReactDOM:
https://cdn.jsdelivr.net/npm/[email protected]/umd/react-dom.production.min.js
Endpoint:
Example Request:
{
"user_id": "user_1",
"liked_book_ids": ["1001", "1002"],
"preferred_author_ids": ["author_1"],
"user_interests": ["science", "fiction"],
"top_n": 5
}Example Response:
[
{
"book_id": "1003",
"title": "Science Book A",
"similarity": 0.95
}
]This repository contains only the frontend. The Flask-based backend, including FAISS, LDA, and recommendation logic, will be released separately.
npm run buildThis project is licensed under the MIT License.
Questions or feedback? Reach out to @oneAlive or open an issue.