Modern React frontend for the Shoukhinabesh e-commerce platform.
This app includes:
- Public storefront (home, shop, product detail)
- Cart, wishlist, and checkout flows
- Auth flows (register, login, forgot/reset password)
- Role-aware dashboards (customer, vendor, admin)
- API integration through Axios + bearer token interceptor
- Client-side routing with React Router
- React 19 + TypeScript
- Vite 8
- React Router
- Axios
- Zustand
- Tailwind CSS (via Vite plugin)
shoukhinabesh-frontend/
├─ public/
├─ src/
│ ├─ api/
│ │ └─ axios.ts
│ ├─ components/
│ │ ├─ common/
│ │ ├─ layout/
│ │ ├─ product/
│ │ └─ ui/
│ ├─ pages/
│ │ ├─ auth/
│ │ ├─ account/
│ │ ├─ vendor/
│ │ ├─ admin/
│ │ ├─ Home.tsx
│ │ ├─ Shop.tsx
│ │ ├─ ProductDetail.tsx
│ │ ├─ Cart.tsx
│ │ ├─ Checkout.tsx
│ │ ├─ Wishlist.tsx
│ │ ├─ ForgotPassword.tsx
│ │ └─ ResetPassword.tsx
│ ├─ services/
│ ├─ store/
│ ├─ App.tsx
│ └─ main.tsx
└─ vite.config.ts
- Node.js 20+
- npm 10+
- Running backend API
Create .env in the frontend root.
VITE_API_URL=http://localhost:3000/api/v1
VITE_STRIPE_PUBLISHABLE_KEY=pk_test_xxxNotes:
VITE_API_URLis required.VITE_STRIPE_PUBLISHABLE_KEYis used by checkout when Stripe is enabled.
- Install dependencies:
npm install- Start dev server:
npm run devDefault local URL: http://localhost:5173
Public:
//shop/product/:slug/cart/login/register/forgot-password/reset-password/wishlist/privacy/terms/cookies
Protected:
/checkout(CUSTOMER)/dashboard(CUSTOMER,VENDOR,ADMIN)/dashboard/orders(CUSTOMER)/vendor(VENDOR,ADMIN)/admin(ADMIN)
npm run dev- Start Vite development servernpm run build- Type-check and build for productionnpm run preview- Preview production build locallynpm run lint- Run ESLint
- Vercel rewrite config is defined in
vercel.jsonfor SPA routing. - Ensure
VITE_API_URLpoints to your deployed backend base URL.