![]() |
3 days ago | |
---|---|---|
.github/workflows | 9 months ago | |
app | 6 days ago | |
bootstrap | 8 months ago | |
config | 5 months ago | |
database | 4 months ago | |
docs | 5 months ago | |
public | 3 months ago | |
resources | 1 week ago | |
routes | 5 months ago | |
storage | 5 months ago | |
tests | 10 months ago | |
.editorconfig | 1 year ago | |
.env.example | 7 months ago | |
.gitattributes | 1 year ago | |
.gitignore | 7 months ago | |
LICENSE | 2 years ago | |
README-fa.md | 3 months ago | |
README.md | 3 days ago | |
artisan | 1 year ago | |
composer.json | 5 months ago | |
composer.lock | 5 months ago | |
package.json | 3 months ago | |
phpunit.xml | 1 year ago | |
vite.config.js | 3 months ago | |
yarn.lock | 3 months ago |
README.md
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) oradmin@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
: ContainsonCreate
,onRemove
,onMount
actions for the theme partPartName.blade.php
: Blade template for the theme partPartName.scss
: SCSS styles for the theme partPartName.js
: JavaScript for the theme partscreenshot.png
: Screenshot preview of the theme part
Demo
Online demo available here: https://xshop.xstack.ir/
Screenshots
Access to xShop/v1
[!WARNING]
xShop/v1 is available here: https://github.com/4xmen/xshop.v1
Developed with ❤️!