How duckmoron/proyecto-reactjs works
Project type and purpose
• This is a React single-page application (SPA) scaffolded with Vite.
• Purpose: a simple product gallery/e-commerce demo with pages for browsing products, an admin section to add/edit products, a shopping cart, and user authentication (protected routes).
File structure
Top level
• package.json / package-lock.json, Vite & React plugins, ESLint config
• index.html – the SPA entry point
• public/ – static assets & JSON data (public/data/data.json, users.json) served at runtime
• src/ – application code
– main.jsx – mounts React into index.html
– App.jsx + App.css – root component, router setup
– auth/RutaProtegida.jsx – route guard component for protected pages
– pages/ – top-level routes (Home, Admin, Login, etc.)
– components/ – reusable UI pieces (ProductList, Cart, Forms, Header/Footer)
– context/ – React Context providers (AuthContext, CartContext, AdminContext)
– utils/ – helper modules (e.g. datas2.js)
README
• Confirms minimal React + Vite setup, HMR via official plugins
• No backend; static JSON files are used for demo data