https://github.com/one-alive/readwise
A social book review and discovery platform with real-time, personalized recommendations using FAISS and LDA. Built with Next.js, Tailwind CSS, and TypeScript.
https://github.com/one-alive/readwise
book-discovery book-recommendation clerk-auth clerk-authentication faiss lda nextjs react real-time-recommendations recommender-system social-platform tailwindcss typescript webapp
Last synced: about 2 months ago
JSON representation
A social book review and discovery platform with real-time, personalized recommendations using FAISS and LDA. Built with Next.js, Tailwind CSS, and TypeScript.
- Host: GitHub
- URL: https://github.com/one-alive/readwise
- Owner: one-Alive
- Created: 2025-05-12T15:14:43.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-12T15:37:51.000Z (about 1 year ago)
- Last Synced: 2025-05-12T22:59:22.525Z (about 1 year ago)
- Topics: book-discovery, book-recommendation, clerk-auth, clerk-authentication, faiss, lda, nextjs, react, real-time-recommendations, recommender-system, social-platform, tailwindcss, typescript, webapp
- Language: TypeScript
- Homepage:
- Size: 5.25 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ Readwise: Social Book Review Platform
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**.
---
## ๐ Features
- โก **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.
---
## ๐ ๏ธ Prerequisites
- **Node.js**: v18.x or higher
- **npm**: For dependency management
- **Backend API**: e.g., `https://x.ai/api`
- **Fonts**: `GeistMonoVF.woff` and `GeistVF.woff` should be placed in `app/fonts/`
---
## โ๏ธ Setup Instructions
### 1. Clone the Repository
```bash
git clone https://github.com/one-Alive/readwise.git
cd readwise
````
### 2. Install Dependencies
```bash
npm install
```
### 3. Configure Environment Variables
Create a `.env.local` file in the root directory for clerk api
### 4. Start the Development Server
```bash
npm run dev
```
Open [http://localhost:3000](http://localhost:3000) in your browser.
---
## ๐งช Usage
### ๐ Authentication
* `/auth/sign-up`
* `/auth/sign-in`
### ๐งญ Onboarding (`/auth/onboarding`)
1. `welcome.tsx` โ Welcome screen
2. `interests.tsx` โ Select interests
3. `recommendation.tsx` โ Preview personalized recommendations
4. `final.tsx` โ Finalize and save preferences
### ๐ Book Discovery
* Trending: `/discover`
* Search: `/search`
* Book Details: `/details/[id]`
* Includes: `BookMetadataCard`, `SampleReviewCard`, and `Comments`
### ๐ฌ Community
* Create threads: `/create-thread`
* View threads and engage: `/thread/[id]`
* Rate books using the `Rating` component
### ๐ค Profiles
* View user activity: `/profile/[id]`
* Explore personal threads via `ThreadsTab`
### ๐ธ Buy or Rent Books
* Rent: `/rentals/[id]/[user_id]`
* Buy: `/purchase/[id]/[user_id]`
---
## ๐ผ๏ธ Screenshots
Located in the `ss/` folder:
* `homepage.png`
* `onboarding.png`
* `book-details.png`
* `recommendations.png`
* `profile.png`
---
## ๐ Project Structure
```
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
```
---
## ๐ฆ Scripts
* `npm run dev` โ Start development server
* `npm run build` โ Build for production
* `npm run start` โ Launch production build
---
## ๐งฐ Technologies
* **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
#### CDN Fallbacks
* React: `https://cdn.jsdelivr.net/npm/react@18.2.0/umd/react.production.min.js`
* ReactDOM: `https://cdn.jsdelivr.net/npm/react-dom@18.2.0/umd/react-dom.production.min.js`
---
## ๐ API Integration
**Endpoint:**
**Example Request:**
```json
{
"user_id": "user_1",
"liked_book_ids": ["1001", "1002"],
"preferred_author_ids": ["author_1"],
"user_interests": ["science", "fiction"],
"top_n": 5
}
```
**Example Response:**
```json
[
{
"book_id": "1003",
"title": "Science Book A",
"similarity": 0.95
}
]
```
---
## โ ๏ธ Note on Backend
> This repository contains **only the frontend**.
> The **Flask-based backend**, including FAISS, LDA, and recommendation logic, will be released separately.
---
## ๐ Deployment
```bash
npm run build
```
---
## ๐ License
This project is licensed under the **MIT License**.
---
## ๐ฌ Contact
Questions or feedback?
Reach out to **@oneAlive** or open an issue.