Skip to content

Đường dẫn hai app Flutter ​

Trang sinh tự động

Nguồn: code/packages/app-core/lib. Không sửa tay.

Cùng quy tắc với web: app không viết thẳng đường dẫn, mọi GoRoute, context.go() và redirect dùng hằng số trong PiRoutes (pi_core).

95 đường dẫn, dùng chung cho User App và Sale App — mỗi app chỉ đăng ký những route nó có.

Đường dẫnHằng sốGhi chú trong code
/home
/a/:codeaffiliate
/accountaccountFifth tab (U-07 "Tài khoản"). Public: a guest sees the signed-out state with a sign-in entry; personal entries behind it are protected.
/account/addressesaccountAddressesAddress book (U11) and its add / edit form (U12), outside the tab bar. All under [accountAddresses], so one protected prefix covers them. The form pops with the saved address, which is how the checkout picker (U28) gets it back. [accountAddressEdit] is a pattern; build it with [accountAddressEditPath].
/account/addresses/:id/editaccountAddressEdit
/account/addresses/newaccountAddressNew
/account/affiliateaccountAffiliateU-54: orders through my links, rewards, my links.
/account/affiliate/entries/:idaccountAffiliateEntryU-54A: one attributed order with its reward entry (by attribution id).
/account/affiliate/pickaccountAffiliatePickU-58: choose a Campaign to share. Optional ?expired=1 explains that the previous choice is no longer open.
/account/affiliate/share/:campaignIdaccountAffiliateShareU-53: my link to one Campaign (created on open, or found).
/account/missionsaccountMissionsMembership Tier (T_49) with its rank points and Tier history (T_49A), in the Account branch. Each sits under its own prefix ([accountMissions], [accountTier]) so one protected prefix covers it: they belong to the signed-in caller. [accountMission] is a pattern; build it with [accountMissionPath]. ?list=tier opens the Tier list of the Missions.
/account/missions/:idaccountMission
/account/profileaccountProfileOwn profile (U08) and its password side screen, outside the tab bar (U13 phone change is not a route in R1, DEC-U-PHONE-CHANGE). All sit under [accountProfile], so one protected prefix covers them (UA-03: the profile belongs to a signed-in customer).
/account/profile/phoneaccountProfilePhoneU13 phone change. Registered only in mock builds (DEC-U-PHONE-CHANGE: self-service phone change is outside R1, no API).
/account/referralaccountReferralP5-U22 Referral ("Mời bạn bè"): the share screen, the referred people and one person's detail. All under [accountReferral], so one protected prefix covers them (the link and the list belong to the signed-in caller).
/account/referral/peopleaccountReferralPeople
/account/referral/people/:idaccountReferralPerson
/account/supportaccountSupportH_65 support centre, in the Account branch.
/account/tieraccountTier
/account/tier/rankaccountTierRank
/account/walletaccountWalletP5-U18 "Ví của tôi" (V_43 / V_44) and its identity step (V_61), in the Account branch. Both sit under [accountWallet], so one protected prefix covers them: a wallet belongs to a signed-in customer.
/account/wallet/historyaccountWalletHistoryP5-U19 point history (V_45) and one line of it (V_46), under [accountWallet] (same protected prefix). The reference is PiPoint's opaque transaction id.
/account/wallet/history/:refaccountWalletEntry
/account/wallet/verifyaccountWalletVerify
/affiliate-orderslist
/affiliate-orders/:iddetail
/affiliate-orders/:id/pointspoints
/campaignssaleCampaignsP5-S07 (S-13..S-15): choose a campaign to share and read its offer. Full screens outside the tab bar; one prefix, so the guard and the deep-link allowlist cover both. The id is percent-encoded.
/campaigns/:idsaleCampaignDetail
/campaigns/:id/linksaleCampaignLink
/contentcontentC_56 / C_56b: the published articles ("Hướng dẫn & chính sách") and one article by slug. Legal text is read from the CMS only (DEC-S-CMS-LEGAL).
/contentcmsContentP5-S18 (S-45): one published CMS article of the Sale app by slug (the point policy, the collaboration terms). Outside the tab bar; protected like every Sale business path. Build links with [cmsContentPath].
/content/:slugcontentArticle
/content/:slugcmsContentDetail
/customerscustomersCustomers tab root: the customers a sales person referred.
/customers/:idcustomerDetailP5-S10 (S-23): one customer of the Sale, by the id the list returned.
/forgot-passwordforgotPassword
/group-buygroupBuy
/group-buy-introgroupBuyIntro"How Group Buy works" (G1-01): reachable from the Mua chung list, never a gate in front of it. Public.
/group-buy-joingroupBuyJoinHand-off from the Group Buy detail to the join / deposit checkout (P5-U07). A SEPARATE prefix, not under [PiRoutes.groupBuy]: the detail is public, this path is a guarded checkout route (userCheckoutRoutes) that needs a signed-in customer and re-quotes after sign-in. Carries only ids (?product=), never a price or an amount.
/group-buy-join/:idgroupBuyJoinDetail
/group-buy-join/order/:orderIdgroupBuyDepositDeposit (P5-U08) and spin session (P5-U09) of a placed Group Buy order, under [groupBuyJoin]: guarded.
/group-buy-join/order/:orderId/dealdeal
/group-buy-join/order/:orderId/paygroupBuyDepositPayBR-DC-08): the payment method is picked, then "Thanh toán" starts the deposit of that order. Takes the order in extra like [groupBuyDeposit]; opened by the id alone it goes to G1-05b first. Under [groupBuyJoin]: guarded. Not re-exported by PiRoutes (that file is at its size limit): import this file by path.
/group-buy-join/order/:orderId/remainingremaining
/group-buy-join/order/:orderId/resultresult
/group-buy-join/order/:orderId/spingroupBuySpin
/group-buy/:idgroupBuyDetail
/link-unavailablelinkUnavailableL_57 / L_57b: where a link the app cannot honor lands. reason is one of the tokens the screens parse (anything else reads as not found); it carries no id, name or order data.
/missionssaleMissionsP5-S14 Missions (S-32 list, S-33 detail), pushed over the shell. Under [saleMissions], so one allowlisted deep-link prefix covers both.
/missions/:idsaleMission
/no-accessnoAccess
/notificationsnotificationsIn-app notifications (bell on Home). Protected: they belong to the caller.
/ordersordersOrders tab root — protected (an order belongs to a signed-in customer).
/orders/:idorderDetailUnder [orders], so the protected prefix covers it.
/orders/:id/cancelorderCancelP5-U17 order sub-screens (all under [orders], so they are protected).
/orders/:id/cycles/:cycleNoorderCycleP5-U16: one cycle of a Recurring order (O-37A) and one shipment (O-39).
/orders/:id/depositorderDepositG1-05b/G1-05c: an order still waiting for its deposit (24 h hold), or the same order once cancelled unpaid. Under [orders], so it is protected.
/orders/:id/outcomeorderOutcome
/orders/:id/refundorderRefund
/orders/:id/refund-requestrequest
/orders/:id/shipments/:shipmentIdorderShipment
/orders/:id/transactionsorderTransactions
/page/:slugcontentPage
/payment-return/:idpaymentReturn#479 T16: where MoMo sends the customer back after a payment (<scheme>://payment-return/<orderId>, flag MOMO_APP_PAY_ENABLED). Never navigated to in the app: a running app stays on its screen (which re-checks), a cold start opens the order.
/pendingpendingSigned in, but no access to this app yet (me.nextStep != READY).
/pending/applicationsaleApplication
/profileprofile
/profile/redemptionsaleRedemptionP5-S20: "not offered" state of the bank redemption proposal (QD-*, DEC-FIN-REDEMPTION); no form, no bank data.
/profile/walletsaleWalletapp-sale PiPoint wallet (P5-S12/S13), under the Account tab's /profile (allowlist + session guard). S-28 overview:
/profile/wallet/opensaleWalletOpenS-27: open or link My wallet.
/profile/wallet/verifysaleWalletVerifyS-49: identity (eKYC) verification before linking.
/r/:codereferral
/recurringrecurringĐịnh kỳ tab root = Danh sách rổ (U-22, BR-KPD-02): what every entry that names no basket opens. Public.
/recurring-introrecurringIntro"How Mua dinh ky works" (G2-01): reachable from the Dinh ky list, never a gate in front of it. Public.
/recurring-joinrecurringJoinThe guarded Recurring join / deposit checkout (P5-U12): cycles, deposit, points and address of one basket. A SEPARATE prefix, not under [PiRoutes.recurring]: the basket pages are public, this path is a guarded checkout route (userCheckoutRoutes) that needs a signed-in customer and re-quotes after sign-in. Carries only the basket id, never a price or an amount.
/recurring-join/:idrecurringCheckout
/recurring-join/:id/$recurringQuantitiesSegmentrecurringQuantities
/recurring-join/order/:orderIdrecurringDepositThe deposit of one placed Recurring order (mock MoMo, verifying, outcome, success) and its spin session (G2-07, G2-08). Under [recurringJoin], so the guarded prefix covers them.
/recurring-join/order/:orderId/closerecurringCloseP5-U13: the close result of a Recurring order (G2_09), its one online remaining payment (U31d) and the payment result (U60c online, U60d COD). Under [recurringJoin] like the deposit, so the same guard covers them.
/recurring-join/order/:orderId/remainingrecurringRemaining
/recurring-join/order/:orderId/resultrecurringResult
/recurring-join/order/:orderId/spinrecurringSpin
/recurring/:idrecurringDetail
/recurring/:id/products/:productIdrecurringProductDetailOne product of a Recurring basket (G2-04). Public.
/referralsaleReferralP5-S09 Referral invite (S-18), its benefits (S-19) and one referred person (S-20): pushed screens outside the tab bar. All under [saleReferral], so one prefix covers them (the link and the people belong to the signed-in Sale). Not the Affiliate link (S-16): a different link.
/referral/benefitssaleReferralBenefits
/referral/people/:idsaleReferralPerson
/searchsearchSearch over the published Group Buys (U-15), in the Mua chung branch. Optional ?q= pre-fills the keyword (see [searchPath]). Public.
/session-expiredsessionExpiredP5-S01 (S-08 "Phiên đăng nhập hết hạn"): where a session that ended without the person asking is explained before sign-in. A transit route like [signIn]: it carries ?from=<intended> and never needs a session.
/sign-insignIn
/sign-upsignUp
/splashsplashParked here while the session is unresolved; carries ?from=<intended>.
/tiersaleTier
/unavailablesaleUnavailableP5-S19 (S-47): the safe fallback for a link or notification target that is closed, hidden, removed or not the caller's. Carries ?kind=closed|missing and nothing about the target. A business route (needs a session), never a post-sign-in destination.

Chính sách truy cập ​

Cùng một bộ đường dẫn nhưng hai app gác khác nhau:

  • Sale App — AuthPolicy.required: mọi route trừ route đăng nhập đều cần phiên đã READY.
  • User App — AuthPolicy.optional: xem hàng là công khai, chỉ những route trong tập protected (đơn hàng, ví, hồ sơ, thanh toán) mới đẩy sang đăng nhập, và sau khi đăng nhập thì quay lại đúng chỗ đang xem.

Sinh từ ad83b0aea · 820 migration · PostgreSQL 17