UnifiedTransform — Getting Started in 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)
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
, andphp
commands won't work.Download PHP for Windows. I got the zipped 7.3 VC15 x64 Non Thread Safe version.
Expand the zip file into the path
C:\PHP7
In the
C:\PHP7
folder, rename the filephp.ini-development
tophp.ini
.Open
php.ini
in a text editorChange
memory_limit
from128M
to1G
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
Save the changes to the
php.ini
fileAdd
C:\PHP7
to your[PATH
environment variable](https://www.c-sharpcorner.com/article/add-a-directory-to-path-environment-variable-in-windows-10/)Restart your Terminal, and run
php -v
Installing composer on Windows
Use the Windows Installer on the Composer Download page.
Installing mariadb on Windows
Go to the Maria DB Download page
Choose your OS from the dropdown. My OS is
MS Windows (64-Bit)
Download and Install
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.
- Start HeidiSQL and enter the mariadb root password.
- Open the Database Creation prompt
- Create the
unified_transform_db
database
- 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
databaseTick the checkbox beside
Database: unified_transform_db
, and Save
Setup UnifiedTransform project
git clone https://github.com/changeweb/Unifiedtransform
Copy
.env.example
file to.env
Run
composer install
- 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
- Edit the
UsersTableSeeder.php
file to replace thehasib
user entry with:
DB::table('users')->insert([
'name' => "superadmin",
'email' => '[email protected]',
'password' => bcrypt('secret'),
'role' => 'master',
'student_code' => 0000000,
'active' => 1,
'verified' => 1,
]);
You can change
superadmin
to your preferred name and email, and thesecret
password to one you prefer.
Migrate your Database with
php artisan migrate
Seed your Database with
php artisan db:seed
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,
- In
AppServiceProvider.php
, you can comment out this line:
// $this->app->register(\Barryvdh\Debugbar\ServiceProvider::class);
Build the Front End
- Open an Administrator PowerShell prompt, and run:
npm install --global windows-build-tools
- In Windows Explorer, navigate to
%USERPROFILE%\.windows-build-tools\python27
Copy python.exe
to python2.exe
- In the
UnifiedTransform
directory, run:
npm install
- 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!