Skip to content

salmanazamdev/nanbites-food-delivery-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

199 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ• NanBites Food Delivery App

A comprehensive full-stack food delivery mobile application built with React Native CLI, featuring modern UI/UX, real-time tracking, secure payments, and seamless user experience.

๐Ÿ“ฑ Features

๐Ÿ” Authentication & Onboarding

  • Google OAuth integration
  • Email/Password authentication
  • Fingerprint authentication
  • Multi-step onboarding flow
  • Profile management with photo uploads

๐Ÿ  Core Food Delivery Features

  • Browse restaurants and menus
  • Advanced search and filtering
  • Real-time order tracking with Mapbox
  • Multiple payment options via Stripe
  • Order history and favorites

๐Ÿ“ฑ Enhanced Mobile Features

  • Push notifications for order updates
  • QR code scanner for restaurant promos
  • Photo uploads for reviews and profiles
  • Offline mode support
  • Dark/Light theme toggle

๐Ÿ’ณ Payment & Security

  • Stripe payment integration
  • Secure card storage
  • Multiple payment methods
  • Order receipt generation

๐Ÿ—บ๏ธ Location Services

  • Real-time GPS tracking
  • Delivery route optimization
  • Restaurant location mapping
  • Address management

๐Ÿ› ๏ธ Tech Stack

Frontend

  • React Native CLI - Native mobile development
  • TypeScript - Type safety and better development experience
  • React Navigation v6 - Navigation and routing
  • Redux Toolkit - State management
  • React Hook Form - Form handling
  • Reanimated 3 - Smooth animations

Backend & Services

  • Supabase - Backend as a Service
    • PostgreSQL Database
    • Real-time subscriptions
    • Authentication
    • File storage
    • Database migrations
  • Stripe - Payment processing
  • Mapbox - Maps and location services
  • Firebase Cloud Messaging - Push notifications

๐Ÿ—๏ธ Project Structure

src/
โ”œโ”€โ”€ components/           # Reusable UI components
โ”‚   โ”œโ”€โ”€ common/          # Generic components (Button, Input, etc.)
โ”‚   โ”œโ”€โ”€ forms/           # Form-specific components
โ”‚   โ””โ”€โ”€ ui/              # UI-specific components
โ”œโ”€โ”€ screens/             # Screen components
โ”‚   โ”œโ”€โ”€ auth/            # Authentication screens
โ”‚   โ”œโ”€โ”€ onboarding/      # Onboarding flow
โ”‚   โ”œโ”€โ”€ home/            # Home and main screens
โ”‚   โ”œโ”€โ”€ restaurant/      # Restaurant related screens
โ”‚   โ”œโ”€โ”€ order/           # Order management screens
โ”‚   โ””โ”€โ”€ profile/         # User profile screens
โ”œโ”€โ”€ navigation/          # Navigation configuration
โ”‚   โ”œโ”€โ”€ AuthNavigator.tsx
โ”‚   โ”œโ”€โ”€ AppNavigator.tsx
โ”‚   โ””โ”€โ”€ TabNavigator.tsx
โ”œโ”€โ”€ services/            # API and external services
โ”‚   โ”œโ”€โ”€ api/             # API calls and endpoints
โ”‚   โ”œโ”€โ”€ auth/            # Authentication services
โ”‚   โ”œโ”€โ”€ storage/         # Local storage utilities
โ”‚   โ””โ”€โ”€ notifications/   # Push notification setup
โ”œโ”€โ”€ store/               # Redux store configuration
โ”‚   โ”œโ”€โ”€ slices/          # Redux slices
โ”‚   โ””โ”€โ”€ index.ts         # Store setup
โ”œโ”€โ”€ utils/               # Utility functions
โ”‚   โ”œโ”€โ”€ constants/       # App constants
โ”‚   โ”œโ”€โ”€ helpers/         # Helper functions
โ”‚   โ””โ”€โ”€ validation/      # Form validation schemas
โ”œโ”€โ”€ hooks/               # Custom React hooks
โ”œโ”€โ”€ context/             # React Context providers
โ”œโ”€โ”€ types/               # TypeScript type definitions
โ”œโ”€โ”€ assets/              # Images, fonts, and static files
โ”‚   โ”œโ”€โ”€ images/
โ”‚   โ”œโ”€โ”€ icons/
โ”‚   โ””โ”€โ”€ fonts/
โ””โ”€โ”€ supabase/            # Database migrations and configuration
    โ”œโ”€โ”€ migrations/      # Database migration files
    โ”œโ”€โ”€ config.toml      # Supabase configuration
    โ””โ”€โ”€ seed.sql         # Database seed data

๐Ÿš€ Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • React Native CLI
  • Android Studio / Xcode
  • Supabase CLI (for database management)
  • Docker Desktop (for local database development)
  • Supabase account
  • Stripe account
  • Mapbox account

