|
| 1 | +# ProShop eCommerce Platform |
| 2 | + |
| 3 | +> eCommerce platform built with the MERN stack & Redux. |
| 4 | +
|
| 5 | +### THIS PROJECT IS DEPRECATED |
| 6 | +This project is no longer supported. The new project/course has been released. The code has been cleaned up and now uses Redux Toolkit. You can find the new version [HERE](https://github.com/bradtraversy/proshop-v2) |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | +## Features |
| 11 | + |
| 12 | +- Full featured shopping cart |
| 13 | +- Product reviews and ratings |
| 14 | +- Top products carousel |
| 15 | +- Product pagination |
| 16 | +- Product search feature |
| 17 | +- User profile with orders |
| 18 | +- Admin product management |
| 19 | +- Admin user management |
| 20 | +- Admin Order details page |
| 21 | +- Mark orders as delivered option |
| 22 | +- Checkout process (shipping, payment method, etc) |
| 23 | +- PayPal / credit card integration |
| 24 | +- Database seeder (products & users) |
| 25 | + |
| 26 | +## Note on Issues |
| 27 | +Please do not post issues here that are related to your own code when taking the course. Add those in the Udemy Q/A. If you clone THIS repo and there are issues, then you can submit |
| 28 | + |
| 29 | +## Usage |
| 30 | + |
| 31 | +### ES Modules in Node |
| 32 | + |
| 33 | +We use ECMAScript Modules in the backend in this project. Be sure to have at least Node v14.6+ or you will need to add the "--experimental-modules" flag. |
| 34 | + |
| 35 | +Also, when importing a file (not a package), be sure to add .js at the end or you will get a "module not found" error |
| 36 | + |
| 37 | +You can also install and setup Babel if you would like |
| 38 | + |
| 39 | +### Env Variables |
| 40 | + |
| 41 | +Create a .env file in then root and add the following |
| 42 | + |
| 43 | +``` |
| 44 | +NODE_ENV = development |
| 45 | +PORT = 5000 |
| 46 | +MONGO_URI = your mongodb uri |
| 47 | +JWT_SECRET = 'abc123' |
| 48 | +PAYPAL_CLIENT_ID = your paypal client id |
| 49 | +``` |
| 50 | + |
| 51 | +### Install Dependencies (frontend & backend) |
| 52 | + |
| 53 | +``` |
| 54 | +npm install |
| 55 | +cd frontend |
| 56 | +npm install |
| 57 | +``` |
| 58 | + |
| 59 | +### Run |
| 60 | + |
| 61 | +``` |
| 62 | +# Run frontend (:3000) & backend (:5000) |
| 63 | +npm run dev |
| 64 | +
|
| 65 | +# Run backend only |
| 66 | +npm run server |
| 67 | +``` |
| 68 | + |
| 69 | +## Build & Deploy |
| 70 | + |
| 71 | +``` |
| 72 | +# Create frontend prod build |
| 73 | +cd frontend |
| 74 | +npm run build |
| 75 | +``` |
| 76 | + |
| 77 | +There is a Heroku postbuild script, so if you push to Heroku, no need to build manually for deployment to Heroku |
| 78 | + |
| 79 | +### Seed Database |
| 80 | + |
| 81 | +You can use the following commands to seed the database with some sample users and products as well as destroy all data |
| 82 | + |
| 83 | +``` |
| 84 | +# Import data |
| 85 | +npm run data:import |
| 86 | +
|
| 87 | +# Destroy data |
| 88 | +npm run data:destroy |
| 89 | +``` |
| 90 | + |
| 91 | +``` |
| 92 | +Sample User Logins |
| 93 | +
|
| 94 | + |
| 95 | +123456 |
| 96 | +
|
| 97 | + |
| 98 | +123456 |
| 99 | +
|
| 100 | + |
| 101 | +123456 |
| 102 | +``` |
| 103 | + |
| 104 | + |
| 105 | +## License |
| 106 | + |
| 107 | +The MIT License |
| 108 | + |
| 109 | +Copyright (c) 2020 Traversy Media https://traversymedia.com |
| 110 | + |
| 111 | +Permission is hereby granted, free of charge, to any person obtaining a copy |
| 112 | +of this software and associated documentation files (the "Software"), to deal |
| 113 | +in the Software without restriction, including without limitation the rights |
| 114 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 115 | +copies of the Software, and to permit persons to whom the Software is |
| 116 | +furnished to do so, subject to the following conditions: |
| 117 | + |
| 118 | +The above copyright notice and this permission notice shall be included in |
| 119 | +all copies or substantial portions of the Software. |
| 120 | + |
| 121 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 122 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 123 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 124 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 125 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 126 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 127 | +THE SOFTWARE. |
0 commit comments