Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

4xmen/xshop

Open more actions menu

Repository files navigation

xShop logo

xShop/v2

Note

xShop is an open-source shop developed in Laravel, highly customizable!

New Features

  • Dashboard panel improvements
  • Integration of Vue.js and Laravel
  • Advanced charts
  • Better customization with AI & language support
  • Fixed technical issues
  • Project size compression
  • More specific UI/UX
  • Developer-friendly
  • Custom theme design

Documentation

Installation [Development Mode]

Important

Create a new database and rename .env.example to .env, then update your .env configurations. Run the following commands:

git clone https://github.com/4xmen/xshop.git
cd xshop
cp .env.example .env
composer install
php artisan migrate:fresh --seed
php artisan storage:link
php artisan key:generate
php artisan serve

# To develop front-end
npm i
php artisan client
npm install @rollup/rollup-win32-x64-msvc # Windows only, if the below line does not work
npm run dev

# Or with yarn

yarn install
php artisan client
yarn add @rollup/rollup-win32-x64-msvc # Windows only, if the below line does not work
yarn dev

Tip

Default admin emails are: developer@example.com (developer) or admin@example.com (admin)
Default password: password

Image Seeding

  • Download and prepare images:
php artisan seeding:prepare
  • Then copy your image folder to database/seeders/images/
  • Seed images for models: [Group, Category, Post, Product, Slider]
php artisan seeding:image Product digital

Or to seed all models:

php artisan seeding:all digital

The first parameter is the model name; the second is the image seeder directory. Available directories: [bag, clothe, digital, sport, posts, makeup]
You can create your own directory, add images to it, and use it with the image seeder.

Requirements

  • PHP 8.2.x or above with extensions: php-gd, sqlite3, php-soap
  • MySQL, MariaDB, or SQLite
  • Composer
  • Recommended: Install ImageMagick on the server for better image performance

Deployment Guide

We recommend deploying xShop on a VPS. Create a database and run the following commands:

cd /home/[yourUsername]/[pathToYourWebsitePublicHTML]
git clone https://github.com/4xmen/xshop.git .  # If this command doesn’t work, empty this folder first
cp .env.example .env
nano .env # Edit your DB config, URL, etc.
composer install
php artisan migrate:fresh --seed
php artisan storage:link
php artisan key:generate
npm install 
php artisan client
npm run build

Optimize for Production

nano .env # Set APP_DEBUG=false, APP_ENV=production
php artisan optimize
composer install --optimize-autoloader --no-dev

Add Cron Job

Add a crontab entry for your project:

crontab -e

Add this line:

* * * * * cd /home/[yourusername]/[your-public-html-project-root] && php artisan schedule:run >> /dev/null 2>&1

Create xController

Create a controller with logging and semi-automatic CRUD with logs.
Usage: [model]

php artisan make:xcontroller User

Create Theme Part

Create a reusable theme part in a specific area.

Parameters:
PartName [theme part name]
segmentName [group, category, preloader, ...]

php artisan make:part PartName segmentName

Client Optimization

Optimize client assets: scss, js, css

php artisan client
php artisan build

Theme Parts Files

  • PartName.php: Contains onCreate, onRemove, onMount actions for the theme part
  • PartName.blade.php: Blade template for the theme part
  • PartName.scss: SCSS styles for the theme part
  • PartName.js: JavaScript for the theme part
  • screenshot.png: Screenshot preview of the theme part

Demo

Online demo available here: https://xshop.xstack.ir/

Screenshots

1

2

3

4

5

Access to xShop/v1

Warning

xShop/v1 is available here: https://github.com/4xmen/xshop.v1

Developed with ❤️!

Morty Proxy This is a proxified and sanitized view of the page, visit original site.