How hectormorgadoc/floriambra_report works
Project type and purpose
• This is a Vue 3 single-page application written in TypeScript and built with Vite.
• It lives entirely in the front end (served via Netlify/CDN) and communicates with an external “management” REST API (see src/api/managementApi.ts).
• It implements several functional modules (auth, client, order, process, report, team) plus common components and a landing page.
File structure
• Top-level:
• index.html, dist/, public/ – static entry and build output
• src/ – all application code
– src/main.ts – app bootstrap, Pinia store registration, router injection
– src/router/index.ts – Vue Router definitions
– src/api/managementApi.ts – HTTP wrapper for backend REST endpoints
– src/App.vue – root component
– src/landing – public landing page
– src/module – functional feature modules, each with action (API calls), interface (DTOs), stores (Pinia), views/layouts (UI)
– src/module/common – shared Vue components and interfaces
• Configuration:
• vite.config.ts, tsconfig*.json, .env.dev, netlify.toml
Key architectural patterns & principles
• Modular “feature‐based” organization: each domain (auth, client, order, process, report, team) lives in its own folder with its views, state, actions and interfaces.
• SFC + <script setup> for Vue components.
• Pinia for centralized state management (each store under src/module/*/stores).
• API layer abstraction (managementApi) decouples UI from HTTP details.
• Vue Router for navigation, guided by route guards in auth.
Main components
a. Front-end SPA (browser)
b. Module layers within the SPA:
• Landing & Auth Module (LoginView, route guards)
• Feature Modules (Client, Order, Process, Report, Team)
• Common Components (UI building blocks)
c. State Management (Pinia stores)
d. API Service (managementApi)
e. External Backend / REST Management API
Relationships and data flow
1) User → Browser → SPA
2) SPA → Vue Router → Module View
3) Module View → Pinia Store (action dispatch)
4) Store Action → managementApi (HTTP request) → Backend
5) Backend → HTTP response → managementApi → Store → View
Essential elements
• Clear component labels (e.g., “AuthStore”, “useClientCookies”, “RegisterClientAction”).
• A container boundary for the SPA vs. the external management API.