zenit/project

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (1.0.2) of this package.

1.0.2 2020-02-03 17:10 UTC

This package is auto-updated.

Last update: 2020-09-07 02:01:06 UTC


README

1. Initialize project

Create project with composer, and install npm dependencies:

composer create-project zenit/project yourproject
cd yourproject
npm install

2. Create the environment

Setup application domain in etc/ini/env.yml:

...
sys:
  domain: YOUR_DOMAIN
...

Add the domain to your dns or hosts file:

127.0.0.1 YOUR_DOMAIN admin.YOUR_DOMAIN www.YOUR_DOMAIN

Generate apache vhost file with the command:

./phlex vhost

This will generate the neccessary files in the var folder. The default settings are for php module. If you use fpm, then you should change the etc/ini/config/cli-vhost-generator.yml file.

Now you are ready to copy or include the generated vhost file var/virtualhost.conf into your apache config. (we recommend the include method).

Copy app/index.php file into the public folder (manually this time)!

Restart apache, and test your application in a browser: www.YOUR_DOMAIN!

3. Setup database

Create an empty database, then create first user table:

CREATE TABLE `user` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_hungarian_ci DEFAULT NULL,
  `email` varchar(255) COLLATE utf8_hungarian_ci DEFAULT NULL,
  `password` char(128) COLLATE utf8_hungarian_ci DEFAULT NULL COMMENT 'password',
  `groups` set('visitor','admin') COLLATE utf8_hungarian_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci;

Add your first user:

INSERT INTO `user` 
(`id`, `name`, `email`, `password`, `groups`)
VALUES
(1, 'Elvis Presley', 'elvis@presley.com', '$2y$10$7tdLZM0PyNxfS2G8qNGQL.tA7tsLPH/dNs/EN/X16E6L2dTqIotsS', 'admin');

Register your database in your project config: etc/ini/app/databases.yml:

default:
  user: root
  password: root
  database: YOUR_DATABASE
  host: localhost # optional
  port: 3306 # optional
  charset: utf8 # optional

4. Launch zengular build

npm run work

This will generate, and copy some files into the public folder.

5. Let's codex

Open admin.YOUR_DOMAIN in a browser. The login is: elvis@presley.com, the password is: vegas. If it's working, you are done with the installation.