Guy Mograbi edited this page Apr 2, 2016 · 54 revisions

LerGO

Welcome, LerGO developers!
LerGO is an open-source educational project, developed under the the AGPL v3 license.

This page will describe the necessary steps one should make in order to become a LerGO volunteer developer.
Please don't hesitate to ask questions, suggest improvements, or even improve by yourself, this or any other page in this wiki.

Important URLs

First, a list of URLs that we use:

  1. The live website is http://www.lergo.org. Make sure to have a user in the system.
  2. Version Control: We manage our code on GitHub, here are the repositories: LerGO Frontend and LerGO Backend. The main page can be found here.
  3. Issue Tracking: We manage the project's issues on JIRA. If you don't have a user, create one here.
  4. CI: The projects is continuously integrated using CloudBees. Instructions to connecting to the CI machine can be found here.
  5. Discussions: Handled with Google Groups.
  6. Some project sensitive information is documented in http://wiki.lergodev.info. You'll have to request permissions in order to read that, there we store certificates and etc.

Contributing to LerGO

  1. Make sure to have accounts on GitHub and JIRA.
  2. Fork and clone LerGO UI and the backend (Check the detailed instructions in "Prepare the Environment").
  3. Prepare the environment (see below).
  4. Run the code (see below).
  5. We are using git-flow to manage the code life cycle. The feature branch should be named by the convention "lergo-XX-description", where "XX" is the JIRA issue #, eg. "lergo-49-user-forgets-pass". Also, please make sure to branch from the develop, which is the most updated branch (according to git-flow).
  6. Once you're ready to fire, grab a ticket from JIRA and get going :smiley:
  7. Don't forget to follow our coding guidelines :point_up:.
  8. Done coding? Issue a pull request and we will integrate your code.

Prepare the Environment

This page describe the steps necessary to take in order to prepare the local developer environment.

  1. Install Ruby 1.8.7 (required for compass)
  2. Install Node.js
  3. Run "npm install -g yo" . This is a framework for creating/building/running Node projects. It uses:
  4. Yeoman for creating new files.
  5. Grunt for building
  6. Bower for front end dependencies
  7. Run "npm install -g generator-angular"
  8. This will install Yeoman's Angular generator that we use for the project.
  9. yo angular:controller SomeName
  10. yo angular:view somePage
  11. yo angular:service SomeService
  12. Go to "lergo-ri" and
  13. Run "npm install" (This will install the dependencies for the project using "Node Package Manager". (npm))
  14. Run "npm uninstall express" and then "npm install express@3.8.0" (Downgrade Express).
  15. Run "git submodule init"
  16. Run "git submodule update"
  17. Under lergo-ri, create file "me.json" under "conf/dev" (so it would be "lergo-ri/conf/dev/me.json", with content similar to the file "conf/prod.json". Fill in the necessary details. Note that except for dbUrl, all the variables don't really matter, so you can fill whatever you want (e.g., hmacKey: "blabla").
  18. Under lergo-ri, create file "meConf.js" under "conf/dev" (so it would be "lergo-ri/conf/dev/meConf.js", with the following sample content (fill in the necessary details):
exports.cookieSessionSecret = 'Some arbitrary string that will be used as a session secret';
exports.dbUrl = 'mongodb://localhost';
exports.emailConfService = 'Gmail';
exports.emailConfUser =  'username@gmail.com';
exports.emailConfPass = 'DummyPassword';

IMPORTANT NOTE: The configuration is subject to changes, so if you get an error in the form of:

/home/ubuntu/lergo/lergo-ri/backend/managers/ConfManager.js:76
                        throw new Error('undefined configuration [' + i + ']');
                              ^
Error: undefined configuration [emailConfService]
    at Object.<anonymous> (/home/ubuntu/lergo/lergo-ri/backend/managers/ConfManager.js:76:10)
    at Module._compile (module.js:456:26)

Then check the current property names of the variable privateConfiguration in the file ConfManager.js, and match them in meConf.js. The email and password aren't really used right now, so you can fill in some garbage.

  1. Go to "lergo-ui"
  2. Run "gem uninstall sass" and then "gem install sass --version 3.2.18" (sudo is needed in Linux\OS X. Also, We first uninstall sass so compass would install an older version of sass. See this Stack Overflow discussion)
  3. Run "gem install compass --version 0.12.2" (version 0.12.2 is important as later versions have an error on Windows!)
  4. Run "npm install"
  5. Run "bower install" (Just like npm install but for front-end dependencies)
  6. Install mongodb
  7. Make sure mongodb in running when you work (execute mongod, you might need to create /data/db or C:\data\db before that).

Run the code

Running from command line

  1. Install Node
  2. Go to project lergo-ri.
  3. Run command "node server.js"
  4. Go to project lergo-ui
  5. Run the command "grunt server"

Running from IDE

Running from Intellij

  1. Install "node" plugin
  2. Edit run configuration
  3. Create new node configuration
  4. Point to node executable if needed
  5. Point to server.js file.
  6. Run "play".

Coding Guidelines

  1. Please adhere to conventions.
  2. Follow open source development guidelines - see below under License.
  3. Have your code thoroughly tested.
  4. Strings: All static strings should be internationalized, even if you only "translate" them to English. To see examples, look at the files in lergo-ui/app/translations, and one of the HTML files which uses the translations (ie. {{ 'some.object.path.and.property' | i18n }}). If you choose to leave out certain languages, please report the missing languages in the pull request.

License

  • LerGO is an open-source educational project, run by the nonprofit organisation LerGO-Educate Yourself (R.A.) and developed under the the AGPL v3 license. The LICENSE.txt file explains LerGO's license.
  • By contributing code, you acknowledge that you are aware that this is an open source project, and that the contributed changes were either developed by yourself or is an imported component from other projects licensed under compatible Free and Open Source, or Free Culture, licenses (e.g. MIT, Apache, etc.).
  • In case you need to import a component from other projects licensed under open source Free and Open Source, or Free Culture, licenses, please specify the details of their licensing information in those components.
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.