Skip to content

A dynamic e-commerce platform that showcases a variety of mobile phone brands and models, allowing users to customize and order their preferred devices by selecting RAM sizes, colors, and storage capacities.

License

Notifications You must be signed in to change notification settings

Gambit142/PhoneHub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PhoneHub

A dynamic e-commerce platform that showcases a variety of mobile phone brands and models, allowing users to customize and order their preferred devices by selecting RAM sizes, colors, and storage capacities.


πŸ—οΈ Built With

Core Technologies

  • MongoDB - NoSQL database for scalable product and order management
  • Express.js - Backend web framework for RESTful APIs
  • React - Frontend library for building interactive user interfaces
  • Node.js - JavaScript runtime for backend development

Frontend Technologies

  • Tailwind CSS - Utility-first CSS framework for responsive UI
  • Redux Toolkit - State management
  • React Router - Client-side routing
  • Chart.js - Analytics and data visualization
  • Stripe.js - Payment gateway integration

Backend Technologies

  • Mongoose - MongoDB object modeling
  • JWT - JSON Web Token for authentication
  • bcryptjs - Password hashing
  • Cloudinary - Image hosting and management
  • Nodemailer - Email notifications (optional)
  • Stripe - Payment processing API

πŸš€ Overview

PhoneHub is a full-stack e-commerce web application designed to provide users with a seamless phone shopping experience.
It supports product filtering, secure payments, admin product management, and responsive design for both desktop and mobile users.


βš™οΈ Prerequisites

Before you begin, ensure you have the following installed:

You should also be familiar with:

  • JavaScript (ES6+)
  • React & Redux Toolkit
  • RESTful API architecture
  • Environment variable configuration

βš™οΈ Environment Variables

Server .env

NODE_ENV=development
PORT=
MONGODB_URI=
JWT_SECRET=
ADMIN_EMAIL=
ADMIN_PASSWORD=
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
STRIPE_SECRET_KEY=

Client .env

REACT_APP_STRIPE_PUBLIC_KEY=
VITE_STRIPE_PUBLIC_KEY=

πŸ’» Running the Project Locally

1. Clone the repository

git clone https://github.com/Gambit142/PhoneHub.git
cd PhoneHub

2. Install dependencies

Backend:

cd server
npm install

Frontend:

cd ../client
npm install

3. Configure environment variables

Create .env files in both server/ and client/ directories as shown above.

4. Start MongoDB

If running locally:

mongod

5. Tips:

Generate a secure JWT secret using:

node server/src/utils/generateSecret.js

Create the initial admin user using:

node server/src/utils/createAdmin.js

Seed the database with phone data by using:

node server/src/utils/seedDatabase.js

5. Start the development servers

Backend:

npm run start

Frontend:

npm run dev

6. Access the app

Open your browser and go to:

http://localhost:5173

🧠 Technologies & Tools

Category Technologies
Frontend React, Vite, Tailwind CSS, Redux Toolkit, Chart.js
Backend Node.js, Express.js, Mongoose
Database MongoDB
Authentication JWT
Media Storage Cloudinary
Payments Stripe
Email Service Nodemailer
State Management Redux Toolkit
Testing Jest
Utilities bcryptjs, dotenv

🧩 Features

  • User registration and login (JWT-based authentication)
  • Browse and filter phones by brand, RAM, storage, and color
  • Secure payment integration with Stripe
  • Product management dashboard for admin users
  • Cloud-based image upload via Cloudinary
  • Order tracking and user purchase history
  • Responsive design optimized for mobile and desktop
  • Real-time stock update and order status changes

🌱 Future Enhancements

  • Wishlist feature for saving favorite products
  • Multi-language support for international users
  • Product reviews and ratings system
  • AI-based product recommendation engine
  • Progressive Web App (PWA) integration for offline usage
  • Email verification and password recovery functionality
  • Integration with Google Pay / Apple Pay for faster checkout

πŸ‘¨β€πŸ’» Author

πŸ‘€ Francis Ugorji


🀝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to open a pull request or check the issues page.


🌟 Show your support

Give a ⭐️ if you like this project and found it helpful!


πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

Special thanks to:

  • The open-source community for the tools and frameworks used
  • Cloudinary and Stripe for providing free-tier APIs
  • Pexels for sample phone product images
  • Tailwind CSS team for an excellent styling framework
  • Mobile Phone Rapid API for data used

About

A dynamic e-commerce platform that showcases a variety of mobile phone brands and models, allowing users to customize and order their preferred devices by selecting RAM sizes, colors, and storage capacities.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages