Bookshelf-React is a React.js-based digital library application that features book management and catalog display.
| Part | Description |
|---|---|
| Features | • Create • Read • Update • Delete • Search |
| Packages | • Mongoose • Cors • Morgan |
| Libraries | React.js |
| Framework | • Express.js • Bootstrap 5 |
| Tools | • Visual Studio Code • MongoDB • Node.js |
| VS Code Extensions | Prettier |
-
Visual Studio Code
https://bit.ly/VScode_Installer
-
NodeJS
https://bit.ly/NodeJS_Installer
-
MongoDB
https://bit.ly/MongoDB_Installer
-
Open the
MongoDBapplication, then click theAdd new connectionbutton.
-
Create a connection with any name (free), for example as shown in the following image:
-
Click the
Create databasebutton.
-
Please name the
databaseandcollectionas follows:
-
Click the
Import databutton.
-
Look for the file called
db_bookshelf_react.catalog.json, it is located in thebookshelf-react/public/databasedirectory.
-
Open
Terminal, then create a new project:npx create-react-app bookshelf-react
-
Download and extract this repository.
-
Copy the directories:
backend,public, andsrc. -
Copy the files:
BACA.md,README.md, andLICENSE.txt. -
Paste and Replace into the
bookshelf-reactdirectory. -
Open
Terminalinside that directory. -
Install
bootstrapto manage the appearance (layout):npm install bootstrap
-
Install
bootstrap-iconsfor icons:npm install bootstrap-icons
-
Install
react-router-domto manage page routes:npm install react-router-dom
-
Install
axiosto be able to make requests to the backend / API:npm install axios
-
Install
expressto make a backend server:npm install express
-
Install
mongooseto connect the backend to MongoDB:npm install mongoose
-
Install
corsto enable communication between frontend and backend across different ports or domains:npm install cors
-
Install
morganto display the HTTP request log in the terminal (useful for debugging):npm install morgan
-
Install
nodemonto restart the server automatically:npm install --save-dev nodemon
-
Install
concurrentlyto run multiple scripts simultaneously in the terminal:npm install --save-dev concurrently
-
Open
package.json, then change thescriptssection to look like this:"scripts": { "server": "nodemon --quiet backend/server.js", "react": "react-scripts start", "start": "concurrently --names \"BACKEND,FRONTEND\" --prefix name \"npm run server\" \"npm run react\"", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" },
-
To run the web, type the command:
npm start
-
Open your browser, then type ->
http://localhost:3000/. -
Please access the features and enjoy [Done].
| Home | Catalog |
|---|---|
![]() |
![]() |
| Add Book | Edit Book | Delete Book |
|---|---|---|
![]() |
![]() |
![]() |
| Search |
|---|
![]() |
If this work is useful to you, then support this work as a form of appreciation to the author by clicking the ⭐Star button at the top of the repository.
This application is the result of the development of the CAMP404 Course. I do not deny that I still use third-party services in this work, including: libraries, frameworks, and so on.
MIT License - Copyright © 2022 - Devan C. M. Wijaya, S.Kom
Permission is hereby granted without charge to any person obtaining a copy of this software and the software-related documentation files to deal in them without restriction, including without limitation the right to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons receiving the Software to be furnished therewith on the following terms:
The above copyright notice and this permission notice must accompany all copies or substantial portions of the Software.
IN ANY EVENT, THE AUTHOR OR COPYRIGHT HOLDER HEREIN RETAINS FULL OWNERSHIP RIGHTS. THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, THEREFORE IF ANY DAMAGE, LOSS, OR OTHERWISE ARISES FROM THE USE OR OTHER DEALINGS IN THE SOFTWARE, THE AUTHOR OR COPYRIGHT HOLDER SHALL NOT BE LIABLE, AS THE USE OF THE SOFTWARE IS NOT COMPELLED AT ALL, SO THE RISK IS YOUR OWN.





