Installation Guide
System Dependencies
Before you begin the installation process, ensure your environment meets the following requirements:
- PHP: Version 8.1 or higher (required by Laravel 10).
- Composer: Dependency manager for PHP.
- Database: MySQL 5.7+ or MariaDB 10.2+ (for the database).
- Node.js: Version 16 or higher (for the front-end build process).
- NPM: Node package manager (comes with Node.js).
- Git: Version control system for managing the codebase.
- Web Server: Apache or Nginx for serving the application.
Setting Up the Project
-
Clone the repository:
- Clone the project repository to your local machine:
git clone git@github.com:inhouse-sa/dropshipping.git dropshipping-platform
cd dropshipping-platform -
Install PHP dependencies:
- Run the following command to install Laravel and Filament’s dependencies:
composer install -
Install NPM dependencies:
- Install front-end dependencies:
npm install -
Create and Configure Environment File:
- Copy
.env.exampleto.env:
cp .env.example .env-
Open
.envand configure the following settings:Database Configuration:
- DB_CONNECTION: Set to your database connection, e.g.,
mysql. - DB_HOST: Database server address, e.g.,
127.0.0.1. - DB_PORT: Default port for MySQL (usually
3306). - DB_DATABASE: Your database name.
- DB_USERNAME: Database username.
- DB_PASSWORD: Database password.
Additional Environment Variables:
-
Sella Integration:
SALLA_WEBHOOK_CLIENT_SECRET=your_webhook_secret
SALLA_URL=your_sella_url
SALLA_CLIENT_ID=your_client_id
SALLA_CLIENT_SECRET=your_client_secret -
Company Info for Invoices and Dashboard:
COMPANY_NAME=Your Company Name
VAT_NUMBER=Your VAT Number
PROFIT_PERCENTAGE=Your Profit Percentage -
ClickPay Payment Configuration:
CLICKPAY_PAYMENT_URL=your_clickpay_payment_url
CLICKPAY_PROFILE_ID=your_clickpay_profile_id
CLICKPAY_SERVER_KEY=your_clickpay_server_key
APP_KEY:
- Set a new application key for Laravel:
php artisan key:generate - DB_CONNECTION: Set to your database connection, e.g.,
- Copy
-
Run Migrations:
- Migrate the database tables:
php artisan migrateIf you want to seed the database (e.g., for products order or users), you can run:
php artisan db:seed -
Link Storage
- link the storage using:
php artisan storage:link
Running the Application
-
Start the development server:
- To test the application locally, you can run:
php artisan serveThe application will be accessible at
http://localhost:8000. -
Log in to Filament Admin Panel:
- Visit
http://127.0.0.1:8000/admin/login. - Log in using the credentials:
- email:
admin@filamentphp.com - password:
password
- email:
- Visit
-
Log in to Filament Buyer Panel:
- Visit
http://127.0.0.1:8000/login - Log in using the credentials:
- email:
buyer@filamentphp.com - password:
passwordbuyer
- email:
- Visit
App:Install and App:Update Commands (Planned)
php artisan app:install
This command will automate the setup and configuration steps, including:
- Running migrations.
- Seeding the database.
- Linking storage.
php artisan app:update
This command should handle updates to the system, including:
- Running migrations for new tables or updates.
- Syncing Filament configurations.
- Clearing and rebuilding caches.
- Updating any configuration settings.
- Creating any new permissions.
- Running any additional tasks like version checks, third-party integrations, data fixes, or API updates.
Troubleshooting
- If you encounter any errors, check the Laravel log files in
storage/logs/for more details. - Ensure that your
.envfile is properly configured, especially the database settings. - Run
php artisan optimizeto clear and optimize your caches after installation. - Run
php artisan icons:cacheif your the project is slow