View Demo · Report Bug · Request New Feature
This document helps the contributor to understand the high level understanding of the project and setup the development environment into their machine. This is intended for the developers.
A wiki system that solves the critical liabilities of Wikipedia. It solves petty "edit wars" by providing contributors the ability to create and join camps and present their views without having them immediately erased. It also provides ways to standardise definitions and vocabulary, especially important in new fields.
The application is designed based on SOA (Service Oriented Architectue), where all the different component of the system treated as a service and accessible by the RESTFull api. Please follow the link for high level architecture and design.
Most of the long running jobs are implemented through events and jobs. Application uses the events and jobs provided by the Lumen framework. There are two types of tasks which is implemented by events and jobs.
Please refer the link to see the implementation and configuration.
Prerequisites
NOTE: You can install MAMP (MacOS), LAMP (Linux), or XAMPP (Windows) software depending upon the OS. Make sure above extensions have to be enabled.
Installation
Canonizer can be setup in two different ways, either using docker or locally.
On local machine
Following are the steps to setup the project locally
Clone the repository inside any folder in the system
git clone git@github.com:the-canonizer/canonizer-3.0-api.git
Change directory to project's root directory
cd canonizer-3.0-api
Install dependent packages using composer
composer install
Create a copy of .env.example named as .env in the project's root directory
cp .env.example .env
Update the enviroment variable of .env file
Generate application key
php artisan generate:key
Create a MySQL database. Make sure the name should be same as mentioned in the .env file
Run the migration
php artisan migrate
Clear the cache
php artisan cache:clear
Configure virtual host of Apache2 server
Listen 80
ServerName localhost
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "<absolute path project directory>/canonizer-3.0-api/public"
ServerName canonizer3.local
ErrorLog "/opt/homebrew/var/log/httpd/dummy-host2.example.com-error_log"
CustomLog "/opt/homebrew/var/log/httpd/dummy-host2.example.com-access_log" common
</VirtualHost>
127.0.0.1 canonizer3.local
sudo service apache2 restart
Docker
Following are the steps to setup the project using Docker
docker-compose up --build
docker exec -it canonizer_api
The above command will display the prompt of the canonizer_api container. Execute the below command from the prompt
> cd /opt/canonizer/
> composer install
> php artisan migrate
> php artisan cache:clear
http://canonizer3.local
http://localhost:8000
Lumen (8.3.4) (Laravel Components ^8.0)
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please clone the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
Go to the project root folder ie. canonizer-3.0-api
git checkout development && git pull origin development
git checkout -b <branch name>
git status [Optional, This is just to verify you are on the same branch that you just created]
Once the changes have been done, make sure to add the new files that have created. Provide a suitable message on every commit. This helps other to understand the changes applied on a specific commit.
git add -A
git commit -m "<message>"
Before pushing any changes to the remote repository, please take a pull of the latest changes of the base branch. If there is any conflict then resolve it first and again commit the changes and then push.
git pull origin development
git commit -am "<message>" [Optional, only required if any conflicts]
git push -u origin <branch name>
Login to the github.com and select the repository canonizer-3.0-api. After that follow the below instruction
Update the exiting test cases if required or create a new test case for any new functionality. Before any pushing the changes, please verify that all the test cases are successfully passed. Run the below command from the project's root directory.
./vendor/bin/phpunit
For all the test functions a specific file
./vendor/bin/phpunit --filter "<test case file name>"
php artisan migrate
php artisan migrate --path <file path>
php artisan db:seed
php artisan db:seed --class=<seeder class name>
sudo supervisorctl status
sudo supervisorctl start all
sudo supervisorctl stop all
sudo supervisorctl restart all
Lesser MIT License
Copyright (c) 2006-2023 Canonizer.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software with minimal restriction, including without limitation the rights to use, copy, modify, merge, publish, and distribute copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Any activity arising from use under this license must maintain compliance with all related and dependent licensees.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Brent Allsop - @Brent's_twitter - brent.allsop@gmail.com
Project Link: https://canonizer.com