A full-stack MERN marketplace application for buying and selling used mobile phones. This repository contains the client-side code.
- 🔐 User Authentication with Firebase
- 👥 Role-based Access Control (Admin, Seller, Buyer)
- 📱 Browse and Search Used Phones
- 💰 Secure Payment Integration with Stripe
- 🎨 Responsive Design with Tailwind CSS & DaisyUI
- 📝 Product Management for Sellers
- 🛡️ Protected Routes
- 📊 Dashboard for Different User Roles
- React 18
- React Router DOM v6
- Firebase Authentication
- Tailwind CSS
- DaisyUI Components
- TanStack Query (React Query)
- Stripe Payment Integration
- Axios
- React Hook Form
- React Hot Toast
- React Helmet
- Node.js (v14 or higher)
- npm or yarn
- Firebase account
- Stripe account
- ImgBB account for image hosting
- Clone the repository
git clone https://github.com/rakibul58/phone-heaven-client.git
cd mobile-heaven-client
- Install dependencies
npm install
- Environment Variables
Create a .env
file in the root directory:
REACT_APP_apiKey=
REACT_APP_authDomain=
REACT_APP_projectId=
REACT_APP_storageBucket=
REACT_APP_messagingSenderId=
REACT_APP_appId=
REACT_APP_imgbb_key=
REACT_APP_STRIPE_PK=
- Start the development server
npm start
src/
├── components/ # Reusable components
├── contexts/ # Context providers
├── hooks/ # Custom hooks
├── layouts/ # Page layouts
├── pages/ # Page components
├── routes/ # Route configurations
└── firebase/ # Firebase configuration
# Start the development server
npm start
# Build for production
npm start
# Run tests
npm test
# Eject from Create React App
npm run eject
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
The application can be deployed on Netlify or Vercel:
- Connect your GitHub repository
- Configure build settings:
- Build command:
npm run build
- Publish directory:
build
- Build command:
- Set up environment variables in the deployment platform
- Deploy!
- Mobile Heaven Server - Backend API repository
This project is licensed under the MIT License - see the LICENSE file for details