MCPcopy Index your code
hub / github.com/SplootCode/splootcode

github.com/SplootCode/splootcode @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
2,690 symbols 6,878 edges 281 files 3 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

SplootCode

The coding environment for non-engineers

SplootCode is a coding environment aiming to reduce programming barrier to entry.

Screenshot of the SplootCode editor

 

Goals

  • An unrestricted implementation of Python
  • Fast and easy to edit using a keyboard and autocomplete
  • Continuous runtime feedback without the need for a step-by-step debugger
  • Help users avoid syntax errors and other common programming errors
  • Avoid needless busywork like escaping, bracket matching, wrapping and whitespace
  • Let beginners focus on the logic of their code rather than the syntax
  • Make language features and functions easy to discover and use

Technical details

Being a web app, SplootCode uses Pyodide (CPython compiled to WebAssembly) to run Python in the browser.

Development

Requirements

You'll need to have Python, nodejs and yarn installed.

Local Dev

Install dependencies:

$ yarn install

Generate type information for built-in variables and functions (requires Python 3.8+).

$ yarn generate-types

Build the yarn workspace packages:

$ yarn build:packages

There are two main parts to this project, the editor and the runtime which is an iframe which executes the code. You will need to build and run dev webservers for both the main editor and the runtime iframe.

$ yarn start

And in a separate terminal, run this serve the runtime iframe:

$ yarn start-frame

The app should become availble at http://localhost:3000. The runtime frame will be served from :3001 and will be loaded automatically by the editor.

The main editor and frame communicate via postMessage, and they need to know each other's domains. This is configured in a dotenv file, .env.development. If you wish to change the above ports, you'll need to edit that file too.

Important: The main app must be opened on localhost NOT 127.0.0.1 in the URL bar for the runtime iframe to work correctly. Otherwise the runtime iframe will be assumed dead and reloaded continously. Unfortunately in older versions (earlier than Node 17) the Vite devserver will open to 127.0.0.1, newer versions of node should default to localhost. If you wish to use a different origin then update .env.development to match.

License

If you're planning to use this for commercial purposes, please check the LICENSE file. It is not a standard open source license.

Extension points exported contracts — how you extend this code

NodeObserver (Interface)
(no doc) [8 implementers]
packages/core/src/language/observers.ts
ChildSetLayoutHandler (Interface)
(no doc) [14 implementers]
packages/editor/src/layout/childset_layout_handler.ts
ParseTreeCommunicator (Interface)
(no doc) [2 implementers]
packages/language-python/src/analyzer/python_analyzer.ts
MainMenuItem (Interface)
(no doc)
packages/components/src/menu_bar.tsx
StaticURLs (Interface)
(no doc)
packages/runtime-python/src/static_urls.ts
DataEntrySplootNode (Interface)
(no doc)
packages/language-web/types/dataset/row.ts
ImportMeta (Interface)
(no doc)
src/index.d.ts
ProjectEditorProps (Interface)
(no doc)
src/pages/project_editor.tsx

Core symbols most depended-on inside this repo

addChild
called by 194
packages/core/src/language/childset.ts
getChildSet
called by 165
packages/core/src/language/node.ts
getChild
called by 146
packages/core/src/language/childset.ts
deserializeChildSet
called by 107
packages/core/src/language/node.ts
registerNodeCateogry
called by 107
packages/core/src/language/node_category_registry.ts
addChildSet
called by 106
packages/core/src/language/node.ts
getCount
called by 92
packages/core/src/language/childset.ts
registerType
called by 90
packages/core/src/language/type_registry.ts

Shape

Method 1,527
Class 545
Function 398
Interface 193
Enum 27

Languages

TypeScript92%
Python8%

Modules by API surface

python/executor.py80 symbols
packages/editor/src/context/selection.ts74 symbols
packages/core/src/language/node.ts43 symbols
python/text_generator.py40 symbols
packages/language-python/src/scope/python_scope.ts40 symbols
packages/language-python/src/nodes/literals.ts36 symbols
packages/language-web/types/js/literals.ts34 symbols
python/convert_ast.py33 symbols
packages/runtime-python/src/pyright.ts33 symbols
packages/editor/src/context/cursor_map.ts33 symbols
packages/language-python/src/analyzer/python_analyzer.ts28 symbols
packages/core/src/language/childset.ts28 symbols

For agents

$ claude mcp add splootcode \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact