UnifiedTransform — Getting Started in 2021

Ikechi Michael
4 min readJul 29, 2021

--

A guide to setting up the UnifiedTransform project on Windows 10 without Docker, in 2021.

Prerequisites

Be sure to have php, composer and mariadb, setup on your computer.

Installing php 7.3 on Windows (ref: Jeff Geerling’s Blog)

  1. Install the Visual C++ Redistributable for Visual Studio 2015 — this is linked in the sidebar of the PHP for Windows Download page, but it’s kind of hidden. If you don’t do this, you’ll run into a rather cryptic error message, VCRUNTIME140.DLL was not found, and php commands won't work.
  2. Download PHP for Windows. I got the zipped 7.3 VC15 x64 Non Thread Safe version.
  3. Expand the zip file into the path C:\PHP7
  4. In the C:\PHP7 folder, rename the file php.ini-development to php.ini.
  5. Open php.ini in a text editor
  6. Change memory_limit from 128M to 1G
  7. Remove the preceding semi-colon from the following lines:
; extension_dir = "ext"
extension=curl
extension=fileinfo
extension=gd2
extension=mbstring
extension=openssl
extension=pdo_mysql
extension=pdo_sqlite
extension=sockets

8. Save the changes to the php.ini file

9. Add C:\PHP7 to your PATHenvironment variable

10. Restart your Terminal, and run php -v

You should see something like this 🎉

Installing composer on Windows

Use the Windows Installer on the Composer Download page.

Installing mariadb on Windows

  1. Go to the Maria DB Download page
  2. Choose your OS from the dropdown. My OS is MS Windows (64-Bit)
  3. Download and Install
  4. Take note of the root password you specified during installation. It’ll be useful later

Setup mariadb data for the UnifiedTransform project

MariaDB comes with a GUI program called HeidiSQL. We can use that to create our unified_transform_db database, and unified_transform_user user.

  1. Start HeidiSQL and enter the mariadb root password.

2. Open the Database Creation prompt

3. Create the unified_transform_db database

4. Open Tools > User Manager

  • Click Add
  • Enter Username: unified_transform_user
  • Enter Password: super_secret_password
  • Repeat Password
  • Click Add Object
  • Select the unified_transform_db database
  • Tick the checkbox beside Database: unified_transform_db , and Save

Setup UnifiedTransform project

  1. Clone the repository
git clone https://github.com/changeweb/Unifiedtransform

2. Copy .env.example file to.env

3. Run composer install

Takes a while

4. Edit the database connection configuration in .env file

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=unified_transform_db
DB_USERNAME=unified_transform_user
DB_PASSWORD=super_secret_password

5. Edit the UsersTableSeeder.php file to replace the hasib user entry with:

DB::table('users')->insert([
'name' => "superadmin",
'email' => 'superadmin@example.com',
'password' => bcrypt('secret'),
'role' => 'master',
'student_code' => 0000000,
'active' => 1,
'verified' => 1,
]);

You can change superadmin to your preferred name and email, and the secret password to one you prefer.

6. Migrate your Database with php artisan migrate

7. Seed your Database with php artisan db:seed

8. In app/Http/Kernel.php, you might want to uncomment the following lines to improve the page speed:

//\RenatoMarinho\LaravelPageSpeed\Middleware\InlineCss::class,
//\RenatoMarinho\LaravelPageSpeed\Middleware\ElideAttributes::class,
//\RenatoMarinho\LaravelPageSpeed\Middleware\InsertDNSPrefetch::class,
//\RenatoMarinho\LaravelPageSpeed\Middleware\RemoveComments::class,
//\RenatoMarinho\LaravelPageSpeed\Middleware\TrimUrls::class,
//\RenatoMarinho\LaravelPageSpeed\Middleware\RemoveQuotes::class,
//\RenatoMarinho\LaravelPageSpeed\Middleware\CollapseWhitespace::class,

9. In AppServiceProvider.php, you can comment out this line:

// $this->app->register(\Barryvdh\Debugbar\ServiceProvider::class);

Build the Front End

  1. Open an Administrator PowerShell prompt, and run:
npm install --global windows-build-tools

2. In Windows Explorer, navigate to

%USERPROFILE%\.windows-build-tools\python27

Copy python.exe to python2.exe

3. In the UnifiedTransform directory, run:

npm install

4. Build the frontend with:

npm run development

Let’s run the project:

In the UnifiedTransform directory, run:

php artisan serve

Visit http://localhost:8080 in your browser

Click Login

Login with the Super Admin credentials

Enjoy the UnifiedTransform project!

--

--

Ikechi Michael
Ikechi Michael

Written by Ikechi Michael

I’ve learned I don’t know anything. I've also learned that people will pay for what I know. Maybe that's why they never pay.

No responses yet