About AI Engine

AI Engine is a AI Writer Content site that makes it easy for you to connect and share with family and friends online.

02. FAQ

Please read below first

The instructions below are intended for version 1.1.7 or later of your website. To determine your current version, access the admin section, go to the dashboard, and scroll down to the “System auto-check” tab. One of the most common reasons why customers cannot update their site is due to an incorrect email server configuration.

To configure your email settings, navigate to the admin section and select “settings” followed by “email”. Verify that the email settings are correct. If you are unsure whether your email server is configured correctly, you can use the following temporary email server information for the initial update:

Mail host: smtp.googlemail.com
Mail port: 587
Mail username: musicengine.script@gmail.com
Mail password: tmiscarovuadhjis
Mail secure: TLS

Screen Shot 2023-02-22 at 10 00 56

Once you have entered the email server information, ensure that the settings match the provided screenshot and click “save”.

Next, go to yoursite.com/admin/upgrade and follow the instructions to complete the upgrade process. It is important to wait for the congratulatory message to appear after the upgrade process is complete. If you receive any error messages indicating that the system cannot connect to the email server, the update will not be successful.

How can I change the frontend site name (in addition to the logo)?

To change the site name, navigate to the admin section and select “settings”. From there, you can modify the site name. Please note that this feature is available only in version 1.1.7 or later.

How can I change the site name and copyright in the admin panel?

To change the site name and copyright in the admin panel, open the lang/en/admin_copyright.php file. From there, you can modify the site title and copyright information.

How can I customize the frontend landing page?

To customize the frontend landing page, first enable “Use External HTML” in the admin section. Once this is done, use the file manager to access the public/templates/landing-page.html file, which contains the landing page code.

How can I customize the website style?

The website is designed to use pure Bootstrap 5 as much as possible, and the style files are overwritten every time the system performs an auto-update. Therefore, to customize the website style, add all of your CSS code to the public/assets/css/custom.css file.

I changed the logo in the admin panel, but it’s not changing.

The logo may have already been uploaded, but you might not have cleared your browser cache properly. You should clear your browser cache completely. If you’re using Chrome, right-click on the website, go to Inspector Element, then click on the Network tab and click on Disable cache. Finally, reload the site while keeping the Inspector open.

03. Server Requirements

04. Installing AI Engine

Important notice Upgrade your site

There are many issues have been addressed from the first release, please update your site to get rid of problem. Open your site

Login to admin -> yoursite.com/admin/upgrade and follow instruction

If you are having troubles updating/installing the script, please drop me an email at ninacoder2510@gmail.com.

Automatic installation

Check out the installation video: https://youtu.be/GXV1KwFa15w Installation via cPanel: https://youtu.be/C3BH8AaJ2u4

Follow the steps below to install the script:

Requirements:

Create a database for AI Engine using your server control panel. Alternatively, you can use phpMyAdmin if it is available on your server.

Go to your website address, and you will see an installation wizard.

rustCopy code

`Note (not applicable for cPanel users): Configure your web server's document/web root to be the public directory.`

bashCopy code

`Note for nginx users: Directories within the storage (storage/framework/views, storage/logs) and the bootstrap/cache directories should be writable by your web server, or the application will not run.`

Admin panel

To access the admin panel, add /admin after your website address. For example, if your website address is “www.example.com“, then your admin panel is located at “www.example.com/admin“.

05. Social Authorization

ninacoder-info edited this page 5 days ago

 · 4 revisions

 Pages 18

Facebook Socialite Authentication

Firstly, we create our Facebook app so that we can get a ‘client_id’ and ‘client_secret’ from Facebook.

Screen Shot 2020-08-20 at 10 45 09

We do this by going to Facebook’s developers URL: https://developers.facebook.com/ and log in with your Facebook account. Go to ‘My Apps’, proceed to ‘Add New App’ as shown below…

Screen Shot 2020-08-20 at 10 46 38

Next, input your App name and click on ‘Create App Id’ as shown below…

Screen Shot 2020-08-20 at 10 54 25

Next, go to Settings -> Basic, copy your app_id and app_secret.

Screen Shot 2020-08-20 at 10 45 32

Remember to click on show to view and copy your app_secret. This is illustrated below…

Screen Shot 2020-08-20 at 10 45 58

