Ecommerce Delivery uses Vue Router 4, configured through Quasar’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/ecommerce-delivery-frontend/llms.txt
Use this file to discover all available pages before exploring further.
route() wrapper in src/router/index.js. Routes are defined in a separate src/router/routes.js file and split into two groups: standalone public pages that render with no layout shell, and authenticated pages nested under MainLayout which provides the persistent navigation drawer and header. A global beforeEach guard handles session-level route protection.
Router mode
The router operates in hash mode, set explicitly inquasar.config.js:
# hash prefix (e.g. https://yourapp.com/#/posts). This means no server-side rewrite rules are required — any static file host or CDN can serve the app without additional configuration. The router selection logic in src/router/index.js also supports history mode and SSR memory history, but hash mode is the deployed default:
Route groups
Routes are divided into two structural groups based on whether they require the authenticated layout shell.Standalone routes (no layout)
These pages render directly withoutMainLayout. They are used for authentication flows where the nav sidebar would be inappropriate:
/login— sign in/registro— sign up/security-code— post-signup email verification/new-password-confirm— password reset confirmation/auth-page— OAuth redirect target/change-password— forgot password / recovery
MainLayout children (authenticated)
All of the following are nested children of the root/ route which loads layouts/MainLayout. They inherit the header and navigation drawer:
/posts— product catalog/miembros— admin member list/sales— admin sales report/camisetas/:typeShirt— products filtered by shirt type/client-id— client profile/formulario-page— user form/Store— product store (alias for MainStore)/shoppingcar— shopping cart/shoppingList— order history/notifications— notification feed/update-password-width-token— token-based password reset
/update-password-width-token is defined as a child of MainLayout in routes.js even though it is a password-reset flow. If your backend redirects to this URL before a user is logged in, ensure the navigation guard (described below) permits access without a session.Full route table
| Path | Name | Component | Notes |
|---|---|---|---|
/login | login | pages/login/SignIn | Public |
/registro | registro | pages/login/signUp | Public |
/security-code | security-code | pages/security/secureCode | Post-signup verification |
/new-password-confirm | new-password-confirm | pages/login/confirmeNewPassword | Password reset |
/auth-page | auth-page | pages/login/authPage | Auth redirect target |
/change-password | change-password | pages/login/recoveryPassword | Forgot password |
/update-password-width-token | update-password-width-token | pages/login/updatePass/updatePasswordWithToken | Token-based reset (MainLayout child) |
/posts | posts | pages/store/MainStore | Product catalog |
/miembros | miembros | pages/Members/MembersPage | Admin: member list |
/sales | sales | pages/sales/salesPage | Admin: sales report |
/camisetas/:typeShirt | CamisetasPage | pages/Camisetas/CamisetasPage | Products filtered by shirt type |
/client-id | client-id | pages/Perfil/Cliente/ClientId | Client profile |
/formulario-page | formulario-page | pages/Perfil/Formularios/FormularioPage | User form |
/Store | Store | pages/store/MainStore | Product store (MainLayout child alias) |
/shoppingcar | Shoppingcar | pages/shoppingCar/Car | Shopping cart |
/shoppingList | Shoppinglist | pages/shopping/ShoppingList | Order history |
/notifications | notifications | pages/notifications/Notifications | Notification feed |
/:catchAll(.*)* | — | pages/shared/ErrorNotFound | 404 fallback |
Navigation guards
Route protection is implemented at two levels: a globalbeforeEach guard in the router, and per-component validateUser() calls before API requests.
Global beforeEach guard
src/router/index.js registers a beforeEach hook that checks for a stored user object on every navigation:
rutasPublicas allowlist and no user object exists in localStorage, the guard redirects to login. This provides a baseline layer of protection even before any component mounts.
Per-component role validation
Inside each protected component’ssetup(), validateUser() from src/tools/User.js is called before any API request to verify the user has the required role:
Lazy loading
Every route uses a dynamicimport() with a /* webpackChunkName */ magic comment so Webpack splits the bundle into named async chunks:
