Skip to content

Project Bus network - Bus Radar provides visualization and prediction utilities for bus operator

Notifications You must be signed in to change notification settings

VGU-Meme-Group/busnetwork

Repository files navigation

MemeGroup - Project Bus network - Bus Radar

Introduction

This web application helps the Bus Operator:

  • View the current state of public bus network traffic (the bus position, the routes)
  • Predict the bus traffic congestion ahead of 15 minutes

Team members

No. Full name ID Agile Role Progress
1 Vu Hoang Tuan Anh 18812 Back-end Developer, Machine Learning 100%
2 Vo Nguyen Duy Bach 16770 Full-stack Developer 100%
3 Tran Kim Hoan 18810 Front-end Developer, Tester 100%
4 Tran Nguyen Minh Quan 17640 Scrum Master, DevOps, Data Engineer 100%

Programming Languages

Java Python HTML CSS JavaScript

Databases

MongoDB

Frameworks

NodeJs ReactJS Vue Leaflet Jest SpringBoot

Tools

Jira Jenkins Kafka Docker


Web Application

Requirements

  • Nodejs v21.4.0 or newer version.
    • Download here. (After downloading, please install immediately)
  • Python 3.12.1 or newer version.
    • Download here. (After downloading, please install immediately)
  • Kafka 2.13-3.6.0 or newer version:
    • Download here. (After downloading, please leave it and wait for the installation step in the Project Setup section)
  • Visual Studio Code IDE with Code Runner extension
    • Download VSCode IDE first here
    • Download Code Runner extension for VSCode from here
  • Any Internet Browser:
    • Google Chrome (Recommend), Firefox, Microsoft Edge, Opera, Brave, Safari, etc.

Project Setup

This instructions assume that the environment operating system is Windows (Recommend using Powershell 7 as the main terminal)

1. Clone the project

  • using SSH

    git clone git@github.com:VGU-Meme-Group/busnetwork.git
  • or using HTTPS:

    https://github.com/VGU-Meme-Group/busnetwork.git

2. Open the project

  • Open the project by using VSCode IDE (Recommended for convenience)

3. Set up Streaming Data Server

  • (Run the Kafka Server) Locate the kafka binary file you just downloaded into your machine. Assume the file name is kafka_2.13-3.6.0.tgz

    • Then copy the file kafka_2.13-3.6.0.tgz to a folder on your machine. Here I copy it to my C:/ drive to avoid the folder name length limit of Kafka. (Now I have C:/kafka_2.13-3.6.0.tgz)

    • On the C:/ folder, open the terminal and then using this command to extract the Kafka folder:

      tar -xzf .\kafka_2.13-3.6.0.tgz
    • Then change directory to kafka_2.13-3.6.0/

      cd kafka_2.13-3.6.0
    • After that, open 2 terminals from the directory C:/kafka_2.13-3.6.0/ and run these following commands:

      • 1st Terminal (execute the ZooKeeper Server):

        .\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties 
      • 2nd Terminal (executes the Kafka Server):

        .\bin\windows\kafka-server-start.bat .\config\server.properties
  • (Run the Kafka Spring Boot Application) Locate the folder streaming_data:

    cd streaming_data

4. Set up Back-end Server

  • Locate the backend folder:

    cd backend
  • Then install the necessary node modules by using these commands (Make sure that Nodejs have been installed on your machine):

    npm install
  • Then we run 2 API Services of the backend in 2 terminals:

    • 1st terminal:

      node index.js
    • 2nd terminal:

      node main.js

5. Set up Machine Learning Server

  • Locate the Machine Learning folder:

    cd machine_learning
  • Make sure that you have installed Python on your machine, after that, using this command to install all necessary packages:

    pip install -r requirements.txt
  • Then we run the Machine Learning (Prediction) Server by using this command:

    python Server.py    

6. Set up Front-end

  • Locate the frontend folder:

    cd frontend
  • Then install the necessary node modules by using these commands (Make sure that Nodejs have been installed on your machine):

    npm install
  • Finally, execute this command to enables the GUI of the Web application:

    npm run dev
  1. Access the Web Application
  • Now, all you need to do is just open your internet browser (E.g: Google Chrome) and then type the address localhost:3000 on your address bar, then press Enter.

  • Then the GUI will look like this: