Skip to content

opeyemidy/shopping-bucket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Shopping Basket Feature

This repository contains the implementation of a shopping basket feature for an online shopping platform. The feature allows the sales team to track items that were added to the basket but removed before checkout. This data can be used later for targeted discounts.

Technologies Used

  • Laravel: A PHP web framework used for developing the REST API.
  • MySQL: A relational database used for storing data.
  • Vue 3: A progressive JavaScript framework used for building user interfaces.
  • Pinia: A state management library for Vue 3.

Installation

  1. Clone the repository:

    git clone <repository-url>
  2. Install dependencies

    Install Laravel API dependencies
    
    ```bash
    cd api
    composer install
    ```
    
    Navigate to fronted directory and Install Vue frontend dependencies
    
    ```bash
    cd ../frontend
    yarn
    ```
    

Setup

  1. For the API:

    1. Create a .env file in the API root directory:
    cd api
    cp .env.example .env
    1. Generate an application key:
    php artisan key:generate
    1. Open the .env file in a text editor and update the following variables to configure the database connection and other environment settings:
    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=your_database
    DB_USERNAME=your_username
    DB_PASSWORD=your_password
    APP_URL=http://localhost:8000
    FRONTEND_URL=http://localhost:5173
    SANCTUM_STATEFUL_DOMAINS=http://localhost:5173
    1. Run database migrations and seeders:

      php artisan migrate --seed
    2. Start the development server:

      php artisan serve
    3. Start the job process using the queue:work command on a separate cli:

      php artisan queue:work

    The application will be accessible at http://localhost:8000.

  2. For the frontend:

    1. Create a .env file in the frontend directory:
    cd frontend
    touch .env
    1. Open the .env file in a text editor and add the following line to configure the API base URL:
    VITE_APP_API_BASE_URL=http://localhost:8000
    1. Start the development server:

      yarn dev

To improve the note regarding the automatic login for demo purposes, you can provide additional context and clarification. Here's an improved version:

Note: Automatic User Login for Demo Purposes

For demonstration purposes, the application has a feature that automatically logs in the user as both a regular user and an admin. This allows you to explore and experience the application's functionalities without the need for separate user accounts. To access the page displaying products for potential discounts by mentioning the "Admin" link on the navigation bar. It clarifies that the admin-related functionality is accessible through this link.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published