Skip to content
Matti Kiviharju edited this page Jun 24, 2024 · 12 revisions

Welcome to the i4ware AI Assistant Real-Time Chat wiki!

Install Development Environment

Install a XAMPP with PHP 8.2.+

Please install a XAMPP with PHP 8.2.+ from address below:

https://www.apachefriends.org/download.html

Important! Laravel 9 do not work with PHP 7 and or 8.1.

Before you run composer install command in Windows PowerShell/CMD/Terminal you need to enable various PHP extension in php.ini file in folder C:\xampp\php.

List of PHP extensions to enable is zip, sodium and gd. Please restart XAMPP Apache 2 after change of php.ini file.

Install a Composer

Please install a composer from address below:

https://getcomposer.org/download/

Install a Node.js LTS

Please install a Node.js LTS from address below:

https://nodejs.org/en/download/

Install Back-end

Run XAMPP as Administrator.

Go to phpMyAdmin and create database for this.

Go to folder C:\xampp\htdocs\i4ware_AI_Assistant_Real_Time_Chat\saas-app.

Copy .env.example with name .env

Edit .env and add right settings.

APP_DOMAIN_ADMIN=www.i4ware.fi

APP_DOMAIN_ADMIN_FULLNAME="Jon Doe"

[email protected]

APP_DOMAIN_ADMIN_PASSWORD=12345678

APP_DOMAIN_ADMIN_COMPANY="i4ware Software"

Settings above is for admin domain case when you run php artisan db:seed command.

PUSHER_APP_ID=

PUSHER_APP_KEY=

PUSHER_APP_SECRET=

PUSHER_APP_CLUSTER=mt1

OPENAI_API_KEY=

OPENAI_MAX_TOKENS=1500

Settings above is for OpenAI (https://openai.com/api/) and Pusher (https://pusher.com/) support.

Then run commands below in C:\xampp\htdocs\i4ware_AI_Assistant_Real_Time_Chat\saas-app folder on Windows PowerShell/CMD/Terminal.

composer install

php artisan key:generate

php artisan migrate

php artisan db:seed

php artisan passport:install

php artisan storage:link

Install Front-end

Go to folder C:\xampp\htdocs\i4ware_AI_Assistant_Real_Time_Chat\login-form.

Copy .env.sample with name .env.local

Edit .env.local and add right settings for REACT_APP_PUSHER_KEY= and REACT_APP_PUSHER_CLUSTER= which you get from Pusher www-site at https://pusher.com/.

Then run command below in C:\xampp\htdocs\i4ware_AI_Assistant_Real_Time_Chat\login-form on Windows PowerShell/CMD/Terminal.

npm install --legacy-peer-deps

To run and/or start front-end you can just run command below on Windows PowerShell/CMD/Terminal.

npm start