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
- add
127.0.0.1 resourcecontracts.dev
to your/etc/hosts
file - change your apache host file
- restart apache server
The app can be run with the command below:
- install the application dependencies using command:
composer install
- 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
uploads
insidepublic
and give write permission to it - access
http://resourcecontracts.dev
The application is written in PHP based on the Laravel framework, current version of Laravel used for this project is 5.
This application uses many tools and packages, the packages can be seen in the composer.json file and javascript packages are listed in the package.json file.
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 app\Nrgi
folder.
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.
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.
For any queries and support, you may either create a github issue or send us an email at resourcecontracts@yipl.com.np
Code copyright Natural Resource Governance Institute. Code released under the MIT license