How dezeriandroid/fruit-shop works
Project type and purpose
• This is a single-page application (SPA) written in TypeScript with React, built and served by Vite.
• It implements a simple “fruit shop” UI: browsing fruits, adding/removing items in a cart, placing orders, user registration, and theme toggling.
File structure
• Top level:
• index.html – SPA entry point
• vite.config.ts, tsconfig*.json, package.json – build/configuration
• public/ – static assets (404 page, favicon, etc.)
• src/ – all client-side code
• main.tsx – React DOM bootstrapping, wraps App in Context providers
• App.tsx + App.css – root component
• Components/ – UI screens and widgets (Header, Home, FruitList, Cart, Orders, Registration)
• Context/ – React Context providers for theme, error handling, fruit list data, cart/orders state, quantity, total price
• hooks/ – custom hooks (useCart, useFruitList, useOrders) encapsulating business logic and Context consumption