Documentation for CakePHP version of Rizz
Structure
When you extract the zip file you received after purchasing, you will find the following files and folders:
├── bin
├── config
│ ├── app_local.php
│ ├── app.php
│ ├── routes.php
│ └── other configuration files
├── src
│ └── Controller
│ ├── AppController.php
│ ├── PagesController.php
│ └── UsersController.php
├── templates
│ ├── elements
│ │ └── reusable PHP files
│ ├── Pages
│ │ └── all the PHP files
│ └── Users
│ └── login.php
├── webroot
│ └── source
│ ├── data
│ ├── fonts
│ ├── images
│ ├── js
│ └── scss
├── bun.lockb
├── composer.json
├── composer.lock
├── gulpfile.js - containing gulp tasks
├── package-lock.json
├── package.json
└── yarn.lock
Prerequisites
Please follow below steps to install and setup all prerequisites:
-
PHP~v8.0
-
Composer
Make sure you have the Composer installed & running on your computer. If you already have installed Composer on your computer, you can skip this step.
Download Composer -
Node.js
In order to use build tools you will need to download and install Node.js. If you do not have Node.js installed already, you can get it by downloading the package installer from the official website. Please download the stable version of Node.js (LTS).
Download Node.js -
Gulp
Make sure to have the Gulp installed & running in your computer. If you already have installed gulp on your computer, you can skip this step. In order to install, just run command
npm install -g gulpfrom your terminal. -
SQLite3 (For Windows)
Open the download page SQLite and download command-line tools file for your operating system.
-
Xampp (For Windows)
Make sure to have the latest version of xampp or installed & running on your computer. If you already have installed Xampp on your computer, you can skip this step.
Installation
To setup, follow the below mentioned steps:
You can run the following commands to run project locally or build for production use:
You can run this app following package manager: Bun, Yarn or NPM
1. Bun
If you don't have bun installed on your PC, use the npm i
-g bun or sudo npm i -g
bun to install
| Command | Description |
|---|---|
bun i |
This would install all required dependencies
in node_modules folder.
|
gulp
|
This would compile all the resources from webroot/source
folder to webroot folder.
|
bun run build
|
It bundles with production mode. Your app is now ready to be deployed. |
2. Yarn
If you don't have yarn installed on your PC, use the next
command npm i -g yarn or sudo npm i -g yarn
| Command | Description |
|---|---|
yarn |
This would install all required dependencies
in node_modules folder.
|
gulp
|
This would compile all the resources from webroot/source
folder to webroot folder.
|
yarn build
|
It bundles with production mode. Your app is now ready to be deployed. |
3. NPM
npm comes preinstalled when you install Nodejs
| Command | Description |
|---|---|
npm i or npm i --force |
This would install all required dependencies in node_modules
folder.
|
gulp
|
This would compile all the resources from webroot/source
folder to webroot folder.
|
npm run build
|
It bundles with production mode. Your app is now ready to be deployed. |
To spin up the CakePHP development server, follow the below mentioned steps in a separate terminal:
| Command | Description |
|---|---|
composer i |
This will install all required dependencies in
vendor folder.
|
bin/cake migrations migrate |
This will execute all pending migrations to database. |
bin/cake migrations seed |
This will seed database with data after it's created |
bin/cake server |
Runs the project locally, starts the development server |
sudo chmod +x bin/cake to give bin/cake
permission for execution.