A Peer-to-Peer Proof-Of-Concept Book Exchange Platform! This project was completed as part of an evaluation for an internship role at heymax.ai
This web application will facilitate easy listing, searching, and exchanging of books among users. This POC encourages users to donate their unwanted books and support book exchanges. The core features are as followed:
- Depositing of a book
- Withdrawal of a book
- Being notified of a book being deposited or withdrawn from heyBook via Telegram. Notifying a user when a new book has been deposited or withdrawn provides a much more user-friendly experience as the user does not need to keep checking the heyBook website to be kept up to date.
To get a local copy up and running follow these simple example steps.
- Clone this repository
- Get a free Telegram token and chat id from Telegram
- Edit backend/.env with your database secrets, telegram token, and telegram chat id
dbhost=
user=
password=
database=
telegram_token=
telegram_chat_id=
- Copy data from backend/db.sql and run in MySQL
- cd into backend, start both Python services first. This should start a Flask server on Port 5000 (for book.py) and Port 5001 (for telegram_service.py)
Python book.py
Python telegram_service.py
- cd into frontend, and type npm run dev to start the web application
npm run dev
Given the limited time of 24 hours to complete this project, I prioritized the core features and frontend design for the best possible user experience for a POC. If given more time, here is what I could have done better:
- Included unit tests using pytest
- Included filter option and search query for frontend
- Included a message broker (RabbitMQ) for sending messages asynchronously to Telegram API. This will help to further decouple the book service from telegram API service.
