Skip to content
/ ZAYQ Public

A premium, Apple-inspired e-commerce storefront for ZAYQ. Features a minimalist UI, feature-based architecture, and a high-conversion WhatsApp ordering flow.

Notifications You must be signed in to change notification settings

BeyteFlow/ZAYQ

Repository files navigation

ZAYQ

A high-performance, component-based frontend for modern product catalogs and e-commerce platforms.

Build Status License Dependencies Last Commit

πŸ“– Table of Contents

⭐ Overview

ZAYQ provides a fast, modern foundation for building product-centric web applications, offering advanced state management and intuitive user interfaces out-of-the-box for e-commerce platforms and digital catalogs.

The Problem

Modern storefronts and product catalogs require complex state management, highly interactive components (like filtering and sorting), and seamless integration with backend services. Building these elements from scratch is time-consuming, often resulting in fragmented codebases and inconsistent user experiences. Developers need a reliable, modular system to handle the specifics of product display, searching, and navigation without reinventing core UI patterns.

The Solution

ZAYQ addresses these challenges by offering a robust, Component-based Architecture built entirely with React and TypeScript, enhanced by Zustand for predictable, centralized product state management. It provides pre-built, production-ready componentsβ€”including ProductGrid, ProductToolbar, and specialized pages like ProductsPageβ€”allowing developers to rapidly deploy and scale their product catalog interfaces with minimal effort and maximum performance. This focus on modularity and type safety ensures the resulting application is highly maintainable and responsive.

Architecture Overview

The application is structured around a sophisticated Component-based Architecture implemented with React, ensuring modularity, reusability, and strong separation of concerns across all features (e.g., Home, Shop, About, Contact). Data flow and state persistence are handled by Zustand and TanStack Query, providing a foundation for a high-performance user experience, while Firebase integration boilerplate allows for flexible backend connectivity. The entire system is built and optimized using Vite and deployed via Vercel.

✨ Key Features

ZAYQ is designed to offer a superior user experience and simplified development workflow for managing product data interfaces:

  • πŸ” Advanced Product Discovery: Intuitive interface components like the integrated SearchBar and SortSelect (found within the ProductToolbar) enable end-users to quickly locate and organize products based on specific criteria. This significantly enhances the product discovery and filtering process.
  • ⚑ High-Performance State Management: Leveraging Zustand for centralized, global state via the product.store.ts, the application ensures rapid data updates and minimizes component re-renders. This results in a snappy, responsive feel, especially when dealing with complex filters or large catalogs.
  • 🧱 Modular & Reusable Component Library: Core layout and functionality piecesβ€”such as ProductGrid, ProductCard, ProductFilters, and dedicated ProductsPageβ€”are built as isolated React components. This structure simplifies development, promotes customization, and guarantees visual and functional consistency across the entire application.
  • πŸ“¦ Seamless Backend Connectivity: Built-in boilerplate (src/lib/firebase.ts) allows for easy, initial integration with a Firebase backend. This setup facilitates scalable data storage and efficient retrieval of product information, supporting rapid prototyping of full-stack product apps.
  • πŸ“š Clear Navigation and Layout: The system includes professionally structured layout components (Navbar, Footer) and specialized navigation tools, such as Pagination.tsx, designed to handle navigation within large product catalogs efficiently, greatly improving the user journey flow and reducing load times.
  • πŸ›‘οΈ Enhanced Code Quality with TypeScript: The entire codebase is written in TypeScript and validated using Zod for schema validation. This commitment to strict typing drastically reduces runtime errors and provides robust data integrity assurance for all product models.

πŸ› οΈ Tech Stack & Architecture

This project is built using modern, industry-leading technologies to ensure high performance, maintainability, and scalability.

Technology Purpose Why it was Chosen
Frontend Framework React (v19) The industry-standard library for building robust, scalable, and highly interactive user interfaces using a component-based paradigm.
Primary Language TypeScript (TS) Provides strong typing throughout the codebase, drastically improving code quality, reducing runtime errors, and enhancing maintainability across a complex component hierarchy.
State Management Zustand A fast, light, and scalable state management solution that provides predictable and centralized state (product.store.ts) for complex product features like filtering and search.
Styling/Design Tailwind CSS / @tailwindcss/vite Utility-first CSS framework enabling rapid UI development and ensuring a highly customizable, modern design system with minimal overhead.
Data Fetching TanStack Query Powerful asynchronous state management (caching, synchronization, and deduplication) specifically for handling complex product data fetching from APIs or Firebase.
Routing React Router DOM The preferred, declarative routing solution, managing client-side navigation between key feature pages (Home, Shop, Product Detail).
Build Tool Vite A next-generation frontend toolchain offering extremely fast development server startup and optimized, production-ready builds.
Database Integration Firebase Provides foundational support (src/lib/firebase.ts) for integrating with Google's Firebase services, which is often used for fast, scalable, real-time backend data storage.
Deployment Vercel Optimized platform for deploying modern web applications, facilitating instantaneous global deployment and streamlined continuous integration via vercel.json.
Schema Validation Zod TypeScript-first schema validation library used for defining and validating data structures, ensuring data integrity for API responses and internal product data models.

