-A github account where your exercises repository will be stored [https://github.com/](https://github.com/).
-A dockerHub account [https://hub.docker.com/](https://hub.docker.com/).
## I- SETUP OF YOUR GUTHUB REPOSITORY THRU A FORK
Instead of starting with an empty repository, for the very first time we recommend forking the official [public](https://github.com/01-edu/public). repository.
The advantages of this way:
This will give you a base to work on regarding the file architecture of an exercise repository with examples.
You will also be able to customize already existing exercises to your needs.
With just a quick modification the repo will be ready to be linked.
- Inside this folder create a folder called what you wish (example: `firstproject`)
- Inside the folder `firstproject` create a `README.md` file which you will use as the subject content of your first project
- After the subject content `README.md` is created, create a folder `audit` inside the `firstproject` directory
- Inside the `audit` folder create a `README.md` that respect the audit type of file. We advise you to take an example such as the
ascii-art audit `README.md` file. Here is the [link](https://raw.githubusercontent.com/01-edu/public/master/subjects/ascii-art/audit/README.md) to the raw file.
- Once all those files are done, git push them to your new repository
- Once both those path are noted, create your project on your server.
- Add the regular attributes (`groupMin`, `groupMax`, `language`, `exerciseType`)
- Add the optional attributes to test if your wish (`auditsRatio`, `auditsRequired`) both set to 1
- And add the `audit` and `subject` attributes (of type `string`) with the previously noted paths
Once the attributes are filled.
- Create a module, called `Div-custom` for example. Add its standard attributes.
- Add `firstproject` as a child to `Div-custom`.
**Note**: If you do not wish students from other events to be selected for matches in this new event.
in the children attributes of the module,
- Add `matchWhere` as a `FUNCTION`
- Set its value to `USERINEVENT`
This attribute will isole the event during matches to the user of the event.
- Add this `Div-custom` as a child in your campus object
- Go to event, and launch the event `yourcampus/Div-custom`
- Add yourself and other testing accounts to the newly launched event.
- Test your subject by creating a group and launching an audit.
If the paths are correctly inputed and your repository is correctly publicly published on gitHub pages, you will see your subject and your audit in the platform.
- 5. Once the build is complete (it can take 5 to 15 mins). Go back to the attributes of the exercise,
Add the attribute **testImage (type string)**
Fill it with the name of the repository,
**In this example: frenchris/test**
- 6. Once your exercise has both the attributes completed correctly, the exercise is viable and can be tested on the server which was selected for its addition.
- 7. As a reminder to test the exercise it is suggested to follow these steps:
a. `Create` a custom `Quest-test` object
b. `Adding` the new `exercise` object as a child to the newly created `Quest-test` object
c. `Create` a `Piscine-test` object
d. `Adding` the new `Quest-test` as a child to the newly created `Piscine-test` object
e. `Adding` the `Piscine-test` to the `campus` object as **first child**
f. Go to the event page and launch the newly created `Piscine-test`. (You may need to refresh the page 2-3 times before the `campus/Piscine-test` option appears)
g. Once the event is launched, use the event page to add yourself as a student in the launched event `Piscine-test`
h. You can now try the exercise. If everything is well set, the subject should be loaded and, when you submit a correct solution, the exercise should pass.