Ecommerce Delivery is a Vue 3 + Quasar 2 single-page application scaffolded withDocumentation 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.
@quasar/app-webpack. All application source lives under src/, which is subdivided by concern — pages, components, layouts, tools, store, router, boot files, and Firebase glue. Understanding the layout of this tree is the fastest way to navigate the codebase and know where to add new features.
Directory tree
Key conventions
Pages ↔ Routes
Every file under
pages/ is a route-level component — it maps 1-to-1 to an entry in src/router/routes.js. Components inside components/ are reusable pieces that multiple pages can import.Stateless tools
tools/ contains pure JavaScript helper functions with no Vue dependencies. They can be imported into any component or page without creating circular references.Boot files
Files listed in the
boot array of quasar.config.js run before the Vue application mounts. src/boot/axios.js is the only registered boot file — it attaches the Axios instance as this.$axios and this.$api on the Vue global.Layouts wrap pages
Files in
layouts/ are shell components that contain a <router-view />. They provide the persistent navigation chrome (header, drawer) that surrounds page components.Layouts
MainLayout.vue is the outer shell for every authenticated route. It reads the logged-in user’s role from localStorage and conditionally renders one of two navigation sidebars based on the role value:
type:
| Component | Role value | Purpose |
|---|---|---|
NavBar_admin.vue | 2 | Admin sidebar — includes Ventas, Miembros, and a green branded header |
NavBar_users.vue | 1 or 3 | Customer/staff sidebar — includes Inicio, Camisetas (with sub-categories), Compras, and a live cart badge |
NavBar_users.vue also maintains a reactive cart count by listening for both the native storage event and the custom cartUpdated event dispatched whenever the cart contents change:
Firebase integration
src/firebase/init.js initialises the Firebase app and messaging using environment variables from .env (loaded via dotenv in quasar.config.js).
App.vue (the root component) imports messaging and registers a foreground message handler via onMessage from the Firebase Messaging SDK. This means push notifications received while the app is open are handled in-app rather than by the service worker.
Build artifacts
The.quasar/ directory at the project root is generated by the Quasar CLI at build time and is not committed to version control. It contains the compiled app entry points, Webpack configuration overrides, and auto-imported component registrations. You should never edit files inside .quasar/ directly — they are regenerated on every quasar dev or quasar build invocation.