git clone https://github.com/phpsrbija/unfinished.git
cd unfinished
vagrant up
open file /etc/hosts and at the end add one line:
192.168.33.3 unfinished.dev
Open in your browser http://unfinished.dev and voila!
Admin is at http://unfinished.dev/admin
user: [email protected]
pass: testtest
Packages, packages and packages...
Main goal is to break all code to fully separated packages with no dependencies. If some package have dependence with other that should relay in composer.json For eg. article can have dependence from category package.
Such a way will lead us to easier:
- Adding new features as separated package (scale by team)
- Replace or refactor some functionality or whole package - not whole app
- Software versioning - Versioning of functionality through package versioning
- News Letter
- Contact Us
- Media (for images, admin)
- User (for web users)
-
Refactor and extend Admin packages. Wee need to have:
- Admin package (very tiny, hold only layout.phtm with navigation config)
- AdminUser package
- AdminPermissions package
-
Pull apart current Article package into separated packages per article type, allowing easy to add/remove type
- PostArticle,
- VideoArticle,
- EventArticle,
- DiscussionArticle
-
Introduce Entities and Hydration (as in Page package)
- Switch current Zend-Router router with FastRoute
- Move all packages in separate repository (main repo need to have install process)
- Scale images during upload process; change upload lib.
- Better naming of variables/functions & write the documentation
- Devops things as well as rise up code coverage with Unit testing
- Better handling exceptions per package
The local development is meant to be used in a vagrant provisioned box.
The provisioner for the project is ansible.
Once you have the prerequisites setup, you can run the
vagrant up
from you terminal to start the process up.
If you do not see an error message, go get yourself a cup of coffee or your favorite beverage, you deserve it.
If you start seeing the connection timeout after adding of the private key
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
You should open up the Virtualbox, click the vm running (name should be along the lines of 4cinc-thinkfasttoys....) and reset it (on OSX it is cmd+t). This is due to some weird bug somewhere on intersection of vagrant, virtualbox and this ubuntu cloud image. After the initial virtual machine build, you will not need to use this.
If you are not already in vagrant, ssh into the Vagrant box by running from you terminal
vagrant ssh
Once you are in Vagrant box shell, change to the project root directory by running from you terminal
cd /var/www/unfinished
When you need to debug something, and var_dump just does not cut it (and it never should), you can use XDebug remote debugging abilities to step debug through the problem. Xdebug has been installed, and has been configured for remote debugging.
Your debugger should listen for ide key: vagrant-xdebug
For PHPStorm setup follow the PHP Remote Debug instructions, and set the ide key to vagrant-xdebug
.
If you prefer standalone debuggers take a look at awesome pugdebug by Robert Basic
You have a local mysql database setup, the db name is unfinished
, the user is dev
the password is dev
.
For convenience Mailhog has been setup, so any and all email should be send to the local mailhog
server during development.
To send emails to mailhog, use 127.0.0.1
as smtp/mailer host, and use port 1025 in your config
When you need to access the mailhog web ui, you need to open url http://192.168.33.11:8025
in your browser
For convenience, Redis has also been setup, you can access it from you vagrant box by executing redis-cli