[3.4] Order Tracking - FEUP-MEIC-DS-2025-26/madeinportugal.store GitHub Wiki

Order tracking

Vision

The order tracker empowers users with complete transparency and confidence throughout the delivery journey. By combining a dynamic progress bar with real‑time location updates on an interactive map, it transforms complex logistics into a simple, intuitive experience. Customers can instantly see where their order is, what stage it is in, and when to expect delivery. Unlike traditional systems that often lack reliability and trust, this tracker integrates blockchain technology to guarantee the authenticity and immutability of every update.

Main features

  • Visualization of an order’s current state
  • Progress bar for intuitive tracking of delivery stages
  • Live Map with the order location
  • Delivery address updates
  • Order Updates
  • Proof of authentic order updates
  • Notifications of important updates
  • Carbon Footprint of the delivery
  • Real-time estimate delivery time

Technologies and Development Tools

This service is built with scalability and future enhancements in mind. It includes:

  • PostgreSQL for storing order and update data;
  • Go backend with RESTful endpoints implemented with Gin and database manipulation using Gorm;
  • Air provides hot‑reload capabilities for the Go development environment, enabling faster iteration and improved developer productivity;
  • Integration with the Jumpseller API enables the system to seamlessly retrieve product information;
  • Google Pub Sub to receive new orders, new order updates and send messages to the notification service;
  • Micro‑frontend designed to be simple and modern, built with React and leveraging Module Federation to enable seamless integration and scalability across different parts of the application.
  • Vite provides a fast development environment with hot‑reload features, streamlining frontend development and improving efficiency;
  • Docker for containerization and environment consistency, both in local development and in production;
  • Google Cloud Platform (GCP) for hosting;
  • Terraform for infrastructure provisioning and automated deployment;
  • Blockchain technology by integrating the Ethereum testnet "Sepolia" and the go-ethereum (Geth) client.

Architecture

The system is composed of five core components, each fulfilling a distinct role in the order tracking architecture:

  • A User Interface (UI) that allows users to view real-time tracking information, including order status, location, and delivery details.
  • The API layer is responsible for handling all business logic, processing incoming requests, and delivering appropriate responses to the frontend. It serves as the intermediary between the user interface and the underlying services, communicating with lower layers to retrieve the information required by the frontend and ensuring that data is consistently and reliably provided to users.
  • The Order Detail component is responsible for processing incoming orders and order updates, forwarding this information to the API layer, and ensuring that all relevant data flows seamlessly through the system. In addition to handling these core responsibilities, it communicates with the Jumpseller API to retrieve product information, interacts with the checkout service to receive new orders, and integrates with the notification service to send alerts whenever order details are updated.
  • A Blockchain-based verification module that ensures the authenticity of order updates by securely recording and validating data on-chain.
  • A Database access layer responsible for storing and retrieving order data, product associations, and status history.

Below, you can find the system, container, and component C4 diagrams, which visually illustrate the overall system architecture.

C4 System Diagram

C4 Container Diagram

C4 Component Diagram

Below is also possible to see the deployment, component and class UML diagrams with the architecture of the service.

Deployment Diagram

Component Diagram

Class diagram

Development

More details on how to start development in our service and more information about the code can be found in the Readme in our repository.

API Documentation

To access the API documentation for the backend service, click here.

Quality Assurance and Integration Pipeline

To maintain the quality of deployed code, deployments are triggered only when changes are merged into the deploy branch. Before merging, developers validate the code, and once approved, the deploy branch automatically pushes updates to GCP. All code submitted to the main branch undergoes unit testing, with errors flagged immediately if any test fails. New features are developed in separate branches, and each pull request must be reviewed by at least two developers to ensure the integrity and reliability of the code being integrated into the main branch.

Changelog

The changelog is available in the team repository. It can be accessed here

Sprint 0 - Prototype

The prototype information can be found in this page: prototype

Sprint 1 - Retrospective

The sprint 1 retrospective can be seen here

Sprint 2 - Retrospective

The sprint 2 retrospective can be seen here