- HTML 85.2%
- JavaScript 6.5%
- Python 5.4%
- CSS 2.9%
| _docs | ||
| accounts | ||
| apiclone | ||
| base_comments | ||
| djangobb_forum | ||
| educators | ||
| explore | ||
| files | ||
| galleries | ||
| gitignore | ||
| homepage | ||
| hosts | ||
| info | ||
| internalapi | ||
| lib | ||
| news | ||
| ngapi | ||
| notifications | ||
| pagination | ||
| projects | ||
| scratch_admin | ||
| siteapi | ||
| static | ||
| templates | ||
| userprofiles | ||
| .gitignore | ||
| forumindex.py | ||
| jinxer.py | ||
| LICENSE | ||
| manage.py | ||
| README.md | ||
| requirements.txt | ||
APIClone
Work in progress recreation of the main Scratch API, projects API, assets API, uploads API and ScratchR2.
Requirements
APIClone requires the following to be installed:
- Python. Only versions 3.12 and 3.13 were tested, but any version from 3.8 to the latest should work in theory.
The rest can be installed using
pip install -r requirements.txt.
Usage with Scratch-WWW
This will give you the modern Scratch 3.0 look and editor.
-
Clone APIClone and Scratch-WWW:
git clone https://codeberg.org/heathercat123/apiclone.git git clone --depth=1 --single-branch --branch develop https://github.com/scratchfoundation/scratch-www.git cd apiclone -
Install dependencies:
pip install -r requirements.txtSorry for using so many external packages. -
Set up the database:
python manage.py migrate -
Create superuser (admin/ST account):
python manage.py createsuperuser -
Optional: Collect static files: ```python manage.py collectstatic`` This will create the
static_proddirectory for production environments. -
Start APIClone:
python manage.py runserver 8000 -
Switch to another terminal window or tab.
-
Install Scratch-WWW's dependencies and translations:
cd scratch-www npm install npm run translate -
Start Scratch-WWW:
API_HOST=http://localhost:8000/hosts/api \ ASSET_HOST=http://localhost:8000/hosts/assets \ BACKPACK_HOST=http://localhost:8000/hosts/backpack \ CLOUDDATA_HOST=http:/localhost:8000/hosts/clouddata \ PROJECT_HOST=http://localhost:8000/hosts/projects \ STATIC_HOST=http://localhost:8000/hosts/uploads \ FALLBACK=http://localhost:8000 \ npm start
You can now open http://localhost:8333 in a web browser and enjoy Scratch-WWW with APIClone. Note that many elements of the website are hard-coded whereas they should be modifiable by the user, such as the home page's "What's Happening" box. Quite a few pages and API endpoints are also missing. Both of these are either currently being worked on or this project may randomly have gotten abandoned. I love life.
Do note that this setup is not suited for a production environment! I haven't written a guide on that yet, so just read the Django docs and figure out how to build Scratch-WWW by yourself.
Standalone Usage
This will give you the Scratch 2.0 look and editor.
-
Clone APIClone:
git clone https://codeberg.org/heathercat123/apiclone.git cd apiclone -
Install dependencies:
pip install -r requirements.txtSorry for using so many external packages. -
Set up the database:
python manage.py migrate -
Create superuser (admin/ST account):
python manage.py createsuperuser -
Optional: Collect static files: ```python manage.py collectstatic`` This will create the
static_proddirectory for production environments. -
Create a file in the
apiclonesubdirectory calledlocal_settings.py:from .settings import * SCRATCHR2_ONLY = True -
Start APIClone:
python manage.py runserver 8000
At this point, you may desire to override a few settings using local_settings.py:
# To revert to the blue accent color
SCRATCHR2_COLOR = 'Blue'
# To apply the 2013-like theme
SCRATCHR2_FOOTER = 2013
SCRATCHR2_NAVBAR = 2013
SCRATCHR2_PAGES = 2013
Reasonably detailed documentation can be found in settings.py. Please take a look at it, especially if you wish to deploy the website (the default settings are meant for a simple development environment).
You can now open http://localhost:8333 in a web browser and enjoy the good old Scratch 2.0 website. Note that many elements of the website are hard-coded whereas they should be modifiable by the user. Quite a few pages and functionality are also missing. Both of these are either currently being worked on or this project may randomly have gotten abandoned. I love life.
Do note that this setup is not suited for a production environment! I haven't written a guide on that yet, so just read the Django docs.
Fun? fact
APIClone was originally on August 3rd, 2025, created to test out Scratch's "Set Thumbnail" implemented on July 15th. It took about 3 hours to make the first version, whose code can be seen here. A video of it being used, taken around half an hour before the code was published, can be seen here.