Releases: bagisto/nextjs-commerce
Release list
Version v3.1.0
Overview
Version v3.1.0 represents a major refactoring of the Bagisto Next.js Commerce platform, focusing on API consolidation, improved component architecture, and enhanced user experience. This release transitions from multiple REST API endpoints to a unified GraphQL API and introduces comprehensive product review functionality.
Key Highlights
🚀 API Consolidation
- Unified GraphQL Endpoint: All API operations now route through a single
/api/graphqlendpoint for better maintainability and performance. - Removed REST APIs: Deprecated legacy REST API routes for cart, checkout, and review operations.
- Better Query Management: Implemented GraphQL fragments (
ProductCore,ProductDetailed) for more efficient and reusable queries.
⭐ Product Review System
- Full-featured product review system with user ratings and review creation.
- New review components:
ReviewButton,NoReview,ReviewSection,ReviewDetail,AddProductReview. - Product review hooks for seamless integration:
useProductReview,getProductReviews. - Enhanced product detail pages with comprehensive review information.
🎨 Enhanced UI/UX
- Improved Responsiveness: Complete refactoring for better mobile-first design.
- Loading States: New loading spinners and shimmer components for smooth data transitions.
- Error Boundaries: Comprehensive error boundary implementation for better error handling.
- Skeleton Loaders: Added skeleton loaders for navbar, product grid, and carousel sections.
🏗️ Code Architecture Improvements
- Cleaner Provider Structure: Refactored providers with
GlobalProvidersandSessionManagerfor better session handling. - Organized GraphQL Queries: Better folder structure and organization of GraphQL queries and mutations.
- Custom Hooks: New utility hooks for common operations:
useCache,useAddress,useBodyScrollLock, etc. - Type Safety: Enhanced TypeScript types and definitions across the application.
Technical Changes
New Files & Components
GraphQL
/api/graphql/route.ts- Unified GraphQL API endpointgraphql/catalog/- Reorganized catalog queries and mutationsgraphql/catalog/fragments/- Reusable GraphQL fragments
Components
components/error/ErrorBoundary.tsx- Error boundary componentcomponents/common/LoadingSpinner.tsx- Loading spinner componentcomponents/common/Shimmer.tsx- Shimmer loading componentcomponents/layout/navbar/CartAndUserActions.tsx- Cart and user actionscomponents/layout/navbar/CategoriesMenu.tsx- Categories menu componentcomponents/catalog/review/- Complete review system components
Utilities & Hooks
utils/hooks/useCache.ts- Custom caching hookutils/hooks/useAddress.ts- Address management hookutils/hooks/getProductReviews.ts- Product reviews fetching hook
Removed Files & Components
REST API Routes (Migrated to GraphQL)
/api/cart/addToCart/route.ts/api/cart/createGuestToken/route.ts/api/cart/mergeCart/route.ts/api/cart/removeCart/route.ts/api/cart/updateCart/route.ts/api/cart-detail/route.ts/api/checkout/paymentMethods/route.ts/api/checkout/placeOrder/route.ts/api/checkout/saveAddress/route.ts/api/checkout/saveCheckoutAddresses/route.ts/api/checkout/savePayment/route.ts/api/checkout/saveShipping/route.ts/api/checkout/shippingMethods/route.ts/api/review/route.ts
Deprecated Providers
providers/AppWrapper.tsxproviders/MainProvider.tsxproviders/ReactQueryProvider.tsxproviders/TanstackProvider.tsx
Old Folder Structure
graphql/catelog/→ Migrated tographql/catalog/(typo fixed)
Migration Guide for Developers
If You're Using REST API Endpoints
All REST API calls should now use the unified GraphQL endpoint:
Before:
POST /api/cart/addToCart
POST /api/checkout/saveAddress
POST /api/reviewAfter:
POST /api/graphql
// Send GraphQL mutationsIf You're Using Custom Providers
Update your provider imports:
Before:
import { AppWrapper, MainProvider } from '@/providers';After:
import { GlobalProviders } from '@/providers';Product Review Access
Use the new product review hooks:
import { useProductReview, getProductReviews } from '@/utils/hooks';Performance Improvements
- Optimized Loading States: Shimmer and skeleton components reduce perceived load time.
- Efficient GraphQL Queries: Fragments reduce data transfer and improve query efficiency.
- Better Caching: New
useCachehook provides improved caching mechanisms. - Responsive Design: Mobile-first approach ensures fast rendering on all devices.
Bug Fixes
- ✅ Fixed responsive layout issues across mobile devices
- ✅ Fixed product URL structure for better SEO
- ✅ Resolved authorization and storefront security issues
- ✅ Fixed typos in folder structure (
catelog→catalog) - ✅ Improved error handling with error boundaries
- ✅ Enhanced TypeScript type safety
Breaking Changes
- REST API Endpoints Deprecated: All legacy REST API endpoints have been removed. Use GraphQL API instead.
- Provider Structure Changed: Update imports if you're using custom providers.
- Folder Structure:
graphql/catelog/renamed tographql/catalog/.
v3.0.0
Release Notes: Bagisto Headless Commerce v3
This document outlines the key changes and improvements in Bagisto Headless v3 compared to the v2 codebase.
🚀 Core Technology Upgrades
| Package | v2 Version | v3 Version |
|---|---|---|
| Next.js | v15.3.x | v16.0.10 |
| React | v18.3.x | v19.2.0 |
| TypeScript | v5.6.x | v5.x |
🏗 Architectural Overhaul
1. src Directory Structure
The codebase has moved to a standard src/ directory structure to better organize application code and separate it from configuration files.
- Old:
app/,components/,lib/in root. - New:
src/app/,src/components/,src/lib/,src/graphql/.
2. Domain-Driven GraphQL Organization
GraphQL operations have been restructured from a monolithic library to a modular, domain-driven design.
- v2:
lib/bagisto/queries,lib/bagisto/mutations - v3:
src/graphql/with dedicated modules:cart/catalog/checkout/customer/theme/
3. Data Fetching Strategy
- Apollo Client: Introduced
@apollo/client(src/lib/apollo-client.ts) for robust state management and caching, replacing/augmenting the previousgraphql-requestpure fetch implementation.
⚡ Performance & Caching Enhancements
Static Generation (SG) & Incremental Static Regeneration (ISR)
- Static Generation: Implemented static generation for key pages to improve initial load performance and SEO.
- ISR Support: Added Incremental Static Regeneration capabilities, allowing pages to be updated after deployment without full rebuilds.
Cache Component
- New Component: Introduced a dedicated
CacheComponentfor fine-grained control over component-level caching strategies. - Benefits: Enables selective caching of expensive operations while maintaining dynamic content freshness.
Enhanced Cache Revalidation Logic
- Smart Revalidation: Implemented intelligent cache revalidation strategies that balance performance with data freshness.
- Time-Based & On-Demand: Support for both time-based revalidation intervals and on-demand cache purging.
- Optimized Patterns: Improved revalidation patterns for catalog, cart, and checkout data to minimize unnecessary API calls.
🛠 Developer Experience & Configuration
Configuration Files
- Type-Safe Next Config: Migrated from
next.config.jstonext.config.ts. - Modern Configs:
eslint.config.mjsandpostcss.config.mjsnow use ES modules.
Component & Provider Structure
- Providers: Global providers have been moved to
src/providers/for a cleaner entry point inlayout.tsx. - Components: Organized within
src/components/.
📦 Key Dependency Changes
- Added:
@apollo/client - Removed:
graphql-request(deprecated in favor of Apollo/Fetch) - Updated:
tailwindcss(v4)framer-motion(v12)@heroui/*packages updated to latest versions.
⚠️ Breaking Changes / Migration Notes
- App Router: Ensure all new routes are added to
src/app. - Imports: Update import paths to reference
@/src/...or relative paths correctly, as the root has changed. - Fetch Logic: Review data fetching logic to utilize the new Apollo Client hooks or the updated
graphql-fetch.tsutility.
v2.2.1
🚀 Release Notes – Version 2.2.1
We’re excited to announce the release of Bagisto Headless eCommerce Framework v2.2.1, packed with enhancment, and performance improvements to deliver a smoother and more seamless experience.
Summary
- Patch release with bug fixes (checkout stepper, sitemap, robots.txt), a performance optimization (client → server component conversion).
Highlights
- Bug fixes: checkout stepper behavior, sitemap, and robots.txt updates.
- Performance: converted a client component to a server component.
What changed
-
Fixed issue: checkout steper, sitemap, robot.txt
- Notes: fixes to checkout stepper flow and updates to sitemap and robots.txt to improve crawler behavior and SEO.
-
Optimization: converted client component to server component
- Notes: moved a component from client to server rendering to reduce client bundle size and improve SSR performance. Verify any code relying on browser-only APIs or client-side lifecycle behavior.
v2.2.0
🚀 Release Notes – Version 2.2.0 (2025-09-12)
We’re excited to announce the release of Bagisto Headless eCommerce Framework v2.2.0, packed with new features, Layout Updates, and performance improvements to deliver a smoother and more seamless experience.
✨ Added
-
Environment Variables
BAGISTO_SESSIONNEXTAUTH_URLNEXTAUTH_SECRETREVALIDATION_DURATIONIMAGE_DOMAIN
-
Features & Enhancements
- Introduced a new query field for improved data handling.
- Added Authentication Pages: Sign Up, Sign In, and Forgot Password.
- Enabled Customer Checkout for a complete shopping experience.
- Added additional home page banners to enhance UI engagement.
- Implemented Pagination and Product Attributes for better catalog navigation.
🗑️ Removed
BAGISTO_PROTOCOLBAGISTO_STOREFRONT_ACCESS_TOKENBAGISTO_REVALIDATION_SECRET
🔄 Changed
- Updated UI to match the latest design changes.
- Improved state management by migrating to Redux.
🛠️ Fixed
- Resolved multiple UI issues.
- Boosted overall performance.
- Ensured compatibility with Bagisto APIs v2.3.0.
Bagisto NextJs Commerce - v2.1.0
- Compatible with Bagisto version 2.2
- Compatible with Bagisto Headless version: 2.2
- fixed #19
Bagisto NextJs Commerce - v2
- Bagisto Commerce with NextJs 14 (App Router)
- Compatible with Bagisto 2.0
- Compatible with Bagisto Headless Extension - v2.0.1
Bagisto Next Commerce - v1
Merge pull request #15 from VikasTiwari-Webkul/main Fix: Installation/Build issues