Skip to content

feat/n1 - #197

Merged
BleedingDev merged 301 commits into
masterfrom
feat/n1
Jan 21, 2026
Merged

feat/n1#197
BleedingDev merged 301 commits into
masterfrom
feat/n1

Conversation

@KaiUweCZE

Copy link
Copy Markdown
Collaborator

No description provided.

@semanticdiff-com

semanticdiff-com Bot commented Dec 9, 2025

Copy link
Copy Markdown

Review changes with  SemanticDiff

@vercel

vercel Bot commented Dec 9, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
new-engine-ui-storybook Ready Ready Preview, Comment Jan 21, 2026 2:38pm

@coderabbitai

coderabbitai Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

123 files out of 273 files are above the max files limit of 150.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/n1

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mesa-dot-dev

mesa-dot-dev Bot commented Dec 9, 2025

Copy link
Copy Markdown

Mesa Description

TL;DR

This pull request introduces a brand new n1 e-commerce application, built with Next.js 16 and React 19, powered by a Medusa backend. It includes a complete storefront with product listings, dynamic category and product detail pages, comprehensive checkout flow, and user account management, alongside robust error handling, analytics integration, and a dedicated design system.

What changed?

  • New n1 Application Creation:
    • Added the apps/n1 directory as a new Next.js 16 application with React 19, including core configurations for Next.js, TypeScript, PostCSS, and pnpm dependencies.
    • Introduced a detailed CLAUDE.md documentation file outlining development rules, tech stack, and best practices.
    • Configured netlify.toml for Netlify deployment and updated .env.example with new environment variables for Medusa, analytics, and other services.
  • Design System and Styling:
    • Implemented a new design token system within apps/n1/src/tokens, including semantic, layout, spacing, typography, and component-specific CSS variables, and overrides.
    • Added a validate-token-usage.mjs script to enforce consistent design token usage in components.
    • Introduced extract-colors.js and extracted-colors.json for automated color extraction.
  • Core Layout and Global Components:
    • Established the root layout.tsx for the application, integrating global CSS, Open_Sans font, metadata, analytics providers (MetaPixel, GoogleTag, LeadhubPixel), N1Header, and N1Footer.
    • Created global error.tsx, loading.tsx, and not-found.tsx components for consistent user feedback.
    • Added PageviewTracker and AnalyticsProvider for centralized analytics tracking.
  • Homepage and Static Pages:
    • Developed the main page.tsx (Home component) displaying carousels, feature blocks, and product grids with Suspense for data loading.
    • Introduced a (static) route group with pages for Contacts, News, Terms and Conditions, Privacy Policy, Shipping Methods, and Payment Methods.
  • Dynamic Product and Category Pages:
    • Implemented dynamic routing for /kategorie/[handle] and /produkt/[handle], including dedicated page.tsx, loading.tsx, error.tsx, and not-found.tsx components for each.
    • Developed comprehensive product detail components (ProductInfoPanel, Gallery, ProductTabs, RelatedProducts, AddToCartSection, ProductVariantSelect, DeliveryDate, StoreStatus, etc.).
    • Created ProductGrid and TopSales components for displaying product listings.
  • Checkout Flow (/pokladna):
    • Designed a multi-step checkout process under /pokladna, managed by CheckoutProvider and CheckoutContent.
    • Developed components for address forms, address pickers, cart item display, order summary, shipping method selection (including PplPickupDialog and PplWidget), and payment method selection.
  • User Account Management (/ucet):
    • Implemented a full user account section under /ucet, including login, registration, and account profile pages.
    • Developed components for AccountMenu, ProfileForm, AddressList, and OrderList (with desktop and mobile views, and loading/empty/error states).
    • Created dynamic order detail pages (/ucet/objednavky/[id]) for viewing specific order information.
  • Data Management and Services:
    • Introduced a Medusa client (medusa-client.ts) and various services (auth-service.ts, cart-service.ts, customer-service.ts, order-service.ts, product-service.ts) for interacting with the backend API.
    • Implemented an extensive suite of @tanstack/react-query hooks (use-auth.ts, use-cart.ts, use-orders.ts, use-product.ts, use-products.ts, use-addresses.ts, use-checkout.ts, use-login.ts, use-logout.ts, use-register.ts, use-customer.ts, prefetching hooks, etc.) for efficient data fetching, caching, and state management.
    • Centralized query keys (query-keys.ts), cache configurations (cache-config.ts), and prefetch behaviors (prefetch-config.ts).
  • Utility Functions:
    • Added numerous utility functions for address handling and validation, cart management, debouncing, date/number/order status formatting, array manipulation, breadcrumb building, producer data parsing, payment method management, and text truncation.
    • Introduced custom error classes and error handling utilities.
    • Developed specialized loggers for cache, component, fetch, and prefetch operations.
  • UI Library Integration:
    • Leveraged components from @techsio/ui-kit (e.g., Carousel, Dialog, Accordion, Button, Table, Select, Input, Tooltip) across the application for consistent UI elements.
    • Updated libs/ui/tsconfig.json to support the Next.js environment.

