├── .gitignore ├── README.md ├── package-lock.json ├── package.json ├── public ├── index.html ├── logo.jpeg ├── logo192.png ├── logo512.png ├── manifest.json └── robots.txt └── src ├── App.css ├── App.js ├── Components ├── Body │ ├── About │ │ ├── About.js │ │ └── style.css │ ├── BooksList │ │ ├── BooksList.js │ │ └── style.css │ ├── Buy │ │ ├── Buy.js │ │ └── style.css │ ├── Contact │ │ └── Contact.js │ ├── Filter │ │ └── Filter.js │ ├── Home │ │ ├── Home.js │ │ └── style.css │ ├── Loading │ │ └── Loading.js │ ├── Login │ │ ├── Login.js │ │ └── style.css │ ├── NotFound │ │ ├── BookNotFound.js │ │ └── NotFound.js │ ├── Profile │ │ ├── Pages │ │ │ ├── Profile.js │ │ │ └── Reviews.js │ │ ├── Profile.js │ │ └── style.css │ ├── Rating │ │ ├── Rating.js │ │ ├── RatingBook.js │ │ └── style.css │ ├── Register │ │ ├── Register.js │ │ └── style.css │ ├── Sales_list │ │ ├── SalesList.js │ │ └── SingleItem.js │ ├── Services │ │ ├── Services.js │ │ └── style.css │ └── SingleBook │ │ ├── SingleBook.js │ │ └── style.css ├── Footer │ ├── Footer.js │ └── style.css ├── Header │ ├── Header.js │ ├── Sections │ │ ├── BasketShop.js │ │ ├── Menu.js │ │ ├── Search.js │ │ └── SearchModal.js │ └── style.css └── utils │ └── BooksApi.js ├── Context ├── ContextReview.js ├── ContextShopping.js ├── SearchContext.js └── style.css ├── Data ├── Books.js ├── Contacts.js ├── Rates.js ├── Reviews.js ├── SalesList.js └── Users.js ├── assets └── images │ ├── background1.jpg │ ├── background2.jpg │ ├── background3.jpg │ ├── background4.jpg │ ├── background5.jpg │ ├── booksLib.jpeg │ ├── bookswall.jpg │ ├── download.jpeg │ ├── logo.jpeg │ ├── profile.png │ ├── review.jpg │ ├── reviews.jpg │ ├── reviews.png │ └── tobuybook.jpg └── index.js /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser. 13 | 14 | The page will reload when you make changes.\ 15 | You may also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!** 35 | 36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. 39 | 40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | 72 | 73 | 74 | # About This Awesome Project: 75 | 76 | ## tools : 77 | 1. I choose mui to create the Front Design. 78 | -mui is a library of UI components designers and developers can use to build React applications. 79 | 2. REACTJS is an open-source JavaScript framework and library developed by Facebook. 80 | 81 | ## Books Library Description : 82 | 1. Get an api list of books (from the Google Books api) using axios and Filter the list by book category (fantasy, horror, romance, sci-fi, ...) . 83 | 2. Customer can login and logout 84 | 3. Customer can buy a book and give it a rating, if he is not logged in, he is redirected to the login page 85 | 4. When he adds a book, the basket is update (increment). 86 | 5. He can remove a book from the added list and the basket will be updated(decrement). 87 | 6. Also, Filter book by creator, title, publisher ... 88 | 7. When user login redirect him to Profile page. 89 | 8. User can add Review on book & Update his reviews. 90 | 9. User can add contact us message & Update his messages. 91 | 92 | => In this project, I Covered (context api to Easily share data between components). 93 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "client", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@emotion/react": "^11.10.6", 7 | "@emotion/styled": "^11.10.6", 8 | "@mui/icons-material": "^5.11.11", 9 | "@mui/material": "^5.11.11", 10 | "@testing-library/jest-dom": "^5.16.5", 11 | "@testing-library/react": "^13.4.0", 12 | "@testing-library/user-event": "^13.5.0", 13 | "axios": "^1.3.4", 14 | "react": "^18.2.0", 15 | "react-dom": "^18.2.0", 16 | "react-router-dom": "^6.8.2", 17 | "react-scripts": "5.0.1", 18 | "web-vitals": "^2.1.4" 19 | }, 20 | "scripts": { 21 | "start": "react-scripts start", 22 | "build": "react-scripts build", 23 | "test": "react-scripts test", 24 | "eject": "react-scripts eject" 25 | }, 26 | "eslintConfig": { 27 | "extends": [ 28 | "react-app", 29 | "react-app/jest" 30 | ] 31 | }, 32 | "browserslist": { 33 | "production": [ 34 | ">0.2%", 35 | "not dead", 36 | "not op_mini all" 37 | ], 38 | "development": [ 39 | "last 1 chrome version", 40 | "last 1 firefox version", 41 | "last 1 safari version" 42 | ] 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /public/logo.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ahmedbh25/Books_Library/a0380fbd9471bc404cf10c1b2b9c80cfd85dc461/public/logo.jpeg -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ahmedbh25/Books_Library/a0380fbd9471bc404cf10c1b2b9c80cfd85dc461/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ahmedbh25/Books_Library/a0380fbd9471bc404cf10c1b2b9c80cfd85dc461/public/logo512.png -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ahmedbh25/Books_Library/a0380fbd9471bc404cf10c1b2b9c80cfd85dc461/src/App.css -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Routes, Route } from 'react-router-dom'; 3 | import Home from './Components/Body/Home/Home'; 4 | import About from './Components/Body/About/About'; 5 | import Services from './Components/Body/Services/Services'; 6 | import Footer from './Components/Footer/Footer'; 7 | import Header from './Components/Header/Header'; 8 | import BooksList from './Components/Body/BooksList/BooksList'; 9 | import Filter from './Components/Body/Filter/Filter'; 10 | import Login from './Components/Body/Login/Login'; 11 | import Register from './Components/Body/Register/Register'; 12 | import Buy from './Components/Body/Buy/Buy'; 13 | import NotFound from './Components/Body/NotFound/NotFound'; 14 | import Profile from './Components/Body/Profile/Profile'; 15 | import ProfileUpdate from './Components/Body/Profile/Pages/Profile'; 16 | import Review from './Components/Body/Profile/Pages/Reviews'; 17 | import Ratings from './Components/Body/Rating/Rating'; 18 | import RatingBook from './Components/Body/Rating/RatingBook'; 19 | import Contact from './Components/Body/Contact/Contact'; 20 | import SalesList from './Components/Body/Sales_list/SalesList'; 21 | import SingleItem from './Components/Body/Sales_list/SingleItem'; 22 | import './App.css'; 23 | 24 | function App() { 25 | return ( 26 | 27 |
28 | 29 | } exact /> 30 | } /> 31 | } /> 32 | } /> 33 | } /> 34 | } /> 35 | } /> 36 | } /> 37 | } /> 38 | } /> 39 | } /> 40 | } /> 41 | } /> 42 | } /> 43 | } /> 44 | } /> 45 | } /> 46 | 47 |