{"id":16578529,"url":"https://github.com/gkucmierz/instacode-app","last_synced_at":"2026-07-15T17:06:14.150Z","repository":{"id":63216896,"uuid":"558076787","full_name":"gkucmierz/instacode-app","owner":"gkucmierz","description":"Scratchpad for instant JavaScript code running","archived":false,"fork":false,"pushed_at":"2026-06-21T01:07:52.000Z","size":606,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-21T02:13:53.728Z","etag":null,"topics":["code","instant","javascript","js","scratchpad"],"latest_commit_sha":null,"homepage":"https://instacode.app","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gkucmierz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-10-26T21:14:41.000Z","updated_at":"2026-06-21T01:07:56.000Z","dependencies_parsed_at":"2024-11-15T20:11:18.771Z","dependency_job_id":"749cf0c9-14e1-4006-97e5-0d5e09f16d1a","html_url":"https://github.com/gkucmierz/instacode-app","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/gkucmierz/instacode-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkucmierz%2Finstacode-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkucmierz%2Finstacode-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkucmierz%2Finstacode-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkucmierz%2Finstacode-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gkucmierz","download_url":"https://codeload.github.com/gkucmierz/instacode-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkucmierz%2Finstacode-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35513508,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-15T02:00:06.706Z","response_time":131,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code","instant","javascript","js","scratchpad"],"created_at":"2024-10-11T22:14:39.553Z","updated_at":"2026-07-15T17:06:14.145Z","avatar_url":"https://github.com/gkucmierz.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⚡️ Instacode\n\n**Instacode** is a powerful, strictly in-browser Javascript sandbox designed for evaluating heavy computational code without freezing the UI. Built with Vue 3 and Vite, it leverages Web Workers and Abstract Syntax Tree (AST) transformations to safely execute user scripts \"on the fly\".\n\n## ✨ Key Features\n\n- 🛡️ **Zero-Blocking Architecture:** Never freeze your browser again. Instacode automatically injects non-blocking yield instructions into your code, allowing even massive CPU-bound tasks (like calculating Lucas-Lehmer primes with `BigInt`) to run smoothly while keeping the Event Loop breathing.\n- 📦 **Dynamic Sandbox Imports \u0026 Intelligent Autocompletion:** Seamlessly use external dependencies. Instacode's AST parser intercepts native `import()` and `ImportDeclaration` statements, fetching packages from external registries directly into the Worker's virtual file system. The integrated CodeMirror editor provides real-time intelligent autocompletion for package exports directly from the CDN.\n- 🌲 **Tree-Shaking \u0026 Export Bundling:** Instacode provides a production bundler capable of true tree-shaking by extracting AST module specifiers and resolving only the necessary parts of external packages via `esm.sh`.\n- 🌐 **Zero-Trust Offline-First PWA:** Using the `?standalone` ESM flag, our bundler fully extracts and embeds all nested internal dependencies from `package.json`, creating 100% self-contained, offline-ready monolithic bundles safely cached in IndexedDB. A built-in robust Service Worker ensures the application is always available offline, with a dedicated Over-The-Air (OTA) update prompt for seamless version upgrades.\n- 🔄 **Smart `require` Hoisting \u0026 Linting:** Instacode bridges the gap between CommonJS and ES Modules by intelligently analyzing CommonJS `require()` calls and hoisting them into native ESM `import` statements at the top of the generated bundle. A custom linter actively suggests locking unstable dependency versions.\n- ⚡️ **Real-Time Log Streaming:** Forget waiting for a 100% CPU task to finish before seeing the output. Our custom IPC stream with `console.flush()` pushes your logs to the UI instantly, line by line.\n- 🗂️ **Multi-Tab Workspace:** Effortlessly manage multiple concurrent scripts with a robust multi-tab interface, fully controllable via keyboard shortcuts (`Cmd+N`, `Cmd+W`, `Cmd+[1-9]`).\n- 🐙 **Direct GitHub Gist Export:** Instantly export your code as a Secret or Public GitHub Gist via a beautifully integrated UI (`Cmd+G`). Instacode securely manages your Personal Access Token, handles API interactions gracefully (even with bad credentials), and automatically generates deep-links for immediate code evaluation directly from the Gist description.\n\n## 🧠 How it works (Under the Hood)\n\nWhen you write code in Instacode:\n1. We parse your script into an AST (Abstract Syntax Tree) using the Meriyah parser.\n2. We inject micro-task yields (`await __yield()`) and `console.flush()` hooks into your standard logging functions.\n3. The transformed code runs inside a secure Web Worker context wrapped in an `AsyncFunction`.\n4. Dependencies are resolved, fully bundled with their sub-trees (for offline support), and injected into the execution context using base64 Data URIs.\n\n## 🚀 Development Setup\n\nWe recommend using [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar).\n\n### Installation\n\nClone the repository and install dependencies:\n\n```sh\nnpm install\n```\n\n### Start Development Server\n\nCompile and hot-reload for development:\n\n```sh\nnpm run dev\n```\n\n### Production Build \u0026 PWA Generation\n\nCompile, minify, and generate the `version.json` payload for the PWA Service Worker:\n\n```sh\nnpm run build\n```\n\n### Testing\n\nInstacode uses **Vitest** for unit testing math/logic and **Playwright** for fully-isolated E2E browser testing (bound to deterministic Port Lens tracking):\n\n```sh\n# Run unit tests\nnpm run test\n\n# Run E2E Playwright tests (headless)\nnpm run test:e2e\n\n# Run E2E Playwright tests with UI\nnpm run test:e2e:ui\n```\n\n### Linting\n\nLint the codebase with [ESLint](https://eslint.org/):\n\n```sh\nnpm run lint\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgkucmierz%2Finstacode-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgkucmierz%2Finstacode-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgkucmierz%2Finstacode-app/lists"}