RTK QueryAdvanced
Complete Project — Reference ফোল্ডার
পুরো Redux+RTK project-এর file-by-file জায়গা — বাংলায়।
4টি অংশবাংলা ভাষায়
final structuretext
text
src/
├─ app/
│ ├─ layout.tsx # ReduxProvider
│ ├─ page.tsx # storefront (client)
│ ├─ store.ts # configureStore + types
│ ├─ listener.ts # createListenerMiddleware
│ └─ cart/page.tsx # cart page (client)
├─ components/
│ ├─ ui/ # shadcn
│ ├─ products/
│ │ ├─ product-grid.tsx
│ │ ├─ product-card.tsx
│ │ └─ add-to-cart-button.tsx
│ └─ cart/
│ ├─ cart-drawer.tsx
│ └─ checkout-button.tsx
├─ features/
│ ├─ cart/
│ │ ├─ cartSlice.ts
│ │ └─ cartSelectors.ts
│ ├─ orders/
│ │ └─ ordersService.ts # createApi
│ └─ products/
│ └─ productsService.ts # createApi
├─ hooks/
│ ├─ use-app-dispatch.ts
│ └─ use-app-selector.ts
└─ types/
└─ index.ts
Building order
types→use-app-*hooks →store.tscartSlice+cartSelectorsordersService/productsService(createApi)- listener.ts + store-এ middleware
- react-redux Provider wrapping
- UI components → RTK Query হুক + slice dispatch
এটাই minima
এই reference-টি production-ready minimum ভিত্তি। এর উপর সহজে auth slice, entities, notifications-listener — একই pattern-এ যোগ করা যায়।
শেষ প্যারায় নিজে practice করুন — কোড কপি করে নিজের এডিটরে চালিয়ে দেখুন।