E-commerce Website Frontend

This project is a frontend application for an e-commerce website built using Next.js. This project serves as my initial learning project for Next.js.

Live Demo

https://nextjs-ecommerce-frontend.netlify.app/

Features

  • Home page showcasing featured products
  • Product listing and details pages

Screenshots

Home Page Home Page - Showcase of featured products

Product Details Product Details - Example of a product detail page

Technologies Used

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • Node.js and npm installed on your local machine. You can download them from nodejs.org.

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/ecommerce-frontend.git
    
  2. Navigate to the project directory:

    cd ecommerce-frontend
    
  3. Install the dependencies:

    npm install
    

Running the Application

  1. Start the development server:

    npm run dev / npm run start
    
  2. Open http://localhost:3000 in your browser to see results

Running the Application with Docker

To run this application using Docker, follow these steps:

Prerequisites

Building the Docker Image

  1. Navigate to the project directory:

    cd /path/to/your/project
  2. Build the Docker image:

    docker build -t ecommerce-frontend .

    This command builds the Docker image with the tag ecommerce-frontend. The . denotes the current directory as the build context.

Running the Docker Container

  1. Running the docker container:

    docker run -p 3000:3000 ecommerce-frontend

    This command runs the container and maps port 3000 on your host machine to port 3000 in the container. Your application will be accessible at http://localhost:3000.

Stopping the Docker Container

  1. Find the running container ID or name:

    docker ps
  2. Stop the container:

    docker stop <your_container_ID>

    Replace <container_id_or_name> with the actual container ID or name obtained from the docker ps command.

Contributions

Feel free to contribute to this by forking it, cloning or raising some issues for updation.