Next, click on the ‘+’ button beside ‘PRODUCTS’, select ‘Facebook Login’, also select ‘www’. Then add your website URL: https://yoursite.com and click on ‘Save’ as shown below… We’re done with all App settings, now let’s go over to STEP 4. STEP 4: Now got to your ‘.env’ file and update with these:

FACEBOOK_APP_ID=xxxxxxxxxxxxxxxx

FACEBOOK_APP_SECRET=xxxxxxxxxxxxxxxxxxxxxx

FACEBOOK_APP_CALLBACK_URL=https://aienginescript.top/connect/callback/facebook

Google Socialite Authentication

Create your app in Google 🌈

Create a project: https://console.developers.google.com/projectcreate Create credentials: https://console.developers.google.com/apis/credentials 1_opTTwMBRSBbYSnkbS8H1nA

Config callback url to https://aienginescript.top/connect/callback/google

A modal will pop up with your apps client id and client secret. Add these values to your .env file. Or Just use admin -> settings

Twitter Socialite Authentication

06. Roles and Usergroup

Utilizing role-specific permissions is an efficient way to grant permissions to multiple users simultaneously. For any user, it is possible to override role permissions with user-specific permissions.

07. Static Pages

You can create as many custom page as you want. You can create an About us page or a Privacy Policy page to give your user a better knowledge of your site.

You can also add a link of your custom page to the navigation menu. You’ll learn how to customize the navigation menu later in this guide In order to edit a page click the row in the table.

Create Page:-

Navigate to Pages > Create Page to create a new page.

08. Add cron job for automatically renew subscription

AI Engine is required a cron job to run in for for automatically renew subscription. Just add this line below into your cron system.

* * * * * php /path-to-music-engine/artisan schedule:run >> /dev/null 2>&1

Example for cPanel hosting:

***Step 1 Log in to cPanel, scroll down to the Advanced section and click the Cron Jobs icon.

Cron Jobs Icon

***Step 2 Scroll down to the Add New Cron Job section. You can either select from the Common Settings drop down menus or fill out your own custom values. Fill out the form as follows:

Common Settings: This option allows you to select a preset interval for your cron job to run. If you have not chosen one of the preset Common Settings, choose from the other options:

Minute: Either enter a custom value or select a preset value from the Common Settings menu. Hour: Either enter a custom value or select a preset value from the Common Settings menu. Day: Either enter a custom value or select a preset value from the Common Settings menu. Month: Either enter a custom value or select a preset value from the Common Settings menu. Weekday: Either enter a custom value or select a preset value from the Common Settings menu. The following example shows a job set up to run twice daily.

***Step 3 Enter the command you want to run:

For AI Engine is php /path-to-ai-engine/artisan schedule:run in the Command field and click Add New Cron Job.

The command can be any command able to be run from the Linux terminal. This includes scripts per our example.

Add New Cron Jobs Button

A confirmation will appear to confirm that the job has been added.

09. Create And Manager Plan & Subscription

Watch this: https://youtu.be/av8fFdQdGu4

10. Fix proc_open Laravel error

Only read this article if you face problem such as uploading profile picture

Login in to your admin/Utilities/System Logs, if you see error report about proc_open you can try to fix it by follow the instruction.

The proc_open is a PHP parameter used to execute the command and open file pointers.

Usually, server owners disable this function due to security risk as it allows external calls.

The simplest way is contact your hosting support ask them if you can have proc_open for only your site.

If it not work out, please continue read the document below.

AI Engine using laravel framework, Laravel is an open-source PHP web framework. This development tool makes the task of website development easier. This is because its code is simple and clean.

It uses many PHP functions in its code for various functionalities. One such PHP function is proc_open. This function executes a command and open file pointers for I/O.

But in most servers, the proc_open function will be disabled due to security risk. This function allows external calls that attackers may utilize. But if Laravel websites use this function at any point, it throws errors.

How to fix the proc_open error in Laravel?

Due to security concerns, the proc_open function in a server is usually disabled. Our Support Engineers always look if the function has critical importance in the working of the website. If yes, we enable it after ensuring the server security.

Let’s see two instances where we fixed the error.

For a cPanel account

The customer had a cPanel account in a shared hosting server. So before enabling the proc_open function server-wide, we lookout for the security of other customers in the server too.

But for this customer, we enabled it after looking at the security measures available in the server. Here are the steps we did to enable the proc_open function.

First, we login to the cPanel account of the customer.

Next, we selected the PHP version that Laravel uses. Here it was 7.4.

We also selected PHP versions that were not native.

Then we clicked on Switch to PHP Options on the top-right.

Later, we added and edited the disabled_function directive. This way, we enabled the proc_open here.

Here we didn’t enable the proc_open function server-wide, rather we enabled it for a single cPanel account. Also, since the server had CageFS enabled, it reduces security risks in the server.

In other shared hosting servers

Enabling the proc_open function server-wide may not acceptable due to security risks. So if the error showed up in a shared hosting server, we recommend our customers to avoid using the function.

Usually, a default Laravel application will not require proc_open() to serve a site. Rather users use it debugging mode for enabling Flare error reporting service. So we publish the flare config file,

php artisan vendor:publish --tag=flare-config

And edit the config/flare.php. Here we set the following parameter false.

'collect_git_information' => false

Hence the application will not use proc_open function.

11. Enable Google reCaptcha V3

Register reCAPTCHA v3 Key and Secret

The Google reCAPTCHA library requires you to register keys for your domain before you can actually use it. In this section, we’ll see how you can register it.

First, go to the reCAPTCHA admin panel to create a link which presents you with a form asking you for a few details, as shown in the following screenshot.

In the reCAPTCHA Type field, select the reCAPTCHA v3 option. Fill in the Domains and Owners information as needed. Next, read and accept the reCAPTCHA Terms of Service. Finally, click on the Submit button to save the settings.

Upon form submission, Google generates a site key and site secret for your domain, as shown in the following screenshot.

Please copy and paste to your admin -> settings -> security tab as belowScreen Shot 2020-12-26 at 23 44 36

12. How to move your site

If you are going to move your site to a new location, for example: change your hosting, domain name, enable ssl (https) on your site etc… Please follow our guide.

Step 1: move all your file to new hosting/domain.

Step 2: open .env (located at the root of the project) then edit your site url to the correct one (with or without https, www or none-www).

Step 3: (option) delete public/storage shortcut symlink, only do this if you are going to change hosting server.

Step 4: (option) redirect 301 from non-https to https by edit public/.htaccess remove the letter # from line 13 and 14.

Before

# Redirect from non https to https
#RewriteCond %{HTTPS} off
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

After

# Redirect from non https to https
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Step 5: Delete storage shortcut

Use FTP or cPanel file manager delete the shortcut link in public folder (not public_html, it is a folder named ‘public’ in project root).

So you have to delete public/storage (not storage folder at the root of the project)

Step 6: Login to your admin.

Click to Utilities (left sidebar) -> Terminal -> Other (button) -> select laroute:generate -> run

Click to Utilities (left sidebar) -> Terminal -> Other (button) -> select storage:link -> run

DONE

13. How to setup paypal

First of all, please make sure you have a business account (for subscription and auto payment)

Follow this link to create your app

https://developer.paypal.com/developer/applications/

There is 2 type of app, make sure you choose LIVE (if you don’t want to test with sandbox)Screen Shot 2020-10-19 at 17 41 51 Screen Shot 2020-10-19 at 17 42 12 Screen Shot 2020-10-19 at 17 43 25

Copy your Client ID and Secret Key.

Open .env (the file located in the root of AI Engine Project). Find PAYPAL_APP_CLIENT_ID and PAYPAL_APP_SECRET then fill up your key.

PAYPAL_APP_CLIENT_ID=ATukahwfoawChOh5GaSDnwWXVcfrZ0fIKmHsIJbC2onGh_fmIJIWy01EgrXqcfVSsawf
PAYPAL_APP_SECRET=INWFNDJF32hbfWupKjCj-oiE4XVkUzKPSgHBNV61yoqMoHzHGrB9YqHM4wq9hbd6ZlLcI_iHWHDG

Done

14. Set Up Payments

Currently, all payment config are storing at config.php, there are many options you can set it up

for example

'stripe' => [
    'enable' => true,
    'name' => 'Stripe',
    'color' => 'white',
    'secret_key' => 'sk_test_SmE22x1tMizyEzTlgrMSVg4M',
    'subscriptionLink' => 'frontend.stripe.subscription.authorization',
    'buttonColor' => '#635bff',
    'buttonIcon' => '<svg width="24px" height="24px" fill="#ffffff" viewBox="0 0 24 24" role="img" xmlns="http://www.w3.org/2000/svg" stroke="#ffffff"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><title>Stripe icon</title><path d="M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.104 1.872 4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.574 3.445 2.583 0 .98-.84 1.545-2.354 1.545-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813 1.664-1.305 2.525-3.236 2.525-5.732 0-4.128-2.524-5.851-6.594-7.305h.003z"></path></g></svg>',
]

To disable payment you don’t want to use, simple change “enable” to false, you are free to change it’s logo, color, just do not change this line

'subscriptionLink' => 'frontend.stripe.subscription.authorization',
15. How to setup Wasabi Cloud
ninacoder-info edited this page 2 days ago · 2 revisions
 Pages 18
Find a page…
01. About
02. FAQ
03. Server Requirements
04. Installing AI Engine
05. Social Authorization
06. Roles and Usergroup
07. Static Pages
08. Add cron job for automatically renew subscription
09. Create And Manager Plan & Subscription
10. Fix proc_open Laravel error
11. Enable Google reCaptcha V3
12. How to move your site
13. How to setup paypal
14. Set Up Payments
15. How to setup Wasabi Cloud
NOTE: You can't use wasabi trial account with the script. Wasabi do not allow you public and stream the file if you are trial. You have to add your credit card to active your wasabi.
Clone this wiki locally
https://github.com/ninacoder-info/ai-engine-wiki.wiki.git
If you wish to use Wasabi to store your media content please follow:

NOTE: You can't use wasabi trial account with the script. Wasabi do not allow you public and stream the file if you are trial. You have to add your credit card to active your wasabi.
Step 1. Open your .env, add following lines. Remember to edit with wasabi API and secret key

WASABI_ACCESS_KEY_ID=

WASABI_SECRET_ACCESS_KEY=

WASABI_DEFAULT_REGION=

WASABI_BUCKET=

WASABI_URL=

Your .env should look like

Screen Shot 2020-10-17 at 06 40 37
Open config/filesystem.php, add this.

 'wasabi' => [

        `'driver' => 'wasabi',`

        `'key' => env('WASABI_ACCESS_KEY_ID'),`

        `'secret' => env('WASABI_SECRET_ACCESS_KEY'),`

        `'region' => env('WASABI_DEFAULT_REGION', 'eu-central-1'),`

        `'bucket' => env('WASABI_BUCKET'),`

        `'root' => env('WASABI_ROOT', '/'),`

        `'url' => env('WASABI_URL'),`

    `]`
Your config/filesystem.php should look like this image below. Screen Shot 2020-10-17 at 06 35 19

16. Install using aaPanel
ninacoder-info edited this page 4 days ago · 1 revision
 Pages 18
Find a page…
01. About
02. FAQ
03. Server Requirements
04. Installing AI Engine
05. Social Authorization
06. Roles and Usergroup
07. Static Pages
08. Add cron job for automatically renew subscription
09. Create And Manager Plan & Subscription
10. Fix proc_open Laravel error
11. Enable Google reCaptcha V3
12. How to move your site
13. How to setup paypal
14. Set Up Payments
15. How to setup Wasabi Cloud
Clone this wiki locally
https://github.com/ninacoder-info/ai-engine-wiki.wiki.git
To install on aaPanel please setup website like those pictures bellow

Screen Shot 2022-01-04 at 14 40 39 Screen Shot 2022-01-04 at 14 40 47
Footer
© 2023 GitHub, Inc.

17. Setup Sign In With Apple
ninacoder-info edited this page 4 days ago · 1 revision
 Pages 18
Find a page…
01. About
02. FAQ
03. Server Requirements
04. Installing AI Engine
05. Social Authorization
06. Roles and Usergroup
07. Static Pages
08. Add cron job for automatically renew subscription
09. Create And Manager Plan & Subscription
10. Fix proc_open Laravel error
11. Enable Google reCaptcha V3
12. How to move your site
13. How to setup paypal
14. Set Up Payments
15. How to setup Wasabi Cloud
Clone this wiki locally
https://github.com/ninacoder-info/ai-engine-wiki.wiki.git

Configuration
Create an App ID for your website (https://developer.apple.com/account/resources/identifiers/list/bundleId) with the following details:

Platform: iOS, tvOS, watchOS (I'm unsure if either choice has an effect for web apps)
Description: (something like "example.com app id")
Bundle ID (Explicit): com.example.id (or something similar)
Check "Sign In With Apple"
Create a Service ID for your website (https://developer.apple.com/account/resources/identifiers/list/serviceId) with the following details:

Description: (something like "example.com service id")
Identifier: com.example.service (or something similar)
Check "Sign In With Apple"
Configure "Sign In With Apple":
Primary App Id: (select the primary app id created in step 1)
Web Domain: example.com (the domain of your web site)
Return URLs: https://yoursite.com/connect/callback/apple (the route pointing to the callback method in your controller)
Click "Save".
Click the "Edit" button to edit the details of the "Sign In With Apple" configuration we just created.
If you haven't verified the domain yet, download the verification file, upload it to https://example.com/.well-known/apple-developer-domain-association.txt, and then click the "Verify" button.
Create a Private Key for your website (https://developer.apple.com/account/resources/authkeys/list) with the following details:

Key Name:
Check "Sign In With Apple"
Configure "Sign In With Apple":
Primary App ID: (select the primary app id created in step 1)
Click "Save"
Click "Continue"
Click "Register"
Click "Download"
Rename the downloaded file to key.txt
Create your app's client secret:

Install the JWT Gem:

sudo gem install jwt
Create a file called client_secret.rb to process the private key:

require 'jwt'

key_file = 'key.txt'
team_id = ''
client_id = ''
key_id = ''

ecdsa_key = OpenSSL::PKey::EC.new IO.read key_file

headers = {
'kid' => key_id
}

claims = {
    'iss' => team_id,
    'iat' => Time.now.to_i,
    'exp' => Time.now.to_i + 86400*180,
    'aud' => 'https://appleid.apple.com',
    'sub' => client_id,
}

token = JWT.encode claims, ecdsa_key, 'ES256', headers

puts token
Fill in the following fields:

team_id: This can be found on the top-right corner when logged into your Apple Developer account, right under your name.
client_id: This is the identifier from the Service Id created in step 2 above, for example com.example.service
key_id: This is the identifier of the private key created in step 3 above.
Save the file and run it from the terminal. It will spit out a JWT which is your client secret, which you will need to add to your .env file in the next step.

ruby client_secret.rb
Set the necessary environment variables in your .env file:

SIGN_IN_WITH_APPLE_REDIRECT="https://yoursite.com/connect/callback/apple"
SIGN_IN_WITH_APPLE_CLIENT_ID="your app's service id as registered with Apple"
SIGN_IN_WITH_APPLE_CLIENT_SECRET="your app's client secret as calculated in step 4"
Footer
© 2023 GitHub, Inc.
18. Upgrade your site
ninacoder-info edited this page yesterday · 2 revisions
 Pages 18
Find a page…
01. About
02. FAQ
03. Server Requirements
04. Installing AI Engine
05. Social Authorization
06. Roles and Usergroup
07. Static Pages
08. Add cron job for automatically renew subscription
09. Create And Manager Plan & Subscription
10. Fix proc_open Laravel error
11. Enable Google reCaptcha V3
12. How to move your site
13. How to setup paypal
14. Set Up Payments
15. How to setup Wasabi Cloud
Clone this wiki locally
https://github.com/ninacoder-info/ai-engine-wiki.wiki.git
Please ensure that you backup your website prior to updating it. You can utilize the Backup feature available in the admin section for this purpose.

Additionally, it is important to confirm that the php.ini max_execution_time has been set to a minimum of 300.

Automatic update
Open your site

Login to admin -> yoursite.com/admin/upgrade and follow instruction

To manually update the script, follow these steps:
Open your file manager and delete the following folders: app, bootstrap, database, resources, routes, and vendor.

Next, download the zip patch from codecanyon and extract the contents.

Take the required folders and upload them to your website. You can speed up the process by zipping the folders, uploading the zip file, and then extracting it on your site.