How leacarp/rappi-frontend-tp works
Project type and purpose
• This is a single-page application (SPA) frontend built with Vue 3 and Vite.
• Its primary responsibility is to render the UI, manage client-side state, handle routing between views, and package assets for deployment.
File structure
• Top-level files:
• index.html – application shell and entry point for Vite’s dev server and production build
• package.json & package-lock.json – project metadata, dependencies, scripts
• vite.config.js – build and dev-server configuration
• src/ directory:
• main.js – bootstraps Vue app, attaches router and store
• App.vue – root component
• router/index.js – Vue Router configuration, route definitions
• stores/counter.js – Pinia (or equivalent store) for global state management
• views/*.vue – page components (HomeView, AboutView)
• assets/ – static CSS and images
• public/ – static files copied as-is to build output
README for additional insights
• Emphasizes development with Vite and Vue 3, hot-reload, linting, and production build steps.
• No backend or external API described, so assume the SPA consumes a separate API layer (to be detailed by the team).
Main components
a. Browser / Client
• Vue 3 application
• Vue Router (client-side routing)
• Pinia (or Vuex) state management
• UI components and views
b. Build System
• Vite Dev Server (ESM, HMR) for development
• Vite/Rollup bundler for production
c. Static Asset Host
• CDN or web server (e.g., Netlify, AWS S3 + CloudFront) serving built files
d. External Services (optional)
• REST or GraphQL API backends
• Authentication provider (OAuth, Firebase, etc.)
• Third-party analytics or monitoring
Relationships and interactions
• At runtime: Browser requests index.html → dev server or CDN → serves JS/CSS bundle → Vue app initializes → main.js mounts App.vue → Router loads appropriate view → Components read/write global state via store → Components fetch data from external APIs.
• At build time: Source files (src/*, public) → Vite processes .vue modules, CSS → produces optimized static assets → deploy to hosting.
Architectural patterns and design principles
• SPA architecture with clear separation: Presentation (components/views) vs. State (Pinia) vs. Routing (Vue Router).
• Module-based code organization by feature (views) and concern (router, store).
• Dev/prod parity via Vite configuration.
Final checklist
• All major components: Browser, App entry, Router, Store, Views/Components, Build tools, Hosting, External APIs.
• Brief annotations where necessary (e.g., “HMR enabled in dev”).