Skip to content

Denis10491/store

Repository files navigation

FakeStoreLogo

About

SPA Online FakeStore on Laravel and Vue where you can order products from home. With the ability for the admin to track statistics on sales and top-selling products. Also have full access to change products.

Stack

Frontend: Vue.js 3, TypeScript, Pinia, Chart.js, VueRouter, Axios, UIkit, Vite, ESlint

Backend: Laravel 10, PHP 8.3, Docker, Redis, MySQL

Features

  • Admin panel with the ability to manage products, view statistics and orders, products in the form of lists and tables.
  • Displaying monthly statistics on orders and best-selling products using chart.js
  • RESTful API with roles. Admin panel
  • Deploying an application via docker
  • SPA
  • Caching frequently accessed data using redis

Config

Admin account

  • Login: admin@admin
  • Password: admin
  • Path: /admin

Database

  • DB_CONNECTION=mysql
  • DB_HOST: mysql
  • DB_PORT: 3306
  • DB_DATABASE: storedb
  • DB_USERNAME: root
  • DB_PASSWORD: root

Run Locally

Clone the project

  git clone https://github.com/Denis10491/store

Go to the project directory

  cd store

Install dependencies

  composer install
  npm install

Copy from .env.example to .env and configure the configurations described above

Connect image storage

  php artisan storage:link

Run docker build an application image

  docker build -t app .

Run docker compose

  docker-compose up -d

Generate application key

  docker-compose exec app php artisan key:generate

Run migrations and seeds

  docker-compose exec app php artisan migrate:fresh --seed

Run a local server for the client side

  npm run dev

Open project: http://127.0.0.1:8000