The goal of our project is to develop a cloud-based sustainability assessment platform for industry organisations. The platform will help the decision maker of organisations to track the sustainability progress of their organisations. The platform will collect various consumption and preservation metrics and then provide a sustainability score with suggestions on how to improve the business operations further to the users.
This document describes the following points.
> * Cloud Access
> * System Articture
> * Front-End setup on localhost
> * Back-End setup on localhost
> * Database
This project's backend is hosted on AWS server, the access url is: https://d1c543cslxqz58.cloudfront.net.
The frontend is also have a cloud access on AWS server, the address is:
https://main.d2tkai59xc2o9w.amplifyapp.com/
Frontend ------ React
Backend ------ Flask
Database ------ MongoDB
|---Project File (Root Path)
|---backend (Backend file path)
|---cloud
|---controller
|---db
|---services
|---docs
|---models
|---__init_.py
|---config.py
|---requirements.txt
|---app.py
|---frontend (Frontend file path)
|---public
|---src
|---package-lock.json
|---package.json
|---yarn.lock
|---README.md
Step 1:
Install npm and yarn package manager.
Details of the installation can be found in the installation guide.
After installation, you can run the following command to install the dependencies in /root/frontend folder.
> yarn -v
> npm -v
Step 2:
After installation, you can run the following command to install the dependencies.
$ cd frontend
$ yarn install
Step 3:
After all the dependencies are installed, you can run the following command to run the application.
$ yarn start
Finally, if everything is working, you may see below information in the terminal.
------------------------------------------------
Compiled successfully!
You can now view frontend in the browser.
Local: http://localhost:3000
On Your Network: http://192.168.50.3:3000
Note that the development build is not optimized.
To create a production build, use yarn build.
webpack compiled successfully
------------------------------------------------
We use python 3.8 as the backend language. So before you start to use the backend, you need to ensure the python version of your computer is 3.8. You can check the version of your computer by running the following command.
> python3 --version
Step 1: Install the dependencies.
In the backend folder, you can run the following command to install the dependencies. Depending on the pip version, you may try with pip3 or pip for the below commands.
$ cd backend
$ pip3 install -r requirements.txt
Step 2: Run the application. Run the command below to start the app in backend folder:
$ python3 app.py
The server shoud be able to run on local server when you see the following information in the terminal.
------------------------------------------------
* Debug mode: on
* Running on http://127.0.0.1:5000 (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 246-364-033
------------------------------------------------
This project's database is an online database on MongoDB Atlas, you don't need implement database on localhost for testing.