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

https://github.com/aayushajs/book-store

This is a bookstore web application built using the MERN stack (MongoDB, Express.js, React, Node.js). The project allows users to browse, upload, and manage books in an interactive, user-friendly interface. The application features an intuitive UI with responsive design, enabling a smooth experience across devices.
https://github.com/aayushajs/book-store

backend cloudinary expressjs mongodb nodejs

Last synced: 2 months ago
JSON representation

This is a bookstore web application built using the MERN stack (MongoDB, Express.js, React, Node.js). The project allows users to browse, upload, and manage books in an interactive, user-friendly interface. The application features an intuitive UI with responsive design, enabling a smooth experience across devices.

Awesome Lists containing this project

README

        

![GitHub repo size](https://img.shields.io/github/repo-size/codewithsadee/grilli)
![GitHub stars](https://img.shields.io/github/stars/codewithsadee/grilli?style=social)
![GitHub forks](https://img.shields.io/github/forks/codewithsadee/grilli?style=social)




## BOOK STORE FRONTEND



This is a bookstore web application built using the MERN stack (MongoDB, Express.js, Node.js). The project allows users to browse, upload, and manage books in an interactive, user-friendly interface. The application features an intuitive UI with responsive design, enabling a smooth experience across devices.

## Live Demo
➥ Live Demo

## File Structure

```python
bookstore-backend/
├── config/
│ ├── db.js # MongoDB connection
│ ├── cloudinary.js # Cloudinary setup
├── models/
│ ├── Book.js # Book schema
│ └── User.js # User schema
├── routes/
│ ├── books.js # Book routes
│ └── users.js # User routes
├── controllers/
│ ├── bookController.js # Book logic
│ └── userController.js # User logic
├── .env # Environment variables
├── server.js # Main server file
├── package.json # Project dependencies
└── README.md # Project documentation

```

## Description:



1. config/:

db.js: Connects your app to MongoDB.

cloudinary.js: Configures Cloudinary for image uploads.

2. models/:

Book.js: Defines the schema for books.

User.js: Defines the schema for users.

3. routes/:

books.js: Contains API endpoints for managing books.

users.js: Contains API endpoints for user-related tasks.

4. controllers/:

bookController.js: Logic for adding, updating, and fetching books.

userController.js: Logic for user authentication and profile management.

5. server.js:

Main file to set up Express and load routes.

6. .env:

Store sensitive information like database URLs and API keys.

## Install



➥npm install express mongoose dotenv cors cloudinary

## Command



CLONE :- git clone


Insall :- npm i Package Name



START :- npm run dev

## Web Logo


![Logo](https://www.freeiconspng.com/thumbs/book-icon/book-icon-black-good-galleries--24.jpg)

## dependency

```python
{
"name": "bookstore-backend",
"version": "1.0.0",
"description": "Backend for a bookstore app",
"main": "server.js",
"scripts": {
"start": "node server.js",
"dev": "nodemon server.js"
},
"dependencies": {
"express": "^4.18.2",
"dotenv": "^10.0.0",
"mongoose": "^7.0.0",
"cloudinary": "^1.30.0",
"multer": "^1.4.5",
"cors": "^2.8.5",
"bcrypt": "^5.1.0",
"jsonwebtoken": "^9.0.0"
},
"devDependencies": {
"nodemon": "^3.0.1"
}
}
```

## .evn



PORT=5000

MONGO_URI=mongodb+srv://:@cluster.mongodb.net/bookstore

CLOUDINARY_CLOUD_NAME=your-cloud-name

CLOUDINARY_API_KEY=your-api-key

CLOUDINARY_API_SECRET=your-api-secret