How kanchan191184/e-shop-website works
Project type and purpose
• This is a full-stack e-commerce “e-cShop” web application built with a React (Vite) frontend, backed by Firebase/Firestore for data storage and a lightweight Node.js server for Stripe payment processing.
• Purpose: Display product catalog, allow browsing, “favorite” toggling, cart management, and handle checkout via Stripe, all backed by a real-time Firestore database.
File structure
• Top-level:
• public, index.html – static assets and HTML entry
• src – React application code
• server – Node.js/Express endpoint for Stripe payments
• config, hooks, services, context – client-side configuration (Firebase), custom React hooks, API wrapper functions, global state
• package.json, vite.config.js – client dependencies and build config
• .env-sample, README.md – environment variables and setup guide
• Patterns:
• Component-based React (pages vs. reusable components)
• Context API for cart state management
• Service layer (src/services) abstracts Firestore queries
• SCSS modules for scoped styling
README for additional insights
• Firebase used for all product data (CRUD via Firestore SDK).
• Stripe secret key in server/.env for payment endpoint.
• Two separate processes: npm run dev for client on 5173, node server/server.js for backend on 4242.