ZhiXin18 / flowmotion

0 stars 1 forks source link

Lab 5: Routing Dashboard Feature #17

Open mrzzy opened 1 week ago

mrzzy commented 1 week ago

Motivation

Part of Lab 5

Task

Implement Routing Dashboard Feature in 2.4.1.1- 2.1.4.4 of the SRS

Proposal

Extend current system design to support routing:

---
title: Flowmotion System Architecture Diagram
---
flowchart
    app(Flutter App) <-->|user data| db
    app <-->|authenticate| auth
    app -->|congestion rating\n & route| backend

    subgraph gcp[Google Cloud]
        subgraph Firebase
            db[(Firestore)] 
            auth[Firebase\n Authentication]
        end

        subgraph cr[GCP Cloud Run]
            backend[Backend]
            backend <-->|routing| gsrm[GSRM]
            backend <-->|cache| db
        end
    end
    backend -->|geocoding| geocode
    geocode((Nominatim))

    api((Data.gov.sg)) -->|traffic images| m
    subgraph Github Actions
        direction LR
        m[[ML Pipeline]] -->|rating| db
        m -->|custom profile| gsrm["GSRM\n(custom)"]
        m <-->|rating| ml[Model]
    end

Routing Service

Routing Service will run on GCP Cloud Run and offer APIs to the Mobile App.

Backend API: OpenAPI spec @F-R-YEO @Inscrutablydistinct @mrzzy @devlinwaluja

ML Pipeline: @mrzzy @devlinwaluja OSRM API: @mrzzy @devlinwaluja

Plan B: Replace ORSM & ML Pipeline extension with Mapbox API to perform routing.

Mobile

Routing Dashboard Feature in 2.4.1.1- 2.1.4.4 of the SRS with the assistance of the Backend API. @ZhiXin18 @thesmolbeann

mrzzy commented 1 day ago

@devlinwaluja & @Inscrutablydistinct Please implement: https://github.com/ZhiXin18/flowmotion/blob/18c622ba61b6fdcf7bbff096394a293eb54f14f1/backend/index.ts#L51-L52

with caching to Firebase.

@F-R-YEO Please implement: https://github.com/ZhiXin18/flowmotion/blob/70df29bfbc53c4191d97b576aecfd3d45d8684ef/backend/services/congestion.ts#L79