With ScratchJr, young children (ages 5-7) can program their own interactive stories and games.
Find a file
Tim Mickel 65d81e66e8 Merge pull request #9 from tmickel/android-webpack-fixes
Fix JS incompatibilities in Android webview
2016-02-08 13:04:36 -05:00
.idea Initial commit 2016-01-08 14:31:04 -05:00
.settings Initial commit 2016-01-08 14:31:04 -05:00
android Merge pull request #5 from tmickel/modules 2016-02-03 15:26:32 -05:00
bin Updating bundle-compile.sh and adding gradle task 2016-02-03 14:13:32 -05:00
doc Initial commit 2016-01-08 14:31:04 -05:00
editions/free Add config for disabling the lobby settings page 2016-02-03 15:51:16 -05:00
ios Add npm build to free edition XCode project 2016-02-03 12:03:27 -05:00
src Remove for-of loop which requires Symbol polyfill 2016-02-08 12:43:12 -05:00
.esformatter Initial commit 2016-01-08 14:31:04 -05:00
.eslintignore Ignore linting for bundles 2016-01-21 15:37:55 -05:00
.eslintrc Asynchronous loading of MediaLib 2016-01-22 16:19:51 -05:00
.gitignore Adding JavaScript build directory to .gitignore 2016-01-13 14:54:16 -05:00
.project Initial commit 2016-01-08 14:31:04 -05:00
package.json Bumping version codes to 1.2.0 2016-02-03 15:00:55 -05:00
README.md Initial commit 2016-01-08 14:31:04 -05:00
webpack.config.js Merge entry-points and bundles for editor, home, index 2016-01-22 16:20:18 -05:00

Overview

This is the official git repository hosting the source code for the ScratchJr project.

ScratchJr cannot be copied and/or distributed without the express permission of the Massachusetts Institute of Technology (MIT). You should only access this repository if you have been given explicit permission from MIT.

ScratchJr can be built both on iOS and Android. A pure-web version or Chrome-app version is planned to follow at some point in the future.

Platform Status
iOS Released in App Store
Android Released in Google Play

Release Schedule

As of this writing, the Android version now supports Android 4.2 and above.

Architecture Overview

The diagram below illustrates the architecture of ScratchJr and how the iOS (functional), Android (functional) and pure HTML5 (future) versions share a common client.

Scratch Jr. Architecture Diagram

Directory Structure and Projects

This repository has the following directory structure:

  • src/ - Shared Javasript code for iOS and Android common client. This is where most changes should be made for features, bug fixes, UI, etc.
  • editions/ - Assembly directories for each "flavor" of ScratchJr. These symlink to src for common code, and could diverge in settings and assets.
  • free/ - Free edition JavaScript, including all shared code for all releases
  • android/ - Android port of Scratch Jr. (Java, Android Studio Projects)
    • ScratchJr/ - Android Studio Project for ScratchJr Android Application
  • bin/ - Build scripts and other executables
  • doc/ - Developer Documentation
  • ios/ - XCode project for iOS build.

Building ScratchJr

To build the Android version, you need to have a system equipped with Android Studio. To build the iOS version, you need to have a Mac with XCode.

The build caches .png files out of the .svg files to improve performance. To enable this build step, you need to install a few dependencies.

On Ubuntu:

  • Run sudo easy_install pysvg to install python svg libraries
  • Run sudo apt-get install librsvg2-bin to install rsvg-convert
  • Run sudo apt-get install imagemagick to install ImageMagick

On OS X:

  • Install Homebrew.
  • Run sudo easy_install pysvg to install python svg libraries
  • Run brew install librsvg to install rsvg-convert
  • Run brew install imagemagick to install ImageMagick

Once these are installed, select the appropriate target in XCode or the appropriate flavor/build variant in Android Studio.

Code credits

ScratchJr would not be possible without free and open source libraries, including:

Acknowledgments

ScratchJr is a collaborative effort between: