This application is a book store that empowers users to efficiently manage and organize their book collection. It offers a user-friendly interface for adding, editing, and deleting books, as well as viewing detailed information about each book.
- Add a new book with details such as title, author, and publish year.
- Edit existing book information.
- Delete books from the collection.
- View detailed information about each book.
- User-friendly interface.
Frontend:
- React
- React Router
- Tailwind CSS
Backend:
- Node.js
- Express.js
- MongoDB
- Mongoose (ODM for MongoDB)
Additional Tools:
- Axios (for making HTTP requests)
- Notistack (for displaying notifications on the app)
- Nodemon (for server auto-restart during development)
Make sure you have Node.js and MongoDB installed on your machine.
- Clone the repository:
git clone https://github.com/Kalutu/book-store - Change into the project directory:
cd book-store - Change into the frontend directory:
cd frontend - Install dependencies:
npm install - Start frontend server:
npm run dev - Open a new tab in the terminal
- Change into the backend directory:
cd backend - Install dependencies:
npm install - Start backend server:
npm run dev
Create a .config file in the backend directory with the following content:
PORT=your portMONGO_URI=your connection string
Endpoint: GET /api/v1/books
Description: Get a list of all books.
Endpoint: GET /api/v1/books/:id
Description: Get detailed information about a specific book identified by its ID.
Endpoint: POST /api/v1/books
Description: Add a new book to the collection.
Endpoint: PUT /api/v1/books/:id
Description: Update information for an existing book identified by its ID.
Endpoint: DELETE /api/v1/books/:id
Description: Delete a book from the collection based on its ID.
- src/components: Reusable React components.
- src/pages: Main pages of the application.
- src/App.js: Main component rendering the application.
- server.js: Entry point for the Express.js server.
- routes/bookRoutes.js: API routes for handling book-related requests.
- models/Book.js: Mongoose model for the Book schema.
We welcome contributions! If you find a bug or have a feature request, please open an issue or submit a pull request.