NRGI can be cloned from github repository and installed. Following the procedure given below:
- git clone https://github.com/NRGI/resourcecontracts.org
- cd resourcecontracts.org
127.0.0.1 resourcecontracts.devto your
- change your apache host file
- restart apache server
The app can be run with the command below:
- install the application dependencies using command:
- copy .env.example to .env and update your the database configurations
- give write permission to the storage folder using
chmod -R 777 storage
- run migration using
php artisan migrate
- seed dummy data using
php artisan db:seed
- make a directory
publicand give write permission to it
The application is written in PHP based on the Laravel framework, current version of Laravel used for this project is 5.
Tools and packages
Some major PHP packages used are listed below:
- zizaco/entrust - for user roles and permission
The application is structured in a very simple way in
Nrgi folder contains other 3 folders
- Repositories: Contains all the classes for storage and retrival from database.
- Entities: Contains all the eloquent model classes.
- Services: Contains the classes which serves as the intermediate for Controllers and Repositories. All the application logic are handled here. Logger is also implemented inside services. The purpose of using services is to keep our controllers slim.
Classes inside each of the above directories are properly written within corresponding modules namespace.
Check code quality
We follow PSR-2 for coding standard
We follow PSR-2
For this project we use
php unit tests using
PHPUnit framework integrated with Shippable CI.
phpunit or ./bin/vendor/phpunit
We use Elastic Beanstalk CLI.
Copyright and license
Code copyright Natural Resource Governance Institute. Code released under the MIT license