How arnaupinyol/lista-de-fundas works
Project Type and Purpose
• This is a single-page application (SPA) built with React, styled with Tailwind/PostCSS, and bundled by Vite.
• It has no backend services; all data lives in static JS modules under src/data. The UI lets users browse a catalog via components like CatalogViewer, FundaViewer, etc.
File-Structure Analysis
• Top-level:
• index.html – host page for the React app
• package.json & lock – npm dependencies & scripts
• Vite/Tailwind/PostCSS configs – build & styling pipeline
• src/
• main.jsx – React app entry point
• App.jsx – root component
• assets/ – static images/logos
• data/ – catalog.js & designs.js (static “database”)
• components/ – reusable UI pieces (sidebar, selectors, viewers)
• index.css – global styles
README Insights
• (Empty) – assume standard React + Vite SPA deployment to a static host/CDN.
Components
a. User & Browser
• User → Browser (runs the SPA)
b. Static Hosting Layer
• CDN / Static Web Server (e.g., Vercel, Netlify) serves index.html, JS/CSS bundles, assets
c. Build Pipeline (toolchain)
• Developer machine & CI → npm scripts → Vite (bundles JS/CSS) → PostCSS/Tailwind (styles) → dist/
d. Runtime App Components
• App Shell (Router, Context Providers)
• UI Components:
• CarreteSidebar
• MarcaSelector & ModeloSelector
• CatalogViewer & FundaViewer
• Data Layer:
• Static data modules (catalog.js, designs.js)
e. Optional External Services (if any in future)
• Analytics, Error Logging, Feature Flags
Relationships & Data Flow
• User actions (click selectors) → UI Components trigger state updates (React Context or props) → Data Layer (static JS) provides data → Components render views.
• Build Pipeline compiles source → produces static assets → deployed to CDN → served to the browser.
Architectural Patterns & Principles
• Component-based UI (React)
• Separation of Concerns:
• Styling (Tailwind/PostCSS) vs. Layout vs. Data
• Build Pipeline vs. Runtime
• Single source of truth for catalog data (static modules)
Detail Level
• Call out PostCSS/Tailwind as part of the styling sub-pipeline.
• Vite dev server separately from the production CDN.