Skip to content

SaketKothari/easybusyhub-webapp

Repository files navigation

πŸ›’ EasyBusyHub

A modern, full-stack e-commerce web application built with Next.js

🌐 Live Demo β€’ πŸ“Ή Video Demo

Next.js React Tailwind Firebase Stripe


πŸ“– About

EasyBusyHub is a fully responsive e-commerce platform that replicates the core functionality of major online shopping websites. Built from scratch with modern web technologies, it features secure authentication, real-time data persistence, and seamless payment processing.

✨ Key Features

πŸ›οΈ Shopping Experience

  • Product Catalog - Browse products from Fake Store API
  • Shopping Cart - Add/remove items with real-time updates
  • Order Management - View purchase history and order details
  • Responsive Design - Seamless experience across all devices

πŸ” Authentication & Security

  • NextAuth Integration - Secure user authentication
  • Firebase Auth - Reliable identity management
  • Protected Routes - Secure checkout and order pages

πŸ’³ Payment Processing

  • Stripe Checkout - Secure payment gateway integration
  • Webhook Events - Real-time order confirmation
  • Transaction History - Complete order tracking

πŸ—„οΈ Data Management

  • Firebase Firestore - Cloud-based NoSQL database
  • Redux Toolkit - Centralized state management
  • Data Persistence - Orders saved for logged-in users

πŸ› οΈ Tech Stack

Frontend

  • Framework: Next.js 14.2 with React 18.2
  • Styling: Tailwind CSS 3.3
  • State Management: Redux Toolkit
  • UI Components: Heroicons, React Carousel
  • Notifications: React Toastify

Backend

  • Authentication: NextAuth.js
  • Database: Firebase Firestore
  • Cloud Functions: Firebase Cloud Functions
  • Payment: Stripe API
  • API: Fake Store API (product data)

πŸš€ Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • Firebase account
  • Stripe account

Installation

  1. Clone the repository
git clone https://github.com/SaketKothari/easybusyhub-webapp.git
cd easybusyhub-webapp
  1. Install dependencies
npm install
  1. Set up environment variables

Create a .env.local file in the root directory:

# Firebase Configuration
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_auth_domain
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id

# Stripe Configuration
STRIPE_PUBLIC_KEY=your_stripe_public_key
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_webhook_secret

# NextAuth
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_nextauth_secret
  1. Run the development server
npm run dev

Open http://localhost:3000 in your browser.

πŸ”§ Available Scripts

Command Description
npm run dev Start development server on localhost:3000
npm run build Build production-ready application
npm start Start production server

πŸ’° Stripe Webhook Setup

To test payment webhooks locally:

  1. Install Stripe CLI

Download from Stripe CLI Releases

  1. Login to Stripe
stripe login
  1. Forward webhook events to local server
stripe listen --forward-to localhost:3000/api/webhook
  1. Copy the webhook signing secret displayed in the terminal and add it to your .env.local file

πŸ“ Project Structure

easybusyhub-webapp/
β”œβ”€β”€ public/              # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/            # Redux store configuration
β”‚   β”œβ”€β”€ components/     # React components
β”‚   β”œβ”€β”€ pages/          # Next.js pages and API routes
β”‚   β”‚   β”œβ”€β”€ api/        # Backend API endpoints
β”‚   β”‚   └── auth/       # Authentication pages
β”‚   β”œβ”€β”€ services/       # Service layer
β”‚   β”œβ”€β”€ slices/         # Redux slices
β”‚   β”œβ”€β”€ styles/         # Global styles
β”‚   └── utils/          # Utility functions
β”œβ”€β”€ firebase.js         # Firebase configuration
└── package.json        # Project dependencies

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  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.

πŸ‘€ Author

Saket Kothari

πŸ™ Acknowledgments


Made with ❀️ by Saket Kothari

Releases

No releases published

Packages

 
 
 

Contributors