Skip to content

zigelnik/WebApp-Phone-Store

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📱 Phonebook - E-Commerce Website




📋 Table of Contents


About the Project

Phonebook is a fully functional e-commerce website built using Node.js and Express.js, featuring a responsive design for showcasing products, managing orders, and enabling cart functionality. It includes:

  • User Authentication: Login and registration for customers and admin accounts.
  • CRUD Functionality: Full Create, Read, Update, and Delete support for products, orders, users, and cart items.
  • APIs for Dynamic Content:
    • Google Maps API: Displays branch locations on an interactive map.
    • GNews API: Fetches and displays the latest news articles.
    • Facebook API: Enables posting products to the website's Facebook page.

The project leverages MongoDB as the database for scalable and efficient data management.


Key Features

  • Product Management:
    • Admins can add, edit, and delete products.
    • Users can view and search for products.
  • User Roles:
    • Regular users can browse, add to cart, and order.
    • Admins have access to additional features like managing products and users.
  • Dynamic APIs:
    • Integration with external APIs (Google Maps, GNews, Facebook) for dynamic data.
  • Real-time Features:
    • Socket.io for chat functionality with real-time updates.

Environment Variables

To run the project, the following environment variables are required:

PORT=3000
MONGODB_URL=<Your MongoDB Connection String>
API_URL=/api/v1
SECRET=<Your Secret Key>

Create a config folder and inside create a .env.dev file and add the variables above. Ensure these values are secure and not hardcoded into the application.


Built With

  • Node.js:
    • Express: Backend framework for building REST APIs.
    • Mongoose: ODM library for MongoDB.
  • MongoDB: NoSQL database for storing user data, products, orders, and more.
  • APIs:
    • Google Maps API: Display branch locations on an interactive map.
    • GNews API: Fetch and display news articles.
    • Facebook API: Share products to the website's Facebook page.
  • Socket.io: Enables real-time chat functionality.

Getting Started

Follow the steps below to set up the project on your local machine:

Prerequisites

Ensure you have the following installed:

  • Node.js (v14 or later)
  • MongoDB (local or cloud-based, e.g., MongoDB Atlas)

Installation

  1. Fork the Repository: Click the fork button on GitHub to create your copy of the repository.

  2. Clone the Repository: Clone your forked repo to your local machine.

  3. Install Dependencies: Navigate to the project directory and install the required npm packages:

    cd WebApp-Phone-Store
    npm install
  4. Set Up Environment Variables: Create a .env.dev file in the config folder and add your environment variables as outlined above.


Running the Application

To start the application locally:

Run the Development Server:

npm run dev

Visit the application at http://localhost:5500/views/mainPage.html.


Demo

Check out the live demo or watch the preview:

Phonebook Demo

Screenshots

SHOP2 SHOP home2 CART admin_users admin_stats2 admin_products admin_orders

Acknowledgements

This project was built with the help of the following resources and contributors:


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 68.7%
  • HTML 19.7%
  • CSS 11.6%