Please use bash/zsh shells for typing commands. Windows users please use GitBash for this purpose.
Before you begin with frontend setup: Make sure you've completed the backend setup and the server is up and running.
Recommended steps for bootstrapping the servers:
- Setup and run the ML server
- Setup and run Go backend server
- Setup and run frontend client
Some ASCII art to help understand the application flow:
External Weather APIs
/
/
Frontend(3) -> Backend (2) - - -> ML Model (1)
Again before you begin, make sure you have the following installed on your system:
- Git: Install Git on your computer. You can download it from the official Git website: https://git-scm.com/downloads
Verify by running:
git -v
- Node.js and npm: React applications require Node.js and npm (Node Package Manager) to manage packages and dependencies. Download and install them from: https://nodejs.org/
Verify by running:
node -v
-
Yarn: Yarn is an alternative package manager to npm, and it's often preferred for React projects. Install Yarn using npm by running the following command in your terminal:
npm install -g yarn
Getting Started:
Now that you have the prerequisites installed, you can set up and run a React app using git clone
and yarn
.
Make sure you create a
clean-route
directory (folders:)) where all three sub-directories -clean-route-frontend
,clean-route-backend
andclean-route-aws
will reside.
-
Clone the Repository:
Open your terminal and navigate to the directory (in this case
clean-route
) where you want to store your React app. Then run the following command to clone the repository:git clone https://github.com/sadityakumar9211/clean-route-frontend
-
Navigate to the App Directory:
Move into the app directory using the
cd
command:cd clean-route-frontend
-
Install Dependencies:
Use Yarn to install the project dependencies (will take a moment as JS ecosystem is slow :|):
yarn install
This will install all the required packages specified in the
package.json
file. -
Setup Environment Variables: Rename
.env.example
file to.env
and replacexxxx
with your own values. -
Start the Development Server:
To start the development server and see your React app in action, run the following command:
yarn start
This will start the development server and open your app in a web browser. The app will automatically reload whenever you make changes.
This will setup you up and running the frontend application on http://localhost:3000.