Code Monkey home page Code Monkey logo

laravel-vue-ecommerce's Introduction

CircleCI Quality Gate Status

Laravel eCommerce

Ecommerce site with Laravel 10, Vue 3 and Stripe.

Screenshot:


Project screenshot


Stripe screenshot:


Stripe screenshot


Features

  • Laravel 10

  • Vue 3 with SFC and <script setup> syntax

  • Pinia state management

  • State persist with pinia-plugin-persistedstate

  • Product search integrated with Laravel

  • Order form setup with FormKit and builtin validation

  • Stripe for payments

  • Easily change currency by setting two environment variables: CASHIER_CURRENCY and CASHIER_CURRENCY_LOCALE

  • Code linting with Laravel Pint

  • CSS animations

  • Responsive mobile menu

  • SonarCloud code quality scanner integration on all pull requests

  • Laravel Dusk and Jest tests with CircleCI integration

Main dependencies:

  • vue: Vue.js 3, a progressive JavaScript framework
  • vue-router: Official router for Vue.js 3
  • pinia: Intuitive, type safe, light and flexible Store for Vue using the Composition API
  • pinia-plugin-persistedstate: Persist and rehydrate Pinia stores
  • swiper: Responsive image carousel with mobile touch support
  • @stripe/stripe-js: Stripe.js and Elements for collecting payment information
  • @formkit/vue: Form handling and validation for Vue 3
  • @formkit/addons: Addons for FormKit, including support for Stripe Elements
  • swrv: Stale-While-Revalidate data fetching for Vue
  • lodash: A modern JavaScript utility library

Setup

  • Fork or clone the project

  • Ensure you have PHP 8.2.4 or newer installed and setup properly (alternatively use Docker, see https://laravel.com/docs/10.x/sail)

  • Ensure you have access to a PostgreSQL database

  • Ensure you have Node installed

  • Rename .env.example to .env and modify the values

  • Run composer install to install the PHP dependencies with Composer. Check out https://getcomposer.org/ if necessary

  • Run npm install to install the Node dependencies needed by the project. Check out https://nodejs.org/en/ if necessary

  • Run php artisan migrate:install to setup the Laravel database migrations

  • You should create at least one sample product. Although you can use the builtin factory seeders, I prefer to do manual creation for testing purposes.

    To do so run these commands after running php artisan tinker:

    $product = new App\Models\Product();
    $product->name = 'Example Product';
    $product->slug = 'example-product';
    $product->description = 'Example product description';
    $product->imageUrl = 'https://placehold.co/400x400';
    $product->price = 99;
    $product->save();
  • Run npm run watch to serve the Vue 3 files

  • Run php artisan serve to serve the PHP files

  • Open up http://localhost:8000 in your browser

TODO

  • Do WCAG analysis and ensure there are no issues

  • Consider adding an admin dashboard

  • Look into performance optimization

laravel-vue-ecommerce's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar renovate-bot avatar renovate[bot] avatar w3bdesign avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

laravel-vue-ecommerce's Issues

Fix carousel

<template>
  <div>
    <h1>Carousel Example</h1>
    <div class="carousel">
      <div v-for="(item, index) in items" :key="index" :class="{ active: index === activeIndex }">
        <img :src="item.image" :alt="item.caption">
        <div class="caption">{{ item.caption }}</div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue';

const items = ref([
  { image: 'image1.jpg', caption: 'Image 1' },
  { image: 'image2.jpg', caption: 'Image 2' },
  { image: 'image3.jpg', caption: 'Image 3' },
]);

const activeIndex = ref(0);
</script>

<style scoped>
.carousel {
  display: flex;
  overflow: hidden;
  width: 100%;
  height: 300px;
}

.carousel div {
  flex: 0 0 100%;
  transition: transform 0.5s;
}

.carousel div.active {
  transform: translateX(0);
}

.carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 10px;
}
</style>

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update Node.js to v21.6.2
  • Update browser-tools orb to v1.4.8
  • Update dependency laravel/cashier to v15.2.2
  • Update dependency laravel/sail to v1.28.1
  • Update dependency phpunit/phpunit to v10.5.11
  • Update dependency postcss to v8.4.35
  • Update dependency prettier to v3.2.5
  • Update dependency spatie/laravel-ignition to v2.4.2
  • Update dependency vue to v3.4.21
  • Update dependency @babel/preset-env to v7.24.0
  • Update dependency @testing-library/jest-dom to v6.4.2
  • Update dependency axios to v0.28.0
  • Update dependency laravel/dusk to v7.13.0
  • Update dependency laravel/framework to v10.46.0
  • Update dependency laravel/pint to v1.14.0
  • Update dependency squizlabs/php_codesniffer to v3.9.0
  • Update dependency vue-router to v4.3.0
  • Update dependency @stripe/stripe-js to v3
  • Update dependency global-jsdom to v24
  • Update dependency phpunit/phpunit to v11
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

circleci
.circleci/config.yml
  • browser-tools 1.4.6
  • cimg/node 21.6.1
composer
composer.json
  • php 8.2.10
  • guzzlehttp/guzzle 7.8.1
  • laravel/cashier ^15.0
  • laravel/framework 10.41.0
  • laravel/sanctum 3.3.3
  • laravel/tinker 2.9.0
  • fakerphp/faker 1.23.1
  • laravel/dusk 7.12.1
  • laravel/pint 1.13.10
  • laravel/sail 1.28.0
  • mockery/mockery 1.6.7
  • nunomaduro/collision 7.10.0
  • phpunit/phpunit 10.5.9
  • spatie/laravel-ignition 2.4.1
  • squizlabs/php_codesniffer 3.8.1
npm
package.json
  • @formkit/addons 1.5.1
  • @formkit/vue 1.5.1
  • @stripe/stripe-js 1.54.2
  • lodash 4.17.21
  • pinia 2.1.7
  • pinia-plugin-persistedstate 3.2.1
  • swiper ^9.4.1
  • swrv 1.0.4
  • vue 3.4.15
  • vue-router 4.2.5
  • @babel/preset-env 7.23.9
  • @testing-library/jest-dom 6.2.1
  • @testing-library/vue 7.0.0
  • @vue/vue3-jest 29.2.6
  • autoprefixer 10.4.16
  • axios 0.27.2
  • babel-core 7.0.0-bridge.0
  • babel-jest 29.7.0
  • global-jsdom 9.1.0
  • jest 29.7.0
  • jest-environment-jsdom 29.7.0
  • jsdom 22.1.0
  • laravel-mix 6.0.49
  • lodash 4.17.21
  • postcss 8.4.33
  • prettier 3.2.4
  • tailwindcss 3.4.1
  • vue-loader 17.4.2

  • Check this box to trigger a request for Renovate to run again on this repository

Carousel

Remove, replace or fix carousel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.