Description generated by Mesa. Update settings

Comment thread apps/n1/src/app/pokladna/_components/shipping-address-section.tsx Fixed
Comment thread apps/n1/src/components/category/top-sales.tsx Fixed
Comment thread apps/n1/src/hooks/use-customer.ts Fixed

@mesa-dot-dev mesa-dot-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Performed full review of d6abf8a...93d3af3

Analysis

  1. Critical Security Vulnerability: Hardcoded production credentials in API routes (particularly in apps/n1/src/app/api/feed/products/route.ts), including a hardcoded Zerops URL for MEDUSA_API_URL and an empty string fallback for MEDUSA_API_KEY, potentially exposing internal services.

  2. PII Data Exposure: Customer emails are directly logged to the console in production code (apps/n1/src/app/orders/[orderId]/page.tsx), exposing personally identifiable information in client-side logs.

  3. Registration Flow Race Condition: The auth service creates orphaned accounts when customer creation fails, as it doesn't properly clean up the auth identity, permanently blocking the email address from future registrations.

  4. Analytics Tracking Issues: Current implementation allows for duplicate tracking events when users navigate away and return to order pages, potentially inflating analytics numbers significantly.

  5. JWT Security Concerns: Unsafe JWT parsing using atob() without proper validation in apps/n1/src/lib/token-utils.ts, creating potential exceptions particularly in SSR contexts.

Tip

Help

Slash Commands:

  • /review - Request a full code review
  • /review latest - Review only changes since the last review
  • /describe - Generate PR description. This will update the PR body or issue comment depending on your configuration
  • /help - Get help with Mesa commands and configuration options

212 files reviewed | 0 comments | Edit Agent SettingsRead Docs

Category page ([category]/page.tsx):
- Integrate usePrefetchCategoryChildren for progressive loading
- Add breadcrumb navigation with home icon
- Auto-expand TreeView to current category

Aside navigation (n1-aside.tsx):
- Refactor to use findNodeById utility
- Add getCategoryPath for auto-expand
- Cleanup inline tree traversal logic

Desktop submenu (desktop-submenu.tsx):
- Add hover-triggered prefetch for category products
- Improve submenu interaction with Dialog component

Product grid (product-grid.tsx):
- Add memo optimization for large product lists
- Improve pagination rendering

Heading component (heading.tsx):
- Add capitalize prop for consistent title formatting
Introduce client-side prefetching and detail fetching for products to
improve perceived load times and reuse cached results.

- Add usePrefetchProduct hook to prefetch product detail by handle,
  with delayed prefetch and cancelation support. It uses react-query's
  prefetchQuery and respects region/country context. Logs cache hits
  and prefetch attempts in development.
- Add useProduct hook that fetches a single product by handle using a
  dedicated query key and long stale/gc times (semi-static).
- Add getProductByHandle service to fetch detailed product data (variants,
  prices, options, inventory) and surface errors with dev logging.
- Extend query-keys with a products.detail key to uniquely identify
  product detail queries by handle, region and country.
- Define ProductDetailParams and a DETAILED_INFO constant in the
  product service for consistent field selection.

These changes enable targeted caching and background loading of product
details, reducing latency when users navigate to product pages.
Comment thread apps/n1/src/hooks/use-addresses.ts Fixed
Comment thread apps/n1/src/hooks/use-addresses.ts Fixed
Comment thread apps/n1/src/hooks/use-addresses.ts Fixed
Comment thread apps/n1/src/hooks/use-addresses.ts Fixed
Comment thread apps/n1/src/hooks/use-cart.ts Fixed
Comment thread apps/n1/src/hooks/use-cart.ts Fixed
Comment thread apps/n1/src/app/(static)/novinky/page.tsx Outdated
Comment thread apps/n1/src/app/pokladna/_components/address-picker.tsx Outdated
Comment thread apps/n1/src/app/pokladna/_components/shipping-method-section.tsx
Comment thread apps/n1/src/app/pokladna/_components/shipping-method-section.tsx Outdated
Comment thread apps/n1/src/app/ucet/profil/_components/orders/index.ts Outdated
Comment thread apps/n1/src/components/address/address-form.tsx Outdated
Comment thread apps/n1/src/components/address/address-form.tsx Outdated
Comment thread apps/n1/src/components/header/cart-item.tsx
selected?: boolean
}

export const LinkButtonWithTooltip = ({

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: How often do use this combo? Is it worth the abstraction into separate component?

@BleedingDev
BleedingDev merged commit e323916 into master Jan 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants