Skip to content

Releases: bagisto/nextjs-commerce

Version v3.1.0

Choose a tag to compare

@anikeshwebkul anikeshwebkul released this 20 Mar 11:54

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/graphql endpoint 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 GlobalProviders and SessionManager for 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 endpoint
  • graphql/catalog/ - Reorganized catalog queries and mutations
  • graphql/catalog/fragments/ - Reusable GraphQL fragments

Components

  • components/error/ErrorBoundary.tsx - Error boundary component
  • components/common/LoadingSpinner.tsx - Loading spinner component
  • components/common/Shimmer.tsx - Shimmer loading component
  • components/layout/navbar/CartAndUserActions.tsx - Cart and user actions
  • components/layout/navbar/CategoriesMenu.tsx - Categories menu component
  • components/catalog/review/ - Complete review system components

Utilities & Hooks

  • utils/hooks/useCache.ts - Custom caching hook
  • utils/hooks/useAddress.ts - Address management hook
  • utils/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.tsx
  • providers/MainProvider.tsx
  • providers/ReactQueryProvider.tsx
  • providers/TanstackProvider.tsx

Old Folder Structure

  • graphql/catelog/ → Migrated to graphql/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/review

After:

POST /api/graphql
// Send GraphQL mutations

If 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 useCache hook 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 (catelogcatalog)
  • ✅ Improved error handling with error boundaries
  • ✅ Enhanced TypeScript type safety

Breaking Changes

⚠️ Important: This release includes breaking changes:

  1. REST API Endpoints Deprecated: All legacy REST API endpoints have been removed. Use GraphQL API instead.
  2. Provider Structure Changed: Update imports if you're using custom providers.
  3. Folder Structure: graphql/catelog/ renamed to graphql/catalog/.

v3.0.0

Choose a tag to compare

@anikeshwebkul anikeshwebkul released this 06 Jan 09:07

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 previous graphql-request pure 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 CacheComponent for 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.js to next.config.ts.
  • Modern Configs: eslint.config.mjs and postcss.config.mjs now use ES modules.

Component & Provider Structure

  • Providers: Global providers have been moved to src/providers/ for a cleaner entry point in layout.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.ts utility.

v2.2.1

Choose a tag to compare

@anikeshwebkul anikeshwebkul released this 02 Jan 13:19

🚀 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

Choose a tag to compare

@anikeshwebkul anikeshwebkul released this 12 Sep 07:58

🚀 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_SESSION
    • NEXTAUTH_URL
    • NEXTAUTH_SECRET
    • REVALIDATION_DURATION
    • IMAGE_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_PROTOCOL
  • BAGISTO_STOREFRONT_ACCESS_TOKEN
  • BAGISTO_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

Choose a tag to compare

@VikasTiwari-Webkul VikasTiwari-Webkul released this 25 Feb 14:31
46ff8dd
  • Compatible with Bagisto version 2.2
  • Compatible with Bagisto Headless version: 2.2
  • fixed #19

Bagisto NextJs Commerce - v2

Choose a tag to compare

@VikasTiwari-Webkul VikasTiwari-Webkul released this 06 Jun 14:54
bed1c02

Bagisto Next Commerce - v1

Choose a tag to compare

@VikasTiwari-Webkul VikasTiwari-Webkul released this 04 Apr 12:13
c95c500
Merge pull request #15 from VikasTiwari-Webkul/main

Fix: Installation/Build issues