πŸ“ Project Structure

This project adopts a Feature-Driven component-based architecture, promoting strict modularity by grouping related components, hooks, and services under specific feature directories (e.g., features/products, features/home).

πŸ“‚ BeyteFlow-ZAYQ-7960d6d/
β”œβ”€β”€ πŸ“„ .gitignore                 # Files and directories ignored by Git
β”œβ”€β”€ πŸ“„ eslint.config.js           # Configuration for ESLint static analysis
β”œβ”€β”€ πŸ“„ index.html                 # Main entry point for the application
β”œβ”€β”€ πŸ“„ package.json               # Project dependencies and npm scripts
β”œβ”€β”€ πŸ“„ package-lock.json          # Dependency lock file
β”œβ”€β”€ πŸ“„ README.md                  # Project documentation (this file)
β”œβ”€β”€ πŸ“„ tsconfig.app.json          # TypeScript configuration for the application build
β”œβ”€β”€ πŸ“„ tsconfig.json              # Base TypeScript configuration
β”œβ”€β”€ πŸ“„ tsconfig.node.json         # TypeScript configuration for Node environment tasks (e.g., Vite config)
β”œβ”€β”€ πŸ“„ vercel.json                # Configuration file for Vercel deployment settings
β”œβ”€β”€ πŸ“„ vite.config.ts             # Configuration for the Vite build tool
β”œβ”€β”€ πŸ“‚ .github/                   # GitHub configuration files
β”‚   └── πŸ“‚ workflows/             # GitHub Actions workflows
β”‚       └── πŸ“„ ci.yml             # Continuous Integration pipeline definition
β”œβ”€β”€ πŸ“‚ public/                    # Static assets
β”‚   └── πŸ“„ vite.svg               # Vite logo asset
└── πŸ“‚ src/                       # Application source code
    β”œβ”€β”€ πŸ“„ App.tsx                # Main application router and context provider component
    β”œβ”€β”€ πŸ“„ index.css              # Global styles sheet
    β”œβ”€β”€ πŸ“„ main.tsx               # Primary entry point (initializes React rendering)
    β”œβ”€β”€ πŸ“‚ assets/                # Static assets used within components
    β”‚   └── πŸ“„ react.svg          # React logo asset
    β”œβ”€β”€ πŸ“‚ components/            # Reusable UI components
    β”‚   β”œβ”€β”€ πŸ“‚ layout/            # Layout components (structure)
    β”‚   β”‚   β”œβ”€β”€ πŸ“„ Footer.tsx     # Site-wide footer component
    β”‚   β”‚   └── πŸ“„ Navbar.tsx     # Site-wide navigation bar component
    β”‚   └── πŸ“‚ ui/                # Generic, lower-level UI elements (e.g., Buttons, Inputs)
    β”‚       └── πŸ“„ .gitkeep
    β”œβ”€β”€ πŸ“‚ features/              # Feature-specific components and logic organized by user flow
    β”‚   β”œβ”€β”€ πŸ“‚ about/             # About page feature
    β”‚   β”‚   └── πŸ“„ About.tsx      # The About page component
    β”‚   β”œβ”€β”€ πŸ“‚ contact/           # Contact page feature
    β”‚   β”‚   └── πŸ“„ Contact.tsx    # The Contact page component
    β”‚   β”œβ”€β”€ πŸ“‚ home/              # Homepage feature
    β”‚   β”‚   β”œβ”€β”€ πŸ“„ Homepage.tsx   # The main application landing page
    β”‚   β”‚   β”œβ”€β”€ πŸ“‚ components/    # Components specific to the homepage layout
    β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ CasesSection.tsx
    β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ ComingSoonSection.tsx
    β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ HeroSection.tsx
    β”‚   β”‚   β”‚   └── πŸ“„ TaglineSection.tsx
    β”‚   β”‚   β”œβ”€β”€ πŸ“‚ hooks/
    β”‚   β”‚   β”‚   └── πŸ“„ .gitkeep
    β”‚   β”‚   └── πŸ“‚ services/
    β”‚   β”‚       └── πŸ“„ .gitkeep
    β”‚   β”œβ”€β”€ πŸ“‚ ProductDetail/     # Individual product detail view feature
    β”‚   β”‚   β”œβ”€β”€ πŸ“‚ hooks/
    β”‚   β”‚   β”‚   └── πŸ“„ useProductDetail.ts # Custom hook for fetching and managing product data
    β”‚   β”‚   └── πŸ“‚ types/
    β”‚   β”‚       └── πŸ“„ index.ts
    β”‚   β”œβ”€β”€ πŸ“‚ products/          # Core product listing, filtering, and management features
    β”‚   β”‚   β”œβ”€β”€ πŸ“‚ components/
    β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ Page/
    β”‚   β”‚   β”‚   β”‚   └── πŸ“„ ProductsPage.tsx  # The main product listing view
    β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ Pagination/
    β”‚   β”‚   β”‚   β”‚   └── πŸ“„ Pagination.tsx    # Component for navigating large product lists
    β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ ProductFilters/
    β”‚   β”‚   β”‚   β”‚   └── πŸ“„ ProductFilters.tsx # Filtering interface (e.g., price, category)
    β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ ProductGrid/
    β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ ProductCard.tsx   # Individual product representation component
    β”‚   β”‚   β”‚   β”‚   └── πŸ“„ ProductGrid.tsx   # Layout component for displaying multiple products
    β”‚   β”‚   β”‚   └── πŸ“‚ ProductToolbar/       # Controls for product interaction (Search/Sort)
    β”‚   β”‚   β”‚       β”œβ”€β”€ πŸ“„ ProductToolbar.tsx
    β”‚   β”‚   β”‚       β”œβ”€β”€ πŸ“„ SearchBar.tsx
    β”‚   β”‚   β”‚       └── πŸ“„ SortSelect.tsx    # Component for sorting products (e.g., price, name)
    β”‚   β”‚   β”œβ”€β”€ πŸ“‚ hooks/
    β”‚   β”‚   β”‚   └── πŸ“„ .gitkeep
    β”‚   β”‚   β”œβ”€β”€ πŸ“‚ services/
    β”‚   β”‚   β”‚   └── πŸ“„ .gitkeep
    β”‚   β”‚   └── πŸ“‚ types/
    β”‚   β”‚       └── πŸ“„ .gitkeep
    β”‚   └── πŸ“‚ shop/
    β”‚       └── πŸ“„ .gitkeep
    β”œβ”€β”€ πŸ“‚ hooks/
    β”‚   └── πŸ“„ .gitkeep
    β”œβ”€β”€ πŸ“‚ lib/                   # External library configurations and initializations
    β”‚   └── πŸ“„ firebase.ts        # Initialization and configuration file for Firebase SDK
    β”œβ”€β”€ πŸ“‚ pages/
    β”‚   └── πŸ“„ .gitkeep
    β”œβ”€β”€ πŸ“‚ store/                 # Global application state management (Zustand)
    β”‚   └── πŸ“„ product.store.ts   # Dedicated store for product data and catalog state
    β”œβ”€β”€ πŸ“‚ styles/
    β”‚   └── πŸ“„ .gitkeep
    └── πŸ“‚ utils/                 # General utility functions
        └── πŸ“„ .gitkeep

