Skip to content

shiv989898/E-Commerce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›οΈ E-Commerce Product Listing App (React Native + Expo Router)

This is a modern mobile e-commerce product listing application built using React Native, Expo Router, and TypeScript. Features a sleek dark theme with red accents, persistent data storage, and a polished user experience.


πŸ“² Features

Core Functionality

  • βœ… Product listing from FakeStore API with modern grid layout
  • βœ… Dedicated product details screen with portrait orientation lock
  • βœ… Persistent wishlist using AsyncStorage with context provider
  • βœ… Full cart functionality with quantity controls and persistent storage
  • βœ… Dynamic tab badges showing cart and wishlist item counts
  • βœ… Advanced search with real-time filtering
  • βœ… Swipe navigation between tabs with gesture recognition

UI/UX Enhancements

  • βœ… Dark theme with black background and red (#e50914) accent colors
  • βœ… Modern bottom-sheet filter modal (category, rating, price sorting)
  • βœ… Gradient hero section with integrated search bar
  • βœ… Skeleton loading states for smooth user experience
  • βœ… Reusable UI components (AppButton, ProductCard, FilterModal)
  • βœ… Vertical content centering on product details screen
  • βœ… Custom back button with proper navigation
  • βœ… Intuitive swipe gestures with visual feedback and haptic response
  • βœ… Tab position indicators and edge swipe boundaries
  • βœ… First-time user tutorial for swipe navigation discovery

Technical Features

  • βœ… File-based routing with Expo Router
  • βœ… Context API for state management (Cart & Wishlist)
  • βœ… TypeScript for type safety
  • βœ… Screen orientation control
  • βœ… AsyncStorage for data persistence
  • βœ… Component-based architecture

πŸ”§ Tech Stack

  • React Native - Mobile app framework
  • Expo + Expo Router - Development platform and navigation
  • TypeScript - Type-safe JavaScript
  • AsyncStorage - Local data persistence
  • Context API - State management
  • expo-linear-gradient - Gradient backgrounds
  • expo-screen-orientation - Orientation control
  • @react-native-picker/picker - Filter dropdowns
  • react-native-gesture-handler - Swipe gesture detection
  • react-native-reanimated - Smooth animations
  • expo-haptics - Tactile feedback for gestures
  • FakeStore API - Product data source

πŸš€ Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn
  • Expo CLI (npm install -g @expo/cli)
  • iOS Simulator / Android Emulator or physical device

Installation & Setup

  1. Clone the repository

    git clone https://github.com/shiv989898/E-Commerce
    cd E-Commerce
  2. Install dependencies

    npm install
  3. Start the development server

    npx expo start
  4. Run on device/simulator

    • Press i for iOS Simulator
    • Press a for Android Emulator
    • Scan QR code with Expo Go app on physical device

🎯 API Integration

  • Data Source: FakeStore API
  • Endpoints Used:
    • GET /products - Fetch all products with filtering support
    • GET /products/{id} - Fetch single product details
    • GET /products/categories - Fetch categories for filter options

πŸ“ Project Structure

E-Commerce/
β”œβ”€β”€ πŸ“± app/                          # App routing and screens
β”‚   β”œβ”€β”€ _layout.tsx                  # Root layout with navigation config
β”‚   β”œβ”€β”€ +not-found.tsx               # 404 error screen
β”‚   β”œβ”€β”€ (tabs)/                      # Tab navigation group
β”‚   β”‚   β”œβ”€β”€ _layout.tsx              # Tab layout with providers and badges
β”‚   β”‚   β”œβ”€β”€ index.tsx                # Home screen with product grid
β”‚   β”‚   β”œβ”€β”€ Cart.tsx                 # Shopping cart screen
β”‚   β”‚   β”œβ”€β”€ wishlist.tsx             # Wishlist screen
β”‚   β”‚   └── explore.tsx              # Explore/discovery screen
β”‚   └── details/
β”‚       └── [id].tsx                 # Dynamic product details screen
β”œβ”€β”€ 🎨 components/                   # Reusable UI components
β”‚   β”œβ”€β”€ ProductCard.tsx              # Product grid item component
β”‚   β”œβ”€β”€ ProductDetails.tsx           # Product detail view component
β”‚   β”œβ”€β”€ ui/                          # Modern UI components
β”‚   β”‚   β”œβ”€β”€ AppButton.tsx            # Reusable button with variants
β”‚   β”‚   └── FilterModal.tsx          # Bottom-sheet filter modal
β”‚   └── Themed*.tsx                  # Theme-aware components
β”œβ”€β”€ 🎯 context/                      # State management
β”‚   β”œβ”€β”€ CartContext.tsx              # Persistent cart state with AsyncStorage
β”‚   └── WishlistContext.tsx          # Persistent wishlist state with AsyncStorage
β”œβ”€β”€ 🎨 constants/
β”‚   └── Colors.ts                    # Dark theme color tokens
β”œβ”€β”€ πŸ”§ hooks/                        # Custom React hooks
└── πŸ“¦ assets/                       # Static assets (images, fonts)

πŸ’‘ Key Features & Implementation

πŸ‘† Swipe Navigation System

  • Gesture-Based Navigation: Swipe left/right anywhere on screen to navigate between tabs
  • Tab Order: Home β†’ Wishlist β†’ Cart β†’ Explore (bidirectional)
  • Smart Thresholds: 25% screen width swipe or high velocity triggers navigation
  • Visual Feedback: Edge indicators, color tints, and position dots
  • Haptic Response: Tactile feedback on successful navigation
  • First-Time Tutorial: Animated guide for new users (shown once)
  • Smooth Animations: Spring-based transitions with proper damping

Dark Theme with Red Accents

  • Consistent black (#000000) background across all screens
  • Red (#e50914) accent color for interactive elements
  • Centralized color system in constants/Colors.ts

Persistent Data Storage

  • Wishlist: AsyncStorage with Context API for persistent favorites
  • Cart: AsyncStorage with quantity management and persistent shopping cart
  • State Sync: Real-time synchronization between storage and UI

Modern UI Components

  • FilterModal: Bottom-sheet style modal with category, rating, and price sorting
  • AppButton: Reusable button component with primary/secondary variants
  • ProductCard: Optimized grid layout with wishlist toggle and add-to-cart
  • Dynamic Badges: Tab navigation with real-time cart and wishlist counts

Navigation & UX

  • File-based routing with Expo Router for clean navigation
  • Portrait orientation lock on product details screen
  • Vertical content centering for optimal viewing
  • Custom back navigation with proper screen transitions

πŸ› οΈ Technical Highlights

  • TypeScript: Full type safety throughout the application
  • Context API: Global state management without external libraries
  • AsyncStorage: Persistent data storage for cart and wishlist
  • Component Architecture: Modular, reusable UI components
  • Performance: Optimized rendering with proper state management
  • Error Handling: Graceful error states and loading indicators

πŸ“Έ Screenshots

WhatsApp Image 2025-04-05 at 01 12 54_2c17086a WhatsApp Image 2025-04-05 at 01 12 55_9efff02c WhatsApp Image 2025-04-05 at 01 12 54_4e4b9b4a WhatsApp Image 2025-04-05 at 01 12 54_b621d12c


πŸ™‹β€β™‚οΈ Author

Shiv Goyal
πŸ“§ shivgoyal9988@gmail.com
πŸ”— GitHub Profile


About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors