An open API service indexing awesome lists of open source software.

https://github.com/2003harsh/readersphere

ReaderSphere is a Flask-based social platform for book lovers with user profiles, book ratings, genre-based friend recommendations, and real-time messaging. Books are searchable via web scraping, and features like friend requests, user search, and group chats use WebSockets. It’s designed for interactive community-driven book discussions.
https://github.com/2003harsh/readersphere

cosine-similarity docker flask gemini-api postgresql-database render-deployment socket-io

Last synced: about 2 months ago
JSON representation

ReaderSphere is a Flask-based social platform for book lovers with user profiles, book ratings, genre-based friend recommendations, and real-time messaging. Books are searchable via web scraping, and features like friend requests, user search, and group chats use WebSockets. It’s designed for interactive community-driven book discussions.

Awesome Lists containing this project

README

          

# πŸ“š ReaderSphere

**ReaderSphere** is a social media platform built for book lovers β€” a space to connect, share, and chat about your favorite reads. Whether you're looking to discuss novels, make friends with similar interests, or explore new book recommendations, ReaderSphere has something for every reader.

---

## πŸ“Έ Screenshots

### πŸ” Profile
![Profile Page](artifacts/1.png)
*User profile view and editing (bio, profile pic, DOB).*

### πŸ“š Book Search
![Book Search](artifacts/3.png)
*Search books using metadata (scraped with BeautifulSoup).*

### πŸ’¬ Messaging
![Chat Interface](artifacts/2.png)
*Real-time 1-on-1 messaging using WebSockets.*

### πŸ‘₯ Groups
![Group Chat](artifacts/4.png)
*Create spaces to discuss books with like-minded readers.*

---

## 🌟 Features

- πŸ‘€ **User Authentication & Profile Creation**
Secure login, registration, and profile setup.

- πŸ“š **Books Section (Metadata Search)**
Search for books using online metadata (scraped via BeautifulSoup + Google API).

- πŸ’¬ **Real-Time Messaging**
1-on-1 messaging using WebSockets for instant communication.

- 🀝 **Friend Requests**
Send/receive friend requests, also powered by WebSockets.

- πŸ”Ž **User Search**
Search users by username to connect with fellow readers easily.

- 🧠 **Friend Suggestions (NEW!)**
Get personalized friend recommendations based on shared book genre preferences using a cosine similarity engine over user genre vectors.

- πŸ“ **Profile Editing**
Update your bio, profile picture, and date of birth.

- πŸ‘₯ **Group Chats**
Users can create groups and add their friends to spark discussions around shared genres, authors, or interests.

- ⭐ **Book Ratings**
Rate books you’ve read and explore community ratings on each book page.

- πŸ† **Leaderboard**
Discover the most active users and top-rated books across the platform.

- ☁️ **Cloud Storage (S3)**
Profile pictures are stored on **AWS S3** for reliability and performance.

- πŸ”’ **AES-Encrypted Messages (NEW!)**
All private and group messages are encrypted at rest using AES encryption to enhance user privacy and prevent data leakage even in the event of a database breach.

---

## βš™οΈ Architecture & Deployment

ReaderSphere is designed with a modular architecture and is deployed using **Render**, with AWS used for media storage.

### 🧱 Application Architecture

- Flask-based **REST API** backend
- Templated **HTML/CSS/JS frontend** (Jinja2)
- **WebSocket** support via Flask-SocketIO
- Book metadata scraping via **BeautifulSoup** + Google Books API
- Genre normalization using **Google Gemini API + JSON schema validation**
- Cosine similarity engine for **friend recommendations**

### πŸš€ Deployment

- **Render**: Hosts the full-stack web app
- **Free PostgreSQL Hosting**: Stores users, messages, books, ratings, groups, suggestions, etc.
- **AWS S3**: Manages profile picture uploads
- **GitHub Actions**: CI/CD for code deployment and testing

---

## πŸ› οΈ Technologies Used

| Category | Tech Stack |
|--------------------|------------------------------------------------------|
| **Backend** | Flask, Flask-SocketIO, RESTful APIs |
| **Frontend** | HTML/CSS, JavaScript, Jinja2 Templates |
| **Database** | PostgreSQL (Free cloud DB provider) |
| **Web Scraping** | BeautifulSoup, Google Books API |
| **ML/NLP** | Google Gemini (for genre classification) |
| **Friend Engine** | Cosine Similarity (via NumPy + scikit-learn) |
| **Cloud Platform** | **Render** (App Hosting), **AWS S3** (Media Storage) |
| **CI/CD** | GitHub Actions |

---

## πŸ“¦ Local Setup Instructions

1. **Clone the Repository**
```bash
git clone https://github.com/2003HARSH/Readersphere.git
cd Readersphere
```

2. **Create a Virtual Environment**

```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```

3. **Install Dependencies**

```bash
pip install -r requirements.txt
```

4. **Run the App**

```bash
python app.py
```

The app will be live at: `http://localhost:5000/`

---

## πŸ“Œ Roadmap

* βœ… Real-time 1-on-1 chat
* βœ… Book metadata scraping + search
* βœ… User profile creation and editing
* βœ… Group chat creation and management
* βœ… Book rating system
* βœ… Leaderboard
* βœ… Friend suggestion system
* βœ… User search functionality
* βœ… Render + S3 deployment
* 🚧 Book reviews and community discussions
* 🚧 Personalized book recommendation engine
* 🚧 Mobile-first responsive redesign

---

## 🀝 Contributing

Pull requests are welcome! For major changes, open an issue first to discuss what you’d like to improve or add.

---

## πŸ“„ License

This project is licensed under the [MIT License](LICENSE).

---

## πŸ“¬ Contact

For suggestions, queries, or collaborations, feel free to reach out.

Made with β˜•, frustration, and `websockets` by **Harsh Gupta**
GitHub: [@2003HARSH](https://github.com/2003HARSH)