Installation

  1. Clone the repository

    git clone https://github.com/salmanazamdev/nanbites-food-delivery-app.git
    cd nanbites-food-delivery-app
  2. Install dependencies

    npm install
    # or
    yarn install
  3. Install Supabase CLI

    # Windows (using Scoop)
    scoop bucket add supabase https://github.com/supabase/scoop-bucket.git
    scoop install supabase
    
    # macOS
    brew install supabase/tap/supabase
    
    # Alternative: Use npx for each command
    npx supabase --version
  4. iOS Setup (if developing for iOS)

    cd ios && pod install && cd ..
  5. Database Setup

    # Login to Supabase
    supabase login
    
    # Link to the project (replace with your project ref)
    supabase link --project-ref your-project-ref
    
    # Pull latest database schema
    supabase db pull
  6. Environment Configuration

    cp .env.example .env

    en.example are just to understand the logic

    Fill in your environment variables:

    # Supabase
    SUPABASE_URL=your_supabase_url
    SUPABASE_ANON_KEY=your_supabase_anon_key
    
    # Stripe
    STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
    
    # Mapbox
    MAPBOX_ACCESS_TOKEN=your_mapbox_token
    
    # Google OAuth
    GOOGLE_CLIENT_ID=your_google_client_id
  7. Run the application

    # Start Metro bundler
    npx react-native start
    
    # Run on Android
    npx react-native run-android
    
    # Run on iOS
    npx react-native run-ios

๐Ÿ—„๏ธ Database Management

Migration Commands

# Create a new migration
supabase migration new migration_name

# Apply migrations to remote database
supabase db push

# Check migration status
supabase migration list

# Reset local database (development only)
supabase db reset

Common Migration Issues

If you encounter "migration history mismatch" errors:

# Repair migration history
supabase migration repair --status applied MIGRATION_ID

# Then pull the schema
supabase db pull

Note: The global npm install method (npm install -g supabase) is deprecated as of 2025. Use platform-specific installation methods above.

๐Ÿ“Š Database Schema (Supabase)

Key Tables

  • users - User profiles and authentication
  • restaurants - Restaurant information and details
  • menu_items - Food items and pricing
  • orders - Order management and tracking
  • order_items - Individual items in orders
  • reviews - User reviews and ratings
  • addresses - User delivery addresses
  • payments - Payment transaction records

All schema changes are version-controlled through migration files in supabase/migrations/.

๐ŸŽจ Design System

Color Palette

  • Primary: Orange (#FF6B35)
  • Secondary: Dark Blue (#2D3748)
  • Success: Green (#48BB78)
  • Warning: Yellow (#ED8936)
  • Error: Red (#E53E3E)
  • Background: Light Gray (#F7FAFC)

Typography

  • Primary Font: Inter
  • Headings: Bold weights (600-800)
  • Body Text: Regular (400) and Medium (500)

๐Ÿ”ง Key Integrations

Authentication Flow

// Google OAuth + Supabase Auth
// Email/Password with email verification
// Secure token management

Payment Integration

// Stripe payment processing
// Card tokenization
// Secure payment flow

Real-time Features

// Supabase real-time subscriptions
// Live order tracking
// Push notifications

๐Ÿ“ฑ Screens Overview

Authentication Flow

  1. Splash Screen - App loading with branding
  2. Onboarding - 3-step feature introduction
  3. Login/Signup - Multiple authentication options
  4. Email Verification - Account confirmation

Main Application

  1. Home - Restaurant discovery and featured items
  2. Search - Advanced filtering and search
  3. Restaurant Detail - Menu browsing and customization
  4. Cart - Order review and modification
  5. Checkout - Payment and delivery details
  6. Order Tracking - Real-time delivery tracking
  7. Profile - User settings and order history

๐Ÿงช Testing

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Run E2E tests
npm run test:e2e

๐Ÿ“ฆ Build & Deployment

Development Build

# Android
npx react-native run-android --variant=debug

# iOS
npx react-native run-ios --configuration Debug

Production Build

# Android
cd android && ./gradlew assembleRelease

# iOS
# Use Xcode for production builds

๐Ÿค Contributing

Development Workflow

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. If making database changes, create migrations:
    supabase migration new feature_amazing_feature
  4. Test your changes locally:
    supabase db reset  # Reset local DB with migrations
  5. Commit your changes (git commit -m 'Add some amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Database Changes

  • Never edit existing migration files - create new ones
  • Test migrations locally before pushing
  • Include both schema and data changes in migration files
  • Add rollback instructions in migration comments when possible

๐Ÿ‘จโ€๐Ÿ’ป Author

Salman Azam

๐Ÿ™ Acknowledgments

  • Built during internship program
  • Inspired by modern food delivery applications
  • Special thanks to mentors and the development team

๐Ÿ”ฎ Roadmap

Phase 1 (Current) - Core Features โœ…

  • Authentication system
  • Basic food ordering
  • Payment integration
  • Map integration
  • Database migrations setup

Phase 2 - Enhanced Features ๐Ÿšง

  • Real-time chat with delivery partners
  • Advanced analytics dashboard
  • Loyalty program integration
  • Multi-language support

Phase 3 - Advanced Features ๐Ÿ“‹

  • AI-powered food recommendations
  • Voice ordering capabilities
  • Augmented reality menu previews
  • Social features and food sharing

Made with โค๏ธ using React Native & Supabase

About

Complete food delivery mobile app built with React Native CLI, featuring Supabase backend, Stripe payments, real-time tracking, Google OAuth, push notifications, and modern UI/UX design.

Topics

Resources

Stars

Watchers

Forks

Contributors