πŸš€ Getting Started

Follow these steps to set up the ZAYQ development environment locally.

Prerequisites

Ensure you have the necessary environment for running a modern TypeScript-based React application:

  • Node.js: (A recent stable version is recommended)
  • npm: Node Package Manager (comes bundled with Node.js)
  • TypeScript: The codebase is fully written in TypeScript (v5.x).

Installation

Clone the repository and install the required dependencies using npm.

  1. Clone the repository:

    git clone [repository-url] BeyteFlow-ZAYQ-7960d6d
    cd BeyteFlow-ZAYQ-7960d6d
  2. Install dependencies:

    npm install
  3. Configure Environment (Optional but Recommended):

    The project includes src/lib/firebase.ts. If you plan to connect the application to a live backend service or database to fetch product data, ensure this file is configured with your specific Firebase project credentials following the official SDK documentation.

Development Scripts

The package.json file defines several convenient scripts for local development, building, and code quality maintenance:

Script Command Description
dev vite Starts the local development server (using Vite) with hot module replacement (HMR). This is the primary command for local development.
build tsc -b && vite build Runs TypeScript compilation (tsc -b) to check for type errors and then performs a highly optimized production build of all assets using Vite. The output is placed in the dist directory.
lint eslint . Executes ESLint across the entire project to enforce strict code standards, identify potential bugs, and ensure consistency.
preview vite preview Locally serves the optimized production build (dist directory) for final pre-deployment testing and performance review.

