Skip to content

Instantly share code, notes, and snippets.

@merlinsbeard
Created January 16, 2025 07:42
Show Gist options
  • Select an option

  • Save merlinsbeard/abf9c30c0ab11e10c51f7518a334bbd2 to your computer and use it in GitHub Desktop.

Select an option

Save merlinsbeard/abf9c30c0ab11e10c51f7518a334bbd2 to your computer and use it in GitHub Desktop.

Buko Dashboard / Onboarding / Reporting

#buko #buko-onboarding #buko-dashboard #buko-reporting

[[2025-01-11]]

Terms

  • Admin - Internal Buko Users
  • Company - Companies that Buko has a contract with
  • Service - The services that Buko provides
    • Cargo
    • Passenger
    • GPS

Description

Admin Dashboard to manage all the buko services. This will control the onboarding of new companies, enabling and disabling of services, and generating reports.

In the future, we will add more features: * Cargo Management * Passenger Management * GPS Tracking

Problem

  • We can only perform direct CRUD operations using the Django Admin

  • Complex operations is difficult to perform using the Django Admin

    • We resort in editing Database most of the time
  • Adding new company requires additional coding changes

Solution

  • Create a dashboard to manage all the services

    • Onboarding
    • Reporting
    • Future Services (Cargo, Passenger, GPS)
  • Add management api endpoints in services

    • These endpoints will be used by the dashboard to perform CRUD operations
  • Create the features directly in the service then add

  • Dashboard to add company

    • With the following

Features

  • [ONBOARDING]
    • Adding of new Company
    • Enable/Disable Company
    • Add/Remove Users To company
    • Enable services
      • Cargo
      • Passenger
  • [REPORTS]
    • Generate Reports
      • Cargo
      • Passenger
    • Export Reports
      • CSV
      • PDF
    • Filter Reports
      • Date
      • Company
      • Service
    • View Reports
      • Cargo
      • Passenger

Future Features

  • CARGO Management
  • Passenger Management
  • [GPS Tracking]
    • Company
      • Track trackers

Context

graph LR
    AdminUser --> DashboardService
    DashboardService --> Company
    DashboardService --> Auth
    DashboardService --> ExternalServices

    subgraph Dashboard Service
        DashboardService[Dashboard Service]
    end

    AdminUser[Admin User]
    Company[Company]
    ExternalServices["External Services <br> (Cargo, Passenger, GPS)"]
Loading

Container

graph TB
    subgraph DashboardService
        direction TB
        WebApplication
        BackendService
    end

    subgraph ExternalServices
        direction TB
        CompanyService
        CargoService
        PassengerService
    end


    WebApplication --> BackendService
    BackendService --> Database

    BackendService --> CompanyService
    BackendService --> CargoService
    BackendService --> PassengerService


    WebApplication["Web Application (React)"]
    BackendService["Dashboard Backend Service (Lambda)"]
    Database[(Database)]
    CompanyService["Auth and Company <br> Service Django"]
Loading

Components

graph TB

subgraph Dashboard UI
    UI
end

subgraph Dashboard Backend Service
    Controller
    AuthService
    CompanyService
    ReportService
    NotificationService
end

UI --> auth["/api/auth"]
UI --> company["/api/company"]
UI --> report["/api/report"]

auth --> Controller["Controller"]
company --> Controller["Controller"]
report --> Controller["Controller"]

Controller --> AuthService
Controller --> CompanyService
Controller --> ReportService
Controller --> NotificationService
Controller --> Database


AuthService["Auth Service"] --> Django
CompanyService["Company Service"] --> Django
ReportService["Report Service"] --> Cargo
ReportService["Report Service"] --> Passenger

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment