Skip to main content

Installation Guide

System Dependencies

Before you begin the installation process, ensure your environment meets the following requirements:

  1. PHP: Version 8.1 or higher (required by Laravel 10).
  2. Composer: Dependency manager for PHP.
  3. Database: MySQL 5.7+ or MariaDB 10.2+ (for the database).
  4. Node.js: Version 16 or higher (for the front-end build process).
  5. NPM: Node package manager (comes with Node.js).
  6. Git: Version control system for managing the codebase.
  7. Web Server: Apache or Nginx for serving the application.

Setting Up the Project

  1. 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
  2. Install PHP dependencies:

    • Run the following command to install Laravel and Filament’s dependencies:
    composer install
  3. Install NPM dependencies:

    • Install front-end dependencies:
    npm install
  4. Create and Configure Environment File:

    • Copy .env.example to .env:
    cp .env.example .env
    • Open .env and 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
  5. Run Migrations:

    • Migrate the database tables:
    php artisan migrate

    If you want to seed the database (e.g., for products order or users), you can run:

    php artisan db:seed
  6. Link Storage

    • link the storage using:
    php artisan storage:link

Running the Application

  1. Start the development server:

    • To test the application locally, you can run:
    php artisan serve

    The application will be accessible at http://localhost:8000.

  2. 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
  3. 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

App:Install and App:Update Commands (Planned)

php artisan app:install

This command will automate the setup and configuration steps, including:

  1. Running migrations.
  2. Seeding the database.
  3. Linking storage.

php artisan app:update

This command should handle updates to the system, including:

  1. Running migrations for new tables or updates.
  2. Syncing Filament configurations.
  3. Clearing and rebuilding caches.
  4. Updating any configuration settings.
  5. Creating any new permissions.
  6. 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 .env file is properly configured, especially the database settings.
  • Run php artisan optimize to clear and optimize your caches after installation.
  • Run php artisan icons:cache if your the project is slow