Skip to content

nxr-dine/shop-app

Repository files navigation

ShopApp - Advanced React Native E-commerce Application

ShopApp Banner

A comprehensive, feature-rich e-commerce mobile application built with React Native, Redux, and TypeScript. This application demonstrates advanced mobile development concepts including complex navigation, state management, authentication flows, theming, and more.

✨ Features

User Experience

  • Onboarding Flow: Smooth introduction for first-time users
  • Authentication: Complete login, registration, and password recovery
  • Product Browsing: Categories, featured products, new arrivals, and best sellers
  • Product Details: Comprehensive product information with variants (colors, sizes)
  • Shopping Cart: Add, remove, and update quantities with persistent storage
  • Checkout Process: Multi-step checkout with address and payment selection
  • Order Management: View order history and track current orders
  • User Profile: Edit profile information, manage addresses and payment methods
  • Theme Support: Dynamic light and dark mode with system preference detection

Technical Features

  • Advanced Navigation: Nested stack and tab navigation
  • State Management: Redux Toolkit for global state, Context API for specific features
  • Form Handling: Formik with Yup validation
  • API Integration: Axios with interceptors for token management
  • Data Persistence: AsyncStorage and Redux Persist
  • Animations: React Native Reanimated for smooth UI interactions
  • Toast Notifications: Custom toast system for user feedback
  • Theming System: Dynamic theme switching with persistence

πŸ› οΈ Technical Architecture

State Management

  • Redux Toolkit: Global state management for products, categories, wishlist, orders, and addresses
  • Context API: Theme, authentication, and cart management
  • AsyncStorage: Persistent storage for user preferences and authentication tokens

Navigation

  • React Navigation 6: Latest navigation library with native stack and bottom tabs
  • Navigation Structure:
    • Authentication flow (Login, Register, Forgot Password)
    • Main app flow with bottom tabs (Home, Explore, Cart, Profile)
    • Nested stack navigators for each tab section

Styling and UI

  • Dynamic Theming: Complete light and dark mode support
  • Responsive Design: Adapts to different screen sizes
  • Custom Components: Reusable UI components for consistent design

πŸ“± Screenshots

Onboarding Screen Login Screen Home Screen Product Details Shopping Cart Checkout Process User Profile Dark Mode

πŸš€ Getting Started

Prerequisites

Installation

  1. Clone the repository: ```bash git clone https://github.com/nxr-deen/shop-app.git cd shopapp ```

  2. Install dependencies: ```bash npm install

or

yarn install ```

  1. Start the development server: ```bash npx expo start

or

yarn expo start ```

  1. Run on a device or emulator:
    • Scan the QR code with the Expo Go app on your phone
    • Press 'a' to run on an Android emulator
    • Press 'i' to run on an iOS simulator

Environment Setup

Create a .env file in the root directory with the following variables: ``` API_URL=https://your-api-url.com ```

πŸ“‚ Project Structure

``` shopapp/ β”œβ”€β”€ App.tsx # Main application component β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ components/ # Reusable UI components β”‚ β”œβ”€β”€ contexts/ # React Context providers β”‚ β”‚ β”œβ”€β”€ AuthContext.tsx β”‚ β”‚ β”œβ”€β”€ CartContext.tsx β”‚ β”‚ └── ThemeContext.tsx β”‚ β”œβ”€β”€ navigation/ # Navigation configuration β”‚ β”‚ β”œβ”€β”€ RootNavigator.tsx β”‚ β”‚ β”œβ”€β”€ AuthNavigator.tsx β”‚ β”‚ β”œβ”€β”€ MainNavigator.tsx β”‚ β”‚ └── stacks/ # Stack navigators for each section β”‚ β”œβ”€β”€ screens/ # Application screens β”‚ β”‚ β”œβ”€β”€ auth/ # Authentication screens β”‚ β”‚ β”œβ”€β”€ main/ # Main app screens β”‚ β”‚ β”œβ”€β”€ SplashScreen.tsx β”‚ β”‚ └── OnboardingScreen.tsx β”‚ β”œβ”€β”€ services/ # API and other services β”‚ β”‚ └── api.ts β”‚ β”œβ”€β”€ store/ # Redux store configuration β”‚ β”‚ β”œβ”€β”€ index.ts β”‚ β”‚ └── slices/ # Redux slices β”‚ β”œβ”€β”€ theme/ # Theme definitions β”‚ β”‚ └── index.ts β”‚ └── types/ # TypeScript type definitions β”‚ └── index.ts β”œβ”€β”€ assets/ # Images, fonts, etc. β”œβ”€β”€ app.json # Expo configuration └── package.json # Project dependencies ```

πŸ”„ State Management

Redux Store Structure

  • Products Slice: Manages product data, featured items, new arrivals, and best sellers
  • Categories Slice: Manages category data
  • Wishlist Slice: Manages user's wishlist items
  • Orders Slice: Manages order history and current orders
  • Addresses Slice: Manages user's saved addresses

Context API Usage

  • AuthContext: Manages user authentication state and methods
  • ThemeContext: Manages theme preferences and switching
  • CartContext: Manages shopping cart state and operations

πŸ§ͺ Testing

Running Tests

```bash npm test

or

yarn test ```

πŸ“¦ Building for Production

Expo Build

```bash expo build:android

or

expo build:ios ```

EAS Build (Recommended)

```bash eas build --platform android

or

eas build --platform ios ```

🀝 Contributing

  1. Fork the Project
  2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
  3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
  4. Push to the Branch (`git push origin feature/AmazingFeature`)
  5. Open a Pull Request

πŸ“ License

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

πŸ™ Acknowledgments

πŸ“ž Contact

Your Name - @yourtwitter - email@example.com

Project Link: https://github.com/yourusername/shopapp ```

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors