Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

During the Tech Discovery of the feature Free Refill Drinks (QR code), we identified two possible approaches of solution.

...

Sequence Diagram 2.2 (to be validated in PoC) → Goncalves, Felipe Augusto de Souza, Jonatan (Deactivated)

...

Generate Hash Code

  • SHA256. But this doesn’t use password. Double check with Paulo.

  • MD5. But this is also a one-way algorithm. Double check with Paulo.

    • DynamoDB secrets table: rbi-account-secrets

      • rbi/<env>/<brand>/<country>/refill-machine

        • value: {"dispenser_password":"<>" }

    • store id, transaction id, transaction datetime

...

  • Marketing Content / Features/ Feature QR Code Refill Drinks / List of items

    • TBD

  • Marketing Content / Features/ Feature QR Code Refill Drinks / List of stores

  • View file
    namestores.csv

  • View file
    nameproducts.csv

Figma (UX)

https://www.figma.com/file/sfH3mHXoEUfHbm5qMul0Vn/branch/vHkAnCCKjzCGg7ibeurVLW/Popeyes?type=design&node-id=4109-147585&mode=design&t=qfsQcFhawcNhDpIO-0

...

Approach 1: Based on partners → 22 + 10 + 37 + 13 + 20 + 16 + 3 + 34 = 155

  • Backend Services - (22)

    • Packages (Interface) - 2

      • Change the IPartnerOrder interface to add a new refillDrink field. (Interface).

    • Commit Order and commit order callback - 20

      • intl-partner-api - Callback- (5)

        • Add new field "refillDrink" in DynamoDB update (Reference Code) (3)

        • Add new field “hash” as optional in DTO. (2)

      • intl-partners-service - (5)

        • Add new field "refillDrink" in DynamoDB update (Reference Code) (3)

        • Add new field “refillDrink” in Webhook Order interface (Interface) (2)

      • intl-fulfillment-service - (3)

      • intl-whitelabel-graphql - (5)

  • Front-end

    • Place Secure Order

      • Get Order - 10

        • graphql - get order with refill drink hash - 5 ✅

        • database get order with refill drink hash - 5 ✅

      • Hook Refill Drinks - 37

        • Validate Get Order - check Refill Drinks hash - 5 ✅

        • Validate Service Mode (Sanity) - 8

        • Trigger bottom sticker - 8 ✅

        • New modal of QR code - 8 ✅

        • Convert hash to QR code - 8 ✅

    • Recent Order Page - 13

      • Hook Refill Drinks banner

        • Validate Orders

          • Read bottom sticker order - 3 ✅

          • Read Sanity Config (duration) - 5

          • Apply logic to show banner - 5

    • Home Page - 20

      • Check if there’s QR code order in cache - 5 ✅

      • Read Sanity config (sticker duration) - 5

        • Apply logic to show bottom sticker of QR code - 5

        • Add/Remove QR code order in cache - 5

  • Sanity - 16

    • New Feature Refill Drinks - 8

      • Duration of bottom sticker - refill drinks

      • Duration of recent order - refill drinks

    • Configuration of service modes - 8

  • Feature Flag - 3

    • New feature flag for front-end

    • New feature flag for back-end

  • Testing - 34

    • Testing Plan

    • Dev - using mocks

    • QA, STG, PROD - using integration with Winrest

    • Validations in dynamodb

    • Validations of durations of QR code

      • bottom sticker

      • recent order sticker

    • Validation of the last order QR code

    • Validations using native devices

      • responsiveness

      • QR code reading

...

Approach 2: (Standalone) without partners → 10 + 28 +21+8+ 65 + 24 + 13 +20 + 16 +3 +34 = 242

  • Implementation of refillDrink in Sanity - 10

    • New Refill Drink feature section to define:

      • List of stores eligible for refillDrink (5)

      • List of items eligible for refillDrink (5)

  • Configuration of refillDrink in Sanity - 28

    • List of stores eligible for refillDrink - ~40 stores (8)

    • List of items eligible for refillDrink - thousands ( 20 ) ?

  • Synchronization of refillDrink configuration (PortalOps) - 21 ?

  • Configuration of secrets in dynamodb - 8

  • Intl-whitelabel-App

    • New hook to generate the refillDrinkHash ( 65 )

      • validate getOrder response refillDrink fields - 13

        • Retrieve:

          • storeId,

          • transactionId (posOrderId?),

          • order timestamp

      • Get secrets from the database - 13

      • Read eligible drinks and stores from Sanity → 26

        • validate if the storeId is eligible for refillDrink (8)

        • scan menu items ( 13 )

          • Check if any menu item is eligible for refillDrink ( 5 )

      • Apply encryption with the secret key (13 )

...