Watch
1
2
Fork
You've already forked apiclone
1
mirror of https://codeberg.org/heathercat123/apiclone.git synced 2026-08-19 23:47:56 -04:00
Mirror of a WIP clone of the Scratch API, ScratchR2, and others made in Django
  • HTML 84.1%
  • JavaScript 6.6%
  • Python 6.2%
  • CSS 3.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Heathercat123 6821d76796
Use Unlicense deriative that restricts AI usage
I basically merged the Unlicense, a bit of the MIT license, and the I
Hate AI License from https://ihateailicense.eu/
2026-08-19 15:21:41 -04:00
accounts Use Unlicense deriative that restricts AI usage 2026-08-19 15:21:41 -04:00
apiclone Start work on password reset 2026-08-18 14:15:17 -04:00
base_comments Implement deleting users 2026-08-17 19:34:44 -04:00
djangobb_forum Start work on password reset 2026-08-18 14:15:17 -04:00
educators Implement deleting users 2026-08-17 19:34:44 -04:00
explore Start work on minor refactoring 2026-08-05 18:12:56 -04:00
files Optimise get_image 2026-07-24 14:50:34 -04:00
galleries Misc cleanup 2026-08-12 14:48:01 -04:00
homepage Misc cleanup 2026-08-12 14:48:01 -04:00
hosts Misc cleanup 2026-08-12 14:48:01 -04:00
info Finish "minor refactoring", fix a few bugs 2026-08-06 18:05:00 -04:00
internalapi Finish "minor refactoring", fix a few bugs 2026-08-06 18:05:00 -04:00
lib Finish "minor refactoring", fix a few bugs 2026-08-06 18:05:00 -04:00
news Finish "minor refactoring", fix a few bugs 2026-08-06 18:05:00 -04:00
ngapi Finish "minor refactoring", fix a few bugs 2026-08-06 18:05:00 -04:00
notifications Rewrite how notification reads work 2026-08-18 12:39:26 -04:00
pagination Finish "minor refactoring", fix a few bugs 2026-08-06 18:05:00 -04:00
projects Finish "minor refactoring", fix a few bugs 2026-08-06 18:05:00 -04:00
scratch_admin Implement deleting users 2026-08-17 19:34:44 -04:00
siteapi Misc cleanup 2026-08-12 14:48:01 -04:00
static Add more Chipmunk theme years to footer 2026-08-17 15:38:26 -04:00
templates Fix comment post button getting stuck on throbber 2026-08-15 17:50:35 -04:00
userprofiles Rewrite how notification reads work 2026-08-18 12:39:26 -04:00
.gitignore Fix empty recent_follows bug in Django Admin 2026-08-10 13:40:39 -04:00
forumindex.py Fix empty recent_follows bug in Django Admin 2026-08-10 13:40:39 -04:00
jinxer.py Misc cleanup 2026-08-12 14:48:01 -04:00
LICENSE Use Unlicense deriative that restricts AI usage 2026-08-19 15:21:41 -04:00
manage.py Finish "minor refactoring", fix a few bugs 2026-08-06 18:05:00 -04:00
README.md Implement Scratch News 2026-07-21 08:58:01 -04:00
requirements-dev.txt Get rid of ugly hack in password validator 2026-07-19 11:45:04 -04:00
requirements.txt Remove unused type vars from hosts.api.users.views 2026-04-22 18:22:13 -04:00

APIClone

Work in progress recreation of Scratch's current (as of mid 2026) backend systems, including the main API, projects API, assets API, uploads API and ScratchR2.

Requirements

APIClone requires the following to be installed:

  • Python. Only versions 3.12-3.14 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. If you wish to contribute to APIClone, you may also want to install the dependencies in requitements-dev.txt.

Usage with Scratch-WWW for Development

This will give you the modern Scratch 3.0 look and editor.

  1. 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
    
  2. Install dependencies: pip install -r requirements.txt Sorry for using so many external packages.

  3. Set up the database: python manage.py migrate

  4. Create superuser (admin/ST account): python manage.py createsuperuser

  5. Start APIClone: python manage.py runserver 8000

  6. Switch to another terminal window or tab.

  7. Install Scratch-WWW's dependencies and translations:

    cd scratch-www
    npm install
    npm run translate
    
  8. 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 quite a few pages, API endpoints and features are missing. 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 for Development

This will give you the Scratch 2.0 look and editor.

  1. Clone APIClone:

    git clone https://codeberg.org/heathercat123/apiclone.git
    cd apiclone
    
  2. Install dependencies: pip install -r requirements.txt Sorry for using so many external packages.

  3. Set up the database: python manage.py migrate

  4. Create superuser (admin/ST account): python manage.py createsuperuser

  5. Create a file in the apiclone subdirectory called local_settings.py:

    from .settings import *
    SCRATCHR2_ONLY = True
    
  6. Start APIClone: python manage.py runserver 8000

At this point, you may desire to override a few more 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 quite a few pages and features are missing. 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.