Skip to content

RohitRaj766/Nector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Nectar - Online Grocery Delivery Platform

A modern, full-featured grocery delivery web application built with Next.js 16, TypeScript, Tailwind CSS v4, Zustand, and Zod. Features a complete e-commerce experience with authentication, product browsing, shopping cart, and order management.

πŸš€ Features

Authentication & Onboarding

  • Splash Screen - Initial loading screen with smooth transitions
  • Onboarding - Welcome screen with brand introduction
  • Phone Number Authentication - OTP-based verification with country selector
  • Email/Password Login - Traditional authentication flow
  • Social Login - Google and Facebook integration (simulated)
  • User Registration - Complete sign-up with validation

Shopping Experience

  • Home Page - Featured products, categories, and deals
  • Product Catalog - Browse products by category
  • Product Details - Detailed product pages with images, descriptions, and reviews
  • Search & Filter - Find products quickly
  • Favorites - Save favorite products for quick access
  • Shopping Cart - Add, remove, and manage cart items
  • Quantity Management - Increment/decrement product quantities

Order Management

  • Checkout Flow - Delivery and payment method selection
  • Payment Gateway - Simulated payment processing
  • Order Success - Confirmation page with order tracking
  • Order Failure - Error handling with retry options

User Features

  • Account Management - User profile and settings
  • Location Selection - Choose delivery zone and area
  • Order History - Track past orders

UI/UX Features

  • Responsive Design - Mobile-first, desktop-optimized
  • Cursor Pointer - All interactive elements have proper cursor styling
  • Loading States - Smooth loading indicators
  • Toast Notifications - User feedback with react-hot-toast
  • Form Validation - Real-time validation with Zod schemas
  • Accessibility - ARIA labels and keyboard navigation support

πŸ› οΈ Tech Stack

  • Framework: Next.js 16.1.1 (App Router)
  • Language: TypeScript 5 (Strict Mode)
  • Styling: Tailwind CSS v4
  • State Management: Zustand 5.0.9
  • Form Validation: Zod 4.3.5 + React Hook Form 7.70.0
  • Notifications: React Hot Toast 2.6.0
  • Fonts: Custom Gilroy font family (Light & ExtraBold)
  • No UI Libraries: Pure Tailwind CSS implementation

πŸ“‹ Prerequisites

  • Node.js 18+
  • npm or yarn

πŸƒ Getting Started

  1. Install dependencies

    npm install
  2. Run development server

    npm run dev
  3. Open your browser Navigate to http://localhost:3000

  4. Build for production

    npm run build
    npm start

πŸ“ Project Structure

β”œβ”€β”€ app/                          # Next.js App Router pages
β”‚   β”œβ”€β”€ account/                  # User account page
β”‚   β”œβ”€β”€ cart/                     # Shopping cart page
β”‚   β”œβ”€β”€ explore/                  # Product exploration page
β”‚   β”œβ”€β”€ favorites/                # Favorite products page
β”‚   β”œβ”€β”€ home/                     # Home page with products
β”‚   β”œβ”€β”€ location/                  # Location selection
β”‚   β”œβ”€β”€ login/                    # Email/password login
β”‚   β”œβ”€β”€ onboarding/               # Welcome/onboarding screen
β”‚   β”œβ”€β”€ order-failure/            # Order failure page
β”‚   β”œβ”€β”€ order-success/            # Order success confirmation
β”‚   β”œβ”€β”€ otp/                      # OTP verification
β”‚   β”œβ”€β”€ payment-gateway/           # Payment processing
β”‚   β”œβ”€β”€ phone-number/              # Phone number input
β”‚   β”œβ”€β”€ product/[id]/             # Dynamic product detail page
β”‚   β”œβ”€β”€ sign-in/                  # Sign in with phone/social
β”‚   β”œβ”€β”€ sign-up/                  # User registration
β”‚   β”œβ”€β”€ splash/                   # Splash screen
β”‚   β”œβ”€β”€ layout.tsx                # Root layout with SEO metadata
β”‚   β”œβ”€β”€ page.tsx                  # Root page (redirects to splash)
β”‚   └── globals.css               # Global styles and theme
β”œβ”€β”€ components/                   # Reusable components
β”‚   β”œβ”€β”€ icons/                    # Icon components
β”‚   β”‚   └── NavigationIcons.tsx
β”‚   β”œβ”€β”€ layout/                   # Layout components
β”‚   β”‚   β”œβ”€β”€ BottomNav.tsx         # Mobile bottom navigation
β”‚   β”‚   β”œβ”€β”€ DesktopNav.tsx        # Desktop navigation
β”‚   β”‚   └── Navbar.tsx            # Main navbar
β”‚   β”œβ”€β”€ shop/                     # Shopping components
β”‚   β”‚   β”œβ”€β”€ CategoryCard.tsx      # Category display card
β”‚   β”‚   └── ProductCard.tsx       # Product display card
β”‚   └── ui/                       # UI components
β”‚       β”œβ”€β”€ Button.tsx            # Primary button component
β”‚       β”œβ”€β”€ CountrySelector.tsx   # Country selection dropdown
β”‚       β”œβ”€β”€ Input.tsx             # Form input component
β”‚       β”œβ”€β”€ NumericKeypad.tsx     # Numeric keypad for OTP
β”‚       β”œβ”€β”€ OTPInput.tsx          # OTP input component
β”‚       β”œβ”€β”€ QuantityButton.tsx    # Quantity increment/decrement
β”‚       β”œβ”€β”€ Select.tsx            # Select dropdown component
β”‚       └── Skeleton.tsx          # Loading skeleton component
β”œβ”€β”€ store/                        # Zustand state stores
β”‚   β”œβ”€β”€ authStore.ts              # Authentication state
β”‚   β”œβ”€β”€ cartStore.ts              # Shopping cart state
β”‚   β”œβ”€β”€ locationStore.ts          # Location state
β”‚   β”œβ”€β”€ otpStore.ts               # OTP verification state
β”‚   └── productStore.ts           # Product state
β”œβ”€β”€ data/                         # Static data
β”‚   └── products.ts               # Product data
β”œβ”€β”€ lib/                          # Utility functions
β”‚   └── zod-schemas.ts            # Zod validation schemas
β”œβ”€β”€ types/                        # TypeScript type definitions
β”‚   └── index.ts
└── public/                       # Static assets
    └── assets/                   # Images and icons

🎨 Design System

  • Primary Color: #53B175 (Green) - Used for buttons, links, and accents
  • Typography:
    • Gilroy Light (300) - Body text
    • Gilroy ExtraBold (800) - Headings
  • Border Radius: rounded-2xl (16px) for inputs and buttons
  • Spacing: Consistent Tailwind spacing scale
  • Interactive Elements: All buttons have cursor: pointer for better UX
  • Color Palette:
    • Background: White (#ffffff)
    • Text Primary: Dark gray (#171717)
    • Gray Scale: 50-900 for various UI elements

βœ… Features Implemented

Authentication & User Flow

  • βœ… Splash screen with auto-redirect
  • βœ… Onboarding/Welcome screen
  • βœ… Phone number validation (Bangladesh format: +880)
  • βœ… OTP input with 4-digit code verification
  • βœ… Email validation with live feedback
  • βœ… Password visibility toggle
  • βœ… Social login simulation (Google & Facebook)
  • βœ… Location selection with zones and areas
  • βœ… User registration with comprehensive validation

Shopping Features

  • βœ… Product catalog with categories
  • βœ… Product detail pages
  • βœ… Shopping cart functionality
  • βœ… Add to favorites
  • βœ… Quantity management
  • βœ… Search and filter products
  • βœ… Checkout flow
  • βœ… Payment gateway simulation
  • βœ… Order success/failure pages

Technical Features

  • βœ… Form validation with Zod schemas
  • βœ… TypeScript strict mode (no any types)
  • βœ… Zustand state management with persistence
  • βœ… Responsive design (mobile-first, desktop-optimized)
  • βœ… SEO optimization with metadata
  • βœ… Cursor pointer on all interactive elements
  • βœ… Loading states and error handling
  • βœ… Toast notifications for user feedback

πŸ” User Flows

Primary Authentication Flow

  1. Splash Screen β†’ Shows for 2 seconds, then redirects
  2. Onboarding β†’ Welcome screen with "Get Started" button
  3. Sign In β†’ Choose phone number or social login
  4. Phone Number β†’ Enter mobile number (+880 format)
  5. OTP Verification β†’ Enter 4-digit code
  6. Location Selection β†’ Select zone and area
  7. Home β†’ Main shopping application

Alternative Flows

  • Login β†’ Direct email/password login
  • Sign Up β†’ Create new account with validation
  • Guest Mode β†’ Browse products without authentication

Shopping Flow

  1. Home/Explore β†’ Browse products and categories
  2. Product Details β†’ View product information
  3. Add to Cart β†’ Add products with quantity
  4. Cart β†’ Review items and proceed to checkout
  5. Checkout β†’ Select delivery and payment methods
  6. Payment β†’ Process payment (simulated)
  7. Order Confirmation β†’ View order success/failure

πŸ“ Important Notes

Development & Demo

  • All authentication is simulated (no backend required)
  • OTP accepts any 4-digit code for demo purposes
  • Social login simulates API calls with loading delays
  • Location data is mocked with predefined zones and areas
  • Payment processing is simulated for demonstration
  • State persists in localStorage using Zustand persist middleware

Code Quality

  • TypeScript Strict Mode: All types are properly defined
  • No any types: Full type safety throughout the application
  • Component-based: Reusable, modular components
  • Form Validation: Client-side validation with Zod
  • Error Handling: Comprehensive error states and user feedback

Performance

  • Image Optimization: Next.js Image component for optimized loading
  • Font Optimization: Local fonts with proper loading strategies
  • Code Splitting: Automatic with Next.js App Router
  • SEO Optimized: Metadata and Open Graph tags included

πŸš€ Deployment

This project is deployed on:

  • Vercel (Recommended for Next.js) - One-click deployment

Build Commands

npm run build    # Build for production
npm run dev      # Start production server

About

Nectar - Online Grocery Delivery Platform A modern, full-featured grocery delivery web application built with Next.js 16, TypeScript, Tailwind CSS v4, Zustand, and Zod. Features a complete e-commerce experience with authentication, product browsing, shopping cart, and order management.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages