ZooperCart is a feature-rich e-commerce mobile application built using React Native and Expo, styled with NativeWind (TailwindCSS). It provides a seamless shopping experience, offering features like cart management, product browsing, and order tracking, along with future enhancements like payment integration and real-time order tracking with Google Maps.
- Features
- Screens
- Technologies Used
- Installation and Setup
- Folder Structure
- State Management
- APIs Used
- Future Enhancements
- Contributing
- License
- Dynamic Routes: Each product has its own detailed page for better user experience.
- Zustand for Cart Management: Efficient cart handling with functionality to:
- Add items to the cart.
- Update item quantities.
- Remove items when the quantity reaches zero.
- Order Tracking: A dedicated page for users to track their orders.
- E-Wallet: Integrated into the app for managing user spending and adding cards.
- Responsive Design: Optimized for various screen sizes.
To maintain performance, animations have been kept minimal and focused on improving user interaction.
-
Home Screen
- Displays a list of products.
- Products have discount labels and are horizontally scrollable.
-
Product Details
- Displays product-specific information such as title, price, and ratings.
- Includes "Add to Cart" functionality with a toggleable counter for quantity.
-
Cart Screen
- Displays items added to the cart.
- Allows users to update quantities or remove items.
- Shows subtotal and checkout options.
-
E-Wallet
- Tracks spending on the app.
- Allows users to save and manage cards.
-
Order Tracking
- A simple and intuitive page for tracking the status of user orders.
- React Native: Cross-platform mobile app framework.
- Expo: For rapid development and deployment.
- NativeWind: TailwindCSS for styling React Native components.
- Zustand: Lightweight state management for handling cart operations.
- Placeholder APIs (to be replaced with a custom backend for production).
- Node.js (v14 or higher)
- Expo CLI
- Git
- Clone the repository:
git clone https://github.com/your-username/zoopercart.git cd zoopercart
- Install dependencies:
npm install
- Start the development server:
npx expo start
- Open the app on your device:
- Use the Expo Go app to scan the QR code displayed in your terminal.
ZooperCart/
├── components/
│ ├── Counter.js
│ ├── CartItem.js
│ └── ProductCard.js
├── context/
│ └── useCartStore.js
├── screens/
│ ├── HomeScreen.js
│ ├── ProductScreen.js
│ ├── CartScreen.js
│ ├── WalletScreen.js
│ └── OrderTrackingScreen.js
├── assets/
│ ├── images/
│ └── icons/
├── utils/
│ └── helpers.js
├── App.js
└── package.json
ZooperCart uses Zustand for efficient state management, particularly for handling the cart.
const useCartStore = create((set) => ({
carts: [],
addToCart: (product) => set((state) => ({
carts: [...state.carts, { ...product, quantity: 1 }],
})),
increaseQuantity: (id) => set((state) => ({
carts: state.carts.map((item) =>
item.id === id ? { ...item, quantity: item.quantity + 1 } : item
),
})),
decreaseQuantity: (id) => set((state) => ({
carts: state.carts
.map((item) =>
item.id === id ? { ...item, quantity: item.quantity - 1 } : item
)
.filter((item) => item.quantity > 0),
})),
removeFromCart: (id) => set((state) => ({
carts: state.carts.filter((item) => item.id !== id),
})),
}));
- Products API: Fetches product data.
- Order API: Used for tracking orders.
- Wallet API: Manages user spending and card details.
-
Backend Development
- Replace placeholder APIs with a fully functional backend.
- Develop an admin panel for managing orders and inventory.
-
Order Tracking with Google Maps
- Integrate Google Maps to provide real-time tracking of orders.
-
Stripe Payment Integration
- Add secure payment functionality using Stripe.
-
Enhanced Animations
- Include smooth, GPU-optimized animations without compromising app performance.
Contributions are welcome! Please fork the repository, make your changes, and submit a pull request. Ensure your code follows the existing coding conventions and includes appropriate documentation.
ZooperCart is open-source software licensed under the MIT License created with 💖 by kartik saxena.