Git Product home page Git Product logo

mongo_magic's Introduction

Mongo Magic Project

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

Cloud Access

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/

System Articture

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 

Front-end

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
------------------------------------------------

Back-end

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
------------------------------------------------

Database

This project's database is an online database on MongoDB Atlas, you don't need implement database on localhost for testing.

mongo_magic's People

Contributors

gahhh avatar jinl96 avatar huberywang avatar shawnyu99 avatar fpsblack avatar alexlee9899 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.