How juansanchez40/prueba_tecnica_frontend works
Project type and purpose
• This is a full-stack single-page application built with React (Vite), Redux, Tailwind/PostCSS, and hosted via Firebase.
• It uses a JSON-server (db.json) as a mock REST API and Firebase for user authentication (email/password + Google).
File structure
• Top level:
• index.html, package.json, vite.config.js → build and serve the React app
• db.json + json-server script → mock REST API
• firebaseConfig.js, firebase.js → Firebase initialization
• src/:
• src/main.jsx, src/App.jsx → SPA entry point
• src/components/… → reusable UI components (Encabezado, Carrito, TarjetaProducto, Toast)
• src/pages/… → route-level views (Home, Tienda, ProductDetail, Formulario)
• src/routes/… → React Router v6 setup (constRoutes, routes.jsx)
• src/redux/… & src/store/… → Redux action slices + global store
• src/assets/images → static assets
• Config files: .env.local for secrets, tailwind.config.js, postcss.config.js, eslint.config.js
README for additional insights
• Startup flow:
• “npm install” → installs dependencies
• “npx json-server…” → starts mock API at port 3001
• “npm run dev” → starts Vite dev server (http://localhost:5173)
• Authentication: only logged-in users can access “Tienda”
• Deploy target: Firebase Hosting