This document provides a step-by-step guide to set up and deploy the "Smarthome" project on your local development environment. Follow the instructions below for a smooth and error-free setup.
- Ensure that you have Node.js and npm installed on your machine.
- An Integrated Development Environment (IDE) is required to work with the project.
-
Unzip the Folder:
- Unzip the project folder and navigate to the "Smarthome" directory.
-
Open in IDE:
- Open your preferred Integrated Development Environment (IDE).
- Navigate to the "Smarthome" folder and open it in your IDE.
-
Open Terminal:
- Open the terminal within your IDE.
-
Run Server:
- Change directory to the "server" folder using the following command:
cd server
- Execute the command to start the server:
npm run develop
- Change directory to the "server" folder using the following command:
-
Run Client:
- In a new terminal window, change directory to the "client" folder:
cd client
- Execute the command to start the client:
npm run start
- In a new terminal window, change directory to the "client" folder:
-
Access React App:
- Once the commands in steps 4 and 5 are executed successfully, the React app will be deployed on
localhost
at port3000
. You can access the application by opening your web browser and navigating to http://localhost:3000.
- Once the commands in steps 4 and 5 are executed successfully, the React app will be deployed on
-
Configure Strapi Key:
- In the file
checkout.jsx
, set up your own Strapi key.
- In the file
-
Configure Auth0 Credentials:
- In the file
index.js
, provide your Auth0 domain and clientId.
- In the file
-
MongoDB Atlas Configuration:
- Create a cluster named "smarthome" in MongoDB Atlas.
- Copy the MongoDB connection URL and paste it in the
.env
file.
-
MySQL Database Setup:
- Create a MySQL database named "smarthome".
- Create a table named "customerorders" in the "smarthome" database.
With these steps completed, your "Smarthome" project should be successfully set up and running on your local environment. Ensure that all dependencies are installed and configured correctly. Feel free to reach out if you encounter any issues during the setup process.