An eCommerce app built with MERN stack, and utilizes third party API's. This eCommerce app enable two main different flows or implementations:
- Buyers browse the app categories, products and brands
- Admins manage and control the entire app components (products, orders, users)
- Features:
- Node provides the backend environment for this application
- Express middleware is used to handle requests, routes
- Mongoose schemas to model the application data
- React for displaying UI components
- Redux Toolkit to manage application's state
- RTK Query API to handle asynchronous redux actions
Here is a guide on how to run this project locally.
Clone the repository
$ git clone https://github.com/Fastdrecad/goddess-within-app.git
To configure the backend, follow these steps:
- Environment File: Navigate to the
projectfolder and add.envfile. Update the values for the following contents in the.envfile:
MONGO_URI=
PORT=
JWT_SECRET=
VITE_API_URL=
PAYPAL_CLIENT_ID=
PAYPAL_APP_SECRET=
PAYPAL_API_URL=
-
MongoDB Setup:
- Sign up for an account at MongoDB Atlas.
- Create a new cluster and follow the instructions to set up a new database.
- Once set up, obtain your MongoDB connection string and add it to the
MONGO_URIvariable in your.envfile.
-
JWT_SECRET:
- This just needs to be any long, random string. You can google "secret key generator".
- The seed command will create an admin user in the database
- The email and password are passed with the command as arguments
- Like below command, replace brackets with email and password.
- For more information, see code here
npm run seed:db [your-email] [your-password] // This is just an example.
-
Environment File: Navigate to the
clientfolder and create a file:.env:VITE_API_URL=
-
Backend:
- Install dependencies in root directory:
npm install. - Start the server:
npm run dev.
- Install dependencies in root directory:
-
Frontend:
- Open a new terminal and navigate to the
clientdirectory. - Install dependencies:
npm install. - Start the frontend application:
npm run dev. - The application should now be running on
http://localhost:3000but verify this in your command line terminal
- Open a new terminal and navigate to the
This application is deployed on Render. Please check it out here.
Some basic Git commands are:
$ git clone https://github.com/Fastdrecad/goddess-within-app.git
$ cd project
$ npm install
$ npm run dev
$ npm run build
$ npm start