Glitchlet is a lightweight, browser-based creative-coding environment (HTML/CSS/JS only). Think "Glitch-lite" for shared hosting: students edit multi-file projects in the browser with instant preview, save locally via IndexedDB, and later publish to a class projects folder.
- Multi-file editor with a file tree and live preview
- Local-first persistence (autosave to IndexedDB)
- ZIP import/export for templates and backups
- Static front end (no Node/React required)
- Account-based publishing with manager + editor roles
- Manager console for accounts, projects, and email setup links
These instructions assume a typical shared host (e.g., Reclaim Hosting) with PHP enabled.
- Create a subdomain in your hosting control panel (e.g.,
glitchlet.yoursite.net). Make sure you do NOT select the "Share Document Root" option. - Upload the project files into the subdomain document root (e.g.,
~/glitchlet.yoursite.net/). - Configure a MySQL database and add a new user with ALL privileges. On cPanel, you can do both in the MySQL Database wizard. Note the new database name, database user, and database user password.
- Generate an app password for your Gmail account. Because Google keeps this option buried, the easiest way to find it is to log into your Google Account and search for
app password. Take note of this app-specific password. - Now visit
/install.phpto complete the installation. - After the installer reports success, delete
install.phpfrom the server. (The installer locks itself withinstall.lock, but removing the file entirely is safer.)
index.html- app shellassets/styles.css- UI stylingassets/js/- editor logic split into modules (core.jsstate/constants,files.jsfile tree,preview.jssandboxed preview,archive.jsimport/export/publish,main.jsevent wiring/startup, etc.); loaded as ordered classic scripts, no build steppublish/manager.php- manager console (accounts/projects)publish/project_admin.php- shared per-project admin handler (each project'sadmin.phpis a stub that requires it)publish/projects.php- per-user published projects dashboard
- The live preview runs in a fully sandboxed iframe (opaque origin) so previewed/remixed code cannot touch your Glitchlet session, cookies, or saved projects. A side effect:
localStorage,document.cookie, and IndexedDB are unavailable inside previewed projects (they throw a SecurityError). Published projects are unaffected. - ZIP import/export uses JSZip from a CDN by default. If you need fully offline hosting, download JSZip locally and update
ensureJSZip()inassets/js/archive.js. - Account emails use SMTP settings in
publish/config.php(Gmail app passwords supported). - Keep
publish/config.phpprivate. It is ignored by git; do not commit SMTP or DB credentials. /publish/bootstrap.phpis disabled wheninstall.lockexists.
- Version lives in
VERSIONand is exposed to the app viaassets/version.js. - Bump with
scripts/bump-version.sh:scripts/bump-version.sh patch(orminor/major)scripts/bump-version.sh 1.2.3to set an explicit version.
- Optional updater: configure
GLITCHLET_UPDATE_MANIFEST_URLandGLITCHLET_UPDATE_ALLOW=1to enable/publish/update.php.
Create a JSON file (hosted anywhere public) that looks like this:
{
"version": "0.2.0",
"zip_url": "https://example.com/glitchlet/releases/glitchlet-0.2.0.zip",
"sha256": "hex-sha256-checksum-of-the-zip (required)",
"notes": "Optional short release notes."
}
The zip_url must use HTTPS and the sha256 checksum is required — updates
are refused otherwise. Generate the checksum with shasum -a 256 release.zip.
- Run
scripts/bump-version.sh(patch/minor/major) and commitVERSION+assets/version.js. - Push to GitHub.
- Create a GitHub release with tag
vX.Y.Zand add notes. - Upload (or use) the release ZIP and update your manifest
zip_url,version, and optionalsha256.
- Use the Tutorial button in the top bar to toggle hover tips for the main controls and panes.
- Place a
starter_template.zipfile at the site root to define the default project that loads on first visit. - Replace the zip contents to customize the starter project for your install.
- Project manager (list, rename, delete)
- Instructor template catalog
MIT. See LICENSE.