FullStack Project Book Fair
- TECH USED
React
Javascript
Tailwind
Node-js
Express
Mongo
Web Development
DATE
DEC 28, 2023
REPO
Demo
book-fair-client.netlify.app/
Introduction
Bookfair is a full-stack application designed to bring together buyers and sellers of books in a seamless and user-friendly way. The goal of this project was to create an online platform that would allow multiple sellers to register and sell their books, while buyers can browse through a vast selection of books offered by various sellers.
One of the unique and interesting aspects of this project is the ability for buyers to create a cart, limited to one seller, and place an order for the books they wish to purchase. The order status is visible to both the buyer and the seller, adding an additional level of transparency and ease of communication.
The technology stack used in this project includes Node.js and MongoDB for the backend and React, Zustand and Tailwind for styles for the frontend. These technologies allow for a fast and responsive user experience, and the use of MongoDB provides scalable and flexible data storage, finally the backend was deployed in Render.com and frontend in Netlify.
Overall, Bookfair is a well-rounded project that showcases my skills in full-stack development, UI design, and logo design. The combination of these skills creates a unique and functional application that meets the needs of both buyers and sellers of books.
Database Modeling
For the Bookfair project, the database was structured using MongoDB models to support the needs of both buyers and sellers. The MongoDB models created for the database are as follows:
- Seller: The Seller model was created to store information about the sellers on the platform. This includes their personal information, such as name, email, and password, store name, as well as details about the books, orders, and roles as an identifie for the authorization that can have this user .
- Buyer: The Buyer model was created to store information about the buyers on the platform. This includes their personal information, such as name, email, and password, as well as information about the items in their orders and the roles.
- Book: The Book model was created to store information about the books being sold by the sellers. This includes details such as title, author, seller, image, stock and price.
- Order: The Order model was created to store information about the orders placed by buyers. This includes details such as the books and quantity in the order, the total cost, seller and current buyer.
- Role: The Role model was created to store information about the role of the users on the platform. This includes a flag to indicate if they are a buyer or a seller, as well as admin.
By using these MongoDB models, the Bookfair project's database is able to effectively store and manage the data needed to support the needs of both buyers and sellers. The models provide a clear and organized way to manage the data and relationships between the various entities in the system. This allows for a robust and scalable solution that can handle an increasing number of users and books as the platform grows.
Here is the db modeling design that I used as part of the process:
Backend
For the Bookfair project, the backend architecture was designed to provide a robust and scalable solution to support the needs of both buyers and sellers. The following APIs were created to support the frontend:
- User authentication API: This API was created to handle the authentication of users on the platform, allowing them to log in and log out.
- Book management API: This API was created to manage the books being sold by the sellers, including adding, updating, and deleting books.
- Order management API: This API was created to manage the orders placed by buyers, including adding, updating, and deleting orders.
The backend was developed using Node.js, a JavaScript runtime environment, and the Express framework, which is a minimal and flexible Node.js web application framework. MongoDB was used as the database to store the data for the platform.
One of the main challenges faced during the development of the backend was ensuring the security of sensitive user data, such as passwords. To address this challenge, password hashing and encryption were implemented to ensure that passwords were stored securely in the database.
Another challenge was handling the concurrency and consistency of data when multiple users were accessing the platform at the same time. To address this challenge, appropriate measures were taken to ensure that data was updated and retrieved in a safe and consistent manner.
Overall, the backend architecture and APIs were designed to support the needs of the platform and provide a robust and scalable solution to handle an increasing number of users and books as the platform grows.
Frontend
For the Bookfair project, the frontend architecture was designed to provide a dynamic and interactive user interface for both buyers and sellers. The frontend interacts with the backend through APIs, making API calls to retrieve and update data as needed.
The key features of the frontend include:
- Dynamic user interfaces: The frontend was designed to provide a dynamic user interface that can change and adapt to the needs of the user. For example, when a buyer logs in, they are presented with a different user interface than when they are logged out.
- Interactive elements: The frontend includes interactive elements such as forms, buttons, and links that allow users to perform actions such as logging in, adding books to their cart, and placing orders.
The frontend was developed using React, a JavaScript library for building user interfaces. Zustand was used as the state manager for the React app, providing a convenient and efficient way to manage the state of the application. Tailwind was used for styling the app, providing a clean and modern look. Axios was also used for managing API calls, providing a simple and efficient way to interact with the backend.
Overall, the frontend architecture was designed to provide a dynamic and interactive user experience for both buyers and sellers, while interacting with the backend through APIs to retrieve and update data as needed. The technologies and tools used in the frontend development were chosen for their ease of use, efficiency, and flexibility to allow for a scalable solution that can handle an increasing number of users and books as the platform grows.
Final Product
Conclusion
The Bookfair full-stack application was a project that aimed to provide a platform for multiple sellers to register and sell books, and for buyers to register and browse books and place orders. The project was designed with both a backend and frontend to provide a comprehensive solution.
The project utilized a range of technologies and tools, including Node.js, MongoDB, React, Zustand, Tailwind, and Axios. These technologies were chosen for their ease of use, efficiency, and scalability, and helped to provide a dynamic and interactive user experience.
Reflecting on the experience of developing the project, I learned the importance of considering security, performance, and scalability when designing and building a full-stack application. I also gained a deeper understanding of how the different components of a full-stack application, such as the database, backend, and frontend, work together to provide a seamless and efficient user experience.
There are areas for improvement, such as improving the security and performance of the application, and exploring other technologies and tools that could provide additional functionality or efficiency. I plan to continue learning and exploring new technologies and tools, and applying what I have learned to future projects.
In conclusion, the Bookfair project was a challenging and rewarding experience that helped me to improve my skills in full-stack development and database modeling. I am confident that I can apply what I learned to future projects and continue to grow as a developer.