How ecorrouge/rococo-sample-vue3 works
Project type and purpose
• This is a single-page application (SPA) built with Quasar (Vue 3) as a “rococo-sample-vue3” starter front-end.
• It provides authentication pages (Login, Signup, Forgot/Set Password) and likely communicates with a Rococo blockchain endpoint or an authentication API.
File structure
• Top-level Quasar config and build files: quasar.config.js, index.html, package.json, postcss.config.js, etc.
• src/boot – plugin initializers (axios, pinia) that run before app launch.
• src/router – Vue Router setup (index.js, routes.js).
• src/stores – Pinia stores (auth.js) for global reactive state.
• src/pages – high-level views (IndexPage, LoginPage, etc.).
• src/layouts – MainLayout.vue wrapping all pages.
• src/components – reusable pieces (AppHeader.vue, EssentialLink.vue).
• src/services & src/utils – localStorage.service, apiHelper, and axios config under src/config for abstracting API calls.
• src/assets & src/css – static resources and style definitions.
Key README insights
• The app runs in “quasar dev” and builds with “quasar build.”
• No backend code shipped here—this is purely the front-end.
• Customization happens via quasar.config.js.
Main components & their relationships
a. Browser / Client – hosts the Quasar SPA (index.html loads Quasar/Vite bundle).
b. Quasar Framework & Vue3 – the runtime that wires up boot files, router, store, layout, pages and components.
c. Router – directs URL changes into page components.
d. Pinia Store – holds authentication state and other shared data.
e. Service Layer
• Axios instance (src/boot/axios.js & src/config/axios.js)
• apiHelper.js for standardized calls
• localStorage.service.js for persistence in browser storage
f. External Services – e.g., a rococo RPC endpoint or auth REST API.
g. Static assets & styles – under src/assets and src/css.
Important architectural patterns
• SPA with MVVM flavor (Vue components = View/ViewModel, Pinia = Model)
• Dependency injection via boot files (quasar boot)
• Service-oriented API abstraction (axios + helper + config)
• Separation of concerns: UI (components/pages/layouts) vs. State (stores) vs. Infrastructure (services/utils)