πŸ”§ Usage

ZAYQ is designed as an interactive user interface (web_app) for displaying product catalogs and running on a modern web browser.

Starting the Application

To launch the application in development mode:

npm run dev

This command initiates the Vite server, which handles compiling the TypeScript and JSX files. Once started, navigate to the URL provided in the console (typically http://localhost:5173) to view the application, including the Homepage, ProductsPage, and the various product components.

Feature Navigation

The application exposes several feature components ready for use:

  • Product Listings: Accessible via the logic routing to ProductsPage.tsx, displaying products using ProductGrid and controllable by ProductToolbar elements (SearchBar, SortSelect).
  • Product Details: Individual product pages are managed by feature logic utilizing the useProductDetail.ts hook for specific data fetching.
  • Layout: Consistent navigation is provided by the Navbar.tsx and Footer.tsx components.

Production Build and Deployment

For preparing the application for deployment (e.g., to Vercel), execute the build script:

npm run build

The compiled and optimized files will be located in the dist/ directory, ready to be hosted as static assets. The inclusion of vercel.json provides out-of-the-box configuration for seamless continuous deployment on the Vercel platform.

🀝 Contributing

We welcome contributions to improve ZAYQ! Your input helps make this project better for everyone, especially in enhancing the core product catalog features and performance.

How to Contribute

  1. Fork the repository - Click the 'Fork' button at the top right of this page.
  2. Create a feature branch
    git checkout -b feature/amazing-product-feature
  3. Make your changes - Improve code, documentation, or product features (e.g., enhancing ProductToolbar or optimizing product.store.ts).
  4. Test thoroughly - Ensure all functionality works as expected. Run type checks and linting before submitting:
    npm run lint
    npm run build # To verify successful type compilation
  5. Commit your changes - Write clear, descriptive commit messages.
    git commit -m 'Feat: Improved filtering logic in ProductFilters component for performance'
  6. Push to your branch
    git push origin feature/amazing-product-feature
  7. Open a Pull Request - Submit your changes for review against the main branch.

Development Guidelines

  • βœ… Follow the existing Component-based Architecture and strict TypeScript conventions.
  • πŸ“ Add comments, particularly for complex state logic within Zustand stores or data handling hooks.
  • πŸ“š Update documentation (including component READMEs or props documentation) for any changed functionality.
  • πŸ”„ Ensure backward compatibility when modifying core features like routing or Firebase connections.
  • 🎯 Keep commits focused and atomic, addressing a single feature or bug fix per PR.

Ideas for Contributions

We're actively seeking help with:

  • πŸ› Bug Fixes: Report and fix display bugs within the UI components (e.g., in ProductGrid or ProductCard).
  • ✨ New Features: Implement advanced features, such as multi-layered filtering in ProductFilters or persistent shopping cart state.
  • πŸ“– Documentation: Improve component documentation and usage examples for easier onboarding.
  • 🎨 UI/UX: Enhance the visual appeal and usability of core product interaction components (SearchBar, Pagination).
  • ⚑ Performance: Optimize data fetching using TanStack Query or streamline state computations in the product.store.ts.
  • β™Ώ Accessibility: Make the product list and detail pages fully accessible according to WCAG standards.

Code Review Process

  • All submissions require review by maintainers before merging.
  • Maintainers will provide constructive feedback focused on type safety, component design, and performance implications.
  • Changes may be requested before final approval.
  • Once approved, your PR will be merged and you'll be credited for your contribution.

Questions?

Feel free to open an issue for any questions or concerns regarding the product architecture or specific component usage. We're here to help!

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for complete details.

What this means:

  • βœ… Commercial use: You can use this project commercially (e.g., as the foundation for a paid e-commerce frontend).
  • βœ… Modification: You can modify the code to fit your specific product catalog needs and build upon the existing architecture.
  • βœ… Distribution: You can distribute this software.
  • βœ… Private use: You can use this project privately for internal applications.
  • ⚠️ Liability: The software is provided "as is," without warranty of any kind.
  • ⚠️ Trademark: This license does not grant trademark rights.

Made with ❀️ by the ZAYQ Team

⬆️ Back to Top

About

A premium, Apple-inspired e-commerce storefront for ZAYQ. Features a minimalist UI, feature-based architecture, and a high-conversion WhatsApp ordering flow.

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages