Implemented API from Storefront, Vendor and Admin with Analytics report #15
Merged
shakibdshy merged 61 commits intomainfrom Feb 16, 2026
Merged
Implemented API from Storefront, Vendor and Admin with Analytics report #15shakibdshy merged 61 commits intomainfrom
shakibdshy merged 61 commits intomainfrom
Conversation
Use optional chaining when accessing product images array to prevent runtime errors when images is null or undefined.
- Replace mock product data with API calls for product listing and details - Add new store product types and transformation utilities - Implement React Query hooks for data fetching and caching - Update UI components to use real data with proper loading states - Add skeleton loading components for better UX - Update validators and query helpers for store-specific product queries
Implement infinite query with configurable page sizes for improved UX. Introduce new constant for pagination sizes and update default limit.
- Add store-specific category types, validators, and query hooks - Create server functions for fetching categories with proper filtering - Replace mock data with real API calls in category templates - Implement category tree building for hierarchical navigation - Connect product grid to actual product data with loading states - Add TanStack Query prefetching in route loaders for better UX
…API data - Add shared SortOption type and product sorting utilities - Create React Query hooks for store products, categories, and brands - Implement infinite scrolling with "Load More" button in product grid - Replace mock data with real API calls using server functions - Update filter sidebar to use dynamic categories and brands - Add product listing page loader for data prefetching - Enhance product card with loading states and list view variant - Update mobile filter drawer to accept dynamic filter data
- Replace mock store data with real API calls using TanStack Query - Add server functions for fetching stores with filtering, sorting, and pagination - Implement infinite scroll for store listing with intersection observer - Add query hooks and types for store shops data - Update store list component to accept props instead of using global store - Prefetch store data on route load for better performance
- Add TanStack Query prefetching in route loader for store data - Replace mock products with real API calls using shop slug - Implement loading states and error handling for store page - Transform API response to match frontend store type - Update product sorting to work with real data
- Add cart database schema with sessions and items tables - Create server functions for cart operations (add, update, remove, clear, merge) - Implement useCart hook with React Query for state management - Add optional auth middleware for guest/user cart sessions - Update UI components to use server-side cart instead of local storage - Add cart validators and helper functions for data fetching - Integrate cart functionality across product cards, collection, and cart pages - Maintain optimistic updates and loading states for better UX
- Create database schema and validators for customer addresses - Implement server functions for CRUD operations with authentication - Add address book UI with real-time data fetching and mutations - Enhance entity form dialog with scrollable content support - Update profile page to use session data and auth middleware - Add address type support (billing/shipping) with default address handling
- Create wishlist database schema with user and product relations - Implement server functions for wishlist CRUD operations with auth - Add client-side hooks for wishlist state management with TanStack Query - Integrate wishlist toggle in product details page - Replace mock data with real wishlist data in account page - Add auth middleware to wishlist route
Add database schema, API endpoints, and UI components for shipping methods management in vendor dashboard. Includes: - Shipping schema with relations to shops - CRUD server functions with validation and authorization - React hooks for data fetching and mutations using TanStack Query - Reusable UI components (table, form, header) following entity pattern - Shipping page integration with shop navigation - Support for pagination, filtering, and sorting
… flow - Add product-shipping method relations to enable product-specific shipping restrictions - Implement shipping method validation for cart items based on product restrictions - Enhance checkout UI with address management, shipping method selection, and order summary - Update cart store to support shipping address and dynamic shipping methods - Add street field to shipping address validation and form - Refactor shipping table variable names for consistency
- Add handlers in wishlist-list to call cart and wishlist mutations - Pass handlers and loading states to wishlist-item-card - Show loading spinners on buttons during async operations - Update Stripe documentation formatting (minor visual fixes)
- Add order, payment, notification, and email delivery schemas - Implement Stripe Connect for vendor payment onboarding and dashboard - Create checkout flow with Stripe Elements payment integration - Add vendor settings page for managing Stripe Connect status - Extend user and vendor schemas with order-related fields - Add order notification system for vendors - Implement order summary with coupon support in checkout
- Add order tracking page with timeline visualization - Implement invoice download functionality with Stripe integration - Update order confirmation page to support multiple orders - Add tracking data type definitions and search validation - Integrate invoice download button in order details
- Add product reviews schema with order item verification - Create user review management page with edit/delete functionality - Implement product review display with sorting and helpful voting - Add store reviews section to storefront pages - Enable review eligibility checking for verified purchases - Add review form with order item selection for verified customers - Update product page to use real review data instead of mock - Add review-related hooks and server functions
Storefront api
Add .agents to .gitignore to exclude agent-related files from version control.
Add .agents to .gitignore to exclude agent-related files from version control.
Use optional chaining when accessing product images array to prevent runtime errors when images is null or undefined.
- Replace mock product data with API calls for product listing and details - Add new store product types and transformation utilities - Implement React Query hooks for data fetching and caching - Update UI components to use real data with proper loading states - Add skeleton loading components for better UX - Update validators and query helpers for store-specific product queries
Implement infinite query with configurable page sizes for improved UX. Introduce new constant for pagination sizes and update default limit.
- Add store-specific category types, validators, and query hooks - Create server functions for fetching categories with proper filtering - Replace mock data with real API calls in category templates - Implement category tree building for hierarchical navigation - Connect product grid to actual product data with loading states - Add TanStack Query prefetching in route loaders for better UX
…API data - Add shared SortOption type and product sorting utilities - Create React Query hooks for store products, categories, and brands - Implement infinite scrolling with "Load More" button in product grid - Replace mock data with real API calls using server functions - Update filter sidebar to use dynamic categories and brands - Add product listing page loader for data prefetching - Enhance product card with loading states and list view variant - Update mobile filter drawer to accept dynamic filter data
- Replace mock store data with real API calls using TanStack Query - Add server functions for fetching stores with filtering, sorting, and pagination - Implement infinite scroll for store listing with intersection observer - Add query hooks and types for store shops data - Update store list component to accept props instead of using global store - Prefetch store data on route load for better performance
- Add TanStack Query prefetching in route loader for store data - Replace mock products with real API calls using shop slug - Implement loading states and error handling for store page - Transform API response to match frontend store type - Update product sorting to work with real data
- Add cart database schema with sessions and items tables - Create server functions for cart operations (add, update, remove, clear, merge) - Implement useCart hook with React Query for state management - Add optional auth middleware for guest/user cart sessions - Update UI components to use server-side cart instead of local storage - Add cart validators and helper functions for data fetching - Integrate cart functionality across product cards, collection, and cart pages - Maintain optimistic updates and loading states for better UX
- Create database schema and validators for customer addresses - Implement server functions for CRUD operations with authentication - Add address book UI with real-time data fetching and mutations - Enhance entity form dialog with scrollable content support - Update profile page to use session data and auth middleware - Add address type support (billing/shipping) with default address handling
- Create wishlist database schema with user and product relations - Implement server functions for wishlist CRUD operations with auth - Add client-side hooks for wishlist state management with TanStack Query - Integrate wishlist toggle in product details page - Replace mock data with real wishlist data in account page - Add auth middleware to wishlist route
Add database schema, API endpoints, and UI components for shipping methods management in vendor dashboard. Includes: - Shipping schema with relations to shops - CRUD server functions with validation and authorization - React hooks for data fetching and mutations using TanStack Query - Reusable UI components (table, form, header) following entity pattern - Shipping page integration with shop navigation - Support for pagination, filtering, and sorting
Add .agents to .gitignore to exclude agent-related files from version control.
- Add vendor transaction types and server functions for fetching transactions and stats - Create vendor-specific transaction table component with filtering and sorting - Replace mock data with real server-side paginated data in transactions page - Add transaction stats cards showing earnings, fees, and transaction counts - Implement utility function for currency formatting
- Add vendor order types, hooks, and server functions for fetching and updating orders - Create vendor-specific order table component with server-side pagination and filtering - Implement vendor order details page with status updates and invoice download - Add order statistics dashboard showing order counts and revenue metrics - Integrate authentication and shop access control for vendor order operations
- Add useShopDashboard hook with React Query for fetching aggregated dashboard data - Create server function getShopDashboardData with parallel database queries - Add dashboard utility functions for formatting currency, percentages, and dates - Update dashboard components (SalesOverview, RecentOrders, TopProducts, CustomerInsights) to use real data - Replace placeholder stats with calculated metrics from database - Remove simulated loader and use proper suspense with skeleton
Dashboard, Orders and Transactions
- Add store-specific category types, validators, and query hooks - Create server functions for fetching categories with proper filtering - Replace mock data with real API calls in category templates - Implement category tree building for hierarchical navigation - Connect product grid to actual product data with loading states - Add TanStack Query prefetching in route loaders for better UX
- Move VENDOR_STATUS_OPTIONS to shared constants file for reusability - Create admin-specific entity fetchers with ADMIN_STATUS_OPTIONS - Add admin category query schemas and types for server-side filtering - Refactor AdminCategoryTable to use server-side pagination and filtering - Implement useAdminCategories hook with React Query for state management - Add admin category server functions with proper authorization middleware - Replace mock data with real API calls in admin categories page - Add delete confirmation dialog and mutation state handling
- Add server fetcher for admin brands with filtering, sorting, and pagination - Replace client-side mock data with server-side data fetching - Integrate React Query mutations for brand toggle/delete operations - Add confirmation dialog for brand deletion - Update components to use server-side pagination pattern consistent with categories
…rations Add server functions and hooks for admin attribute management with full CRUD capabilities. Introduce server-side pagination, filtering, and sorting through createAdminAttributesFetcher. Replace client-side mock data with real database operations including toggleActive, update, and delete mutations with proper validation and error handling. Enhance AttributeTable to support both admin and shop contexts with improved loading states through AdminAttributeMutationState.
- Add server-side data fetching support to AdminCouponTable with new fetcher prop - Create use-admin-coupons hook with React Query mutations for toggle/delete - Implement createAdminCouponsFetcher for standardized data fetching - Add admin coupon server functions with filtering, sorting, and pagination - Update admin coupons page to use real mutations with loading states - Replace mock data with server-driven DataTable implementation
- Replace mock data with server-side fetching for admin orders list - Implement admin order details page with status update functionality - Add comprehensive order statistics dashboard with revenue metrics - Create reusable admin order hooks and server functions - Extend vendor order components to support admin mode - Add route for admin order details view
- Add admin product queries with enhanced filtering (stock, status, attributes) - Create admin product server functions for fetching, updating status, toggling featured, and deleting - Implement admin products hook with React Query for state management - Replace mock data with real data fetching in admin products page - Add product table component with edit/delete actions and loading states - Integrate confirmation dialog for product deletion
- Replace mock data with server functions and React Query hooks - Add delete review functionality with confirmation dialog - Refactor review table columns into separate module - Update review status terminology from "published" to "approved" - Add admin review stats and detailed view capabilities
- Replace mock data with server-side fetching using React Query hooks - Add admin-specific API endpoints and query hooks for tags, taxes, and transactions - Implement proper pagination, filtering, and sorting for admin tables - Add transaction statistics dashboard with revenue metrics - Update table components to support admin context and dynamic data - Extend type definitions to support admin-specific data structures
…cs components - Add admin dashboard template with stats cards, charts, and data tables - Create reusable dashboard components (stats cards, revenue chart, order status chart, etc.) - Implement data fetching hooks using React Query for real-time analytics - Add server functions to fetch dashboard statistics from database - Include utility functions for date calculations and dashboard helpers - Define TypeScript interfaces for dashboard data types - Replace placeholder dashboard with full-featured analytics interface
- Create notification types, validators, and database helper functions - Implement React Query hooks for fetching and mutating notifications - Add server functions for CRUD operations with shop access control - Integrate notification dropdown into vendor header with unread badges - Create dedicated notifications page with filtering and bulk actions - Set up automatic order notification backfilling for existing orders
- Replace mock tenants with server-side data fetching using React Query - Add admin shop API functions with proper validation and error handling - Integrate server-side pagination, sorting, and filtering in tenant table - Add tenant detail page with real data from API - Extend shop types and validators for admin functionality - Add monthlyRevenue field to normalized shop interface
Add dropdown menu with "Approve" and "Reject" actions to update tenant status directly from the table. Replace simple "View Details" button with a more comprehensive action menu that shows loading states during updates. - Use DropdownMenu component to organize tenant actions - Add status update functionality with visual feedback (spinner during updates) - Conditionally show Approve/Reject options based on current tenant status - Maintain existing "View Details" link within dropdown - Utilize useAdminShops hook for status update operations
- Add universal seed script that seeds all major entities (vendors, shops, products, etc.) - Add seed data generator script that creates comprehensive JSON data - Update package.json script to use new universal seeding system - New system supports 10 shops, 50 products with related entities and relationships
…ibutes, brands, and shops Implement parallel database queries using Promise.all to fetch product counts alongside existing relation data, eliminating sequential round trips. This improves performance for batch operations in category, attribute, brand, and shop queries. - Add product count queries to batchFetchCategoryRelations, batchFetchAttributeRelations, and batchFetchBrandRelations - Implement getProductCountsForShops helper and integrate into shop state fetching - Update attribute deletion to fetch actual product count in parallel with attribute lookup - Remove placeholder TODO comments and enable previously commented-out product count logic
- Add minRating filter to product query options and validation - Implement rating filter in product query helper - Update sort mapping to support sorting by averageRating - Include rating filter in product filters hook - Refactor getStoreProducts to use destructured data object
- Extend tenant and shop types with commission and Stripe fields - Add commission tab to tenant admin with rate editing capability - Enhance shop data fetching with real order statistics and customer counts - Improve Stripe webhook to handle payment intent success and account updates - Add Stripe Connect status display to admin tenant interface
Add a link to the store page from the product card to improve navigation and product context. The link uses the store's slug and name, and includes a store icon for visual clarity.
Move StoreReviewResponse type import to centralized review types file Add optional chaining to customer properties in order table to prevent errors
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedToo many files! This PR contains 299 files, which is 149 over the limit of 150. You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by CodeRabbit
Release Notes
New Features
Improvements
Bug Fixes