Welcome in the CoderDojo Nederland Website repository. The website is completely open source which means anybody can contribute to it. We welcome everybody to do so and send us a pull request to bring it into master and have it deployed. In order to do so, here are the basics you need to know.
We keep track of stuff to do in the GitHub Issue list. Here you can mainly see 2 different categories; Bugs & Ideas. Both can either be reported or accepted. The accepted ones are ready to be picked up, the reported ones are ready to be discussed and then accepted / rejected.
Some ground rules
- Keep all commits, comments, descriptions, etc. in English
- Fork the Repo and send a pull request
- Always add a description in your pull request
- Use the labels (
Work In Progress
,Ready For Review
,Ready For Merge
,Needs Work
) - Make sure you write according unit tests to your code
- We stick with PSR-2 as much as possible
Once your PR has been reviewed and approved it will be merged and deployed to production.
There are 2 options to work on this project locally:
The easy way is to use the Vagrant setup we have provided. This is a predefined virtual ubuntu machine which will run in de background and has everything you need. You just need to follow these 4 easy steps:
- Install Virtual Box
- Install Vagrant*
- Add
127.0.0.1 coderdojo.local
to your hosts file (see how) - From the root of the project directory run
vagrant up
(the first time can take a while, grab a coffee) - Open your browser and go to https://coderdojo.local:4433
That's it! You should now be looking at de dev version of the website.
From here on you can just work on the the project, all files are automatically synced between your local filesystem and the virtual box. If you need to run commands on the vagrant box you can easily log in with the vagrant ssh
command.
*) Please be aware that the vagrant box uses 1GB ram when running. You can easily stop it when you are done with vagrant suspend
.
In order to develop on the website locally you need to have a couple of things up and running:
- PHP 7.1 (minimum)
- MySQL
- Apache
Next you will need to install a few dependencies for this project:
As you might have noticed, we run on Symfony (2.7 at the moment).
Please make sure to refer to the Symfony Documentation for basic knowledge of the system.
First you fork the repo and clone it to your computer. Once you have it enter de root directory on your terminal. The first step is to install all dependencies by running composer.
composer install --no-scripts
At the end of the process this will ask you to also define some parameters. Fill in the database host, port, name, user and password according to you local database environment. The email settings can be left default (unless you need to test emails) and for the secret just type a random string.
Now make sure the following directories are writable by apache:
- app/cache
- app/logs
Now you can fill the database with dummy data to work with:
php bin/console doctrine:fixtures:load
And you install assets:
php bin/console cache:clear
php bin/console assetic:dump
php bin/console assets:install --symlink
Now finally make sure apache uses the web
directory as root and open the site in your browser:
https://localhost/app_dev.php
Note how you open /app_dev.php
, this adds extra debug features
For questions feel free to contact @ChristianVermeulen.