How nabilmouami/frontend-yazasneakers works
Project type and purpose
• This is a Next.js–based e-commerce front-end (“Beshop Next App”).
• It provides a storefront UI (pages, components, assets), client-side shopping cart state (Redux slices), and integrates with external APIs for products, orders, payments, etc.
File structure
• Top-level:
• public/ – static assets served via CDN (images, CSS, fonts)
• src/pages/ – Next.js route handlers (SSG, SSR, dynamic routes)
• src/components/ – React UI organized by category (layout, sections, elements, blog, shop)
• src/features/ & src/layout/ – Redux slices and store config; layout wrappers
• src/util/ – config (e.g. API endpoints), mock data (blog.json)
• next.config.js, jsconfig.json, package.json – build, path aliases, dependencies
• Patterns & architectural choices:
• Next.js page‐based routing with static & dynamic generation
• Global state via Redux Toolkit (features/\*Slice.js + store.js)
• Separation of concerns: layout vs. sections vs. elements vs. pages
• Public folder for CDN assets
• Utilities for API configuration
README
• Minimal: shows build & start commands, live preview URL
• Implies deployment on Vercel or similar (host’s SSR/SSG)
Elements
• Clear labels for each component (e.g., “Next.js Server”, “Redux Store”)
• From Browser → Next.js for initial page request
• From Next.js → External API for data
• From Browser → CDN for assets
• From UI Components → Redux Store for dispatch/select
• Rectangles for internal components (Next.js, Redux slices)