A Goodreads inspired web application to keep track of your book collections, store your book progress, write book reviews and see what others think about it.
- Create an account and login using either email & password credentials or using your Github or Google account.
- Search for books in which you are interested in, using the Google Books API and save them to your bookshelves.
- Write book reviews and rate books; see what other users have rated them as well as the current average rating.
- Add friends and other users, and see what their thoughts are on the books.
- Combinining the best of both worlds - optimised and matched together mobile and desktop versions of the web application, using CSS media breakpoints to get you the best experience no matter what device.
Bookmarkt is a modern full stack application, using the Next.js framework.
- The main part of the frontend is developed using Typescript for type safety, alongside the React library.
- Zustand for state management.
- TailwindCSS for styling, as well as simple responsive design with media queries.
The frontend has multiple specific routes, closely resembling that to that of Goodreads'.
-
/
The home page displays recent book updates from users using the app. -
/books/[bookId]
Displays individual book -
/books/user/[userId]
Displays all of the user's books, which can be -
/friend
Displays the list of friends of the currently logged in user. -
/friend/[userId]
Displays the list of friends of the user corresponding to the userId. -
/login
Credentials login page. -
/register
Credentials registration page. -
/search?q=[query]
Displays books resulting from your search query. -
/user/show/[userId]
Displays the user profile of the user corresponding to userId. -
/user/sign_in
Displays the options for logging in using Google and Github authentication or with credentials. -
/user/sign_up
- Displays the options for creating an account using Google and Github authentication or with credentials.
- All of the backend is powered using Next.js API design with the app router.
- Next-auth has been used for user Authentication.
- Using the Google Books API for fetching book information.
- A combination of Prisma as an ORM, combined with MongoDB as a NoSQL database.
Using MongoDB as the database with the following models:
- Account: Stores the account information when authenticated using Github or Google such as provider and token information.
- BookData: Used to keep track of total and average ratings for books, keeping track using their respective Google Books ID.
- Bookshelf: Contains bookshelf information, its respective books and the user to which it belongs.
- Notification: Stores notification information, such as who it's coming from, the type and time of the notification.
- Review: Holds reviews generated by the users, including the review description as well as the rating.
- User: Keeps track of user information, such as names, emails, hashed passwords and all IDs needed to keep track of all the remaining information like reviews, friends and books.
Note: All API routes begin with {SITEURL}/api
.
Retrieves all books stored within the database
Retrieves the book with GoogleBookID equal to id
Adds a new book to the database, with GoogleBookID equal to id
, if it does not already exist.
Route user for creating a new account with a credentials combination of email & password
Retrieves all reviews stored within the database
Adds a new review to the database, adding the review id
to the list of reviews for the book and the user which made the review.
Retrieves a review with reviewID id
from the database.
Retrieves the books of the currently logged in user, if there is no logged in user it breaks.
Adds a new book, from body of the request, to the current user's list.
If the book exists in the db already, and is found, it simply adds the book id
to the user's book list.
Otherwise, it will create the book and then add it to the user's list.
Retrieves all books of a user with id userId
.