Skip to content

The code powering code.org and studio.code.org

Notifications You must be signed in to change notification settings

IslandJS/code-dot-org

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build setup

Windows note: use an Ubuntu VM

Many Windows developers have found that setting up an Ubuntu virtual machine is less painful than getting Ruby and other prerequisites running on Windows.

Install OS-specific prerequisites

OS X Mavericks

  1. Install Homebrew: ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
  2. brew install https://raw.github.com/quantiverge/homebrew-binary/pdftk/pdftk.rb enscript gs mysql imagemagick rbenv ruby-build
  3. If it complains about an old version of X, run brew unlink X and run brew install X again
  4. Set up MySQL
  5. Have launchd start mysql at login: ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
  6. Start mysql now: launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
  7. Set up RBENV and Ruby 2.0
  8. Add if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi to ~/.profile
  9. source ~/.profile
  10. rbenv install 2.0.0-p451
  11. rbenv global 2.0.0-p451
  12. rbenv rehash

Ubuntu 14.04

  1. sudo aptitude update
  2. sudo aptitude upgrade
  3. sudo aptitude install -y git mysql-server mysql-client libmysqlclient-dev libxslt1-dev libssl-dev zlib1g-dev imagemagick libmagickcore-dev libmagickwand-dev nodejs openjdk-7-jre-headless libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev curl
  • Hit enter and select default options for any configuration popups
  1. sudo aptitude install npm
  2. sudo ln -s /usr/bin/nodejs /usr/bin/node
  3. sudo npm update -g npm
  4. sudo npm install -g grunt-cli

Common setup

  1. git clone https://github.com/code-dot-org/code-dot-org.git
  2. gem install bundler
  3. cd code-dot-org/aws
  4. bundle install
  5. cd ../dashboard
  6. bundle install
  7. bundle exec rake db:create db:schema:load seed:all
  8. cd ../pegasus
  9. bundle install
  10. echo CREATE DATABASE pegasus_development | mysql -uroot
  11. rake db:migrate
  12. rake seed:migrate

Organizational Structure

Our code is segmented into four parts:

  • Blockly Core is the visual programming language platform used for the interactive tutorials.
  • Blockly includes apps—blockly puzzles built based on Blockly Core.
  • Dashboard, is the tutorial platform which organizes blockly levels into tutorials.
  • Pegasus is the main site which also includes the teacher dashboard (support for teachers to track student progress).

Running Dashboard

  1. cd code-dot-org
  2. rake build:dashboard
  3. bin/dashboard-server
  4. Visit http://localhost.studio.code.org:3000/

Running Pegasus

  1. cd code-dot-org
  2. rake build:pegasus
  3. bin/pegasus-server
  4. Visit http://localhost.code.org:9393/

Building Blockly and Blockly-core (optional)

The learn.code.org default dashboard install includes a static build of blockly, but if you want to make modifications to blockly or blockly-core:

  1. cd code-dot-org/dashboard
  2. bundle exec rake 'blockly:dev[../blockly]'
  • This symlinks to dashboard reference the dev version of blockly
  1. Follow the blockly build instructions at blockly/README or blockly-core build instructions at blockly-core/README

Contributing

We'd love to have you join our group of contributors!

Before You Push

Anyone who would like to contribute to code.org projects must read and sign the Contribution License Agreement. We aren't able to accept any pull requests from contributors who haven't signed the CLA first.

For the time being—email brian@code.org to get an electronic CLA to sign (takes less than a minute).

Getting Started Contributing

HipChat room

Join our community development HipChat room for help getting set up, picking a task, etc. We're happy to have you!

If you want to make sure you get our attention, include an @all (everyone) or @here (everyone currently in the room) in your message.

Contribution ideas

We maintain a Pivotal Tracker board with volunteer-friendly bug tasks, project ideas and small infrastructure/code quality opportunities here: https://www.pivotaltracker.com/n/projects/1192642

If you'd like to grab a task, have ideas for projects or want to discuss an item, email brian@code.org for a board invite.

Submitting Contributions

Testing your changes

Manually

We support recent versions of Firefox, Chrome, IE9, iOS Safari and the Android browsers. Be sure to try your feature out in IE9, iOS and Android if it's a risk. BrowserStack live or Sauce Labs manual let you run manual tests in these browsers remotely.

Unit tests

For dashboard changes, be sure to test your changes using rake test. For blockly changes, see our grunt testing instructions.

UI tests

Our continuous integration server regularly runs a suite of UI tests using Selenium / Cucumber which run against many browsers via BrowserStack Automate, and can also be run locally using chromedriver. See the README in that folder for instructions.

If your changes might affect level paths, blockly UI, or critical path site logic, be sure to test your changes with a local UI test.

Submitting your Pull Request

Contributors should follow the GitHub fork-and-pull model to submit pull requests into this repository.

  1. On your fork, you'll either push to your own finished branch or checkout a new branch for your feature before you start your feature
    • git checkout -b branch_name
  2. Develop the new feature and push the changes to your fork and branch
    • git add YYY
    • git commit -m "ZZZ"
    • git push origin branch_name
  3. Go to the code-dot-org GitHub page
  4. For your submissinon to be reviewed
    • Click on the "Pull Request" link, look over and confirm your diff
    • Submit a pull request for your branch to be merged into staging
    • For bonus points, include screenshots in the description. Command + Ctrl + Shift + 4 in OS X lets you copy a screen selection to your clipboard, which GitHub will let you paste right into the description
  5. After your pull request is merged into staging, you can review your changes on the following sites:

About

The code powering code.org and studio.code.org

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 98.7%
  • CSS 0.8%
  • Ruby 0.3%
  • PHP 0.2%
  • Python 0.0%
  • Racket 0.0%