The technical core of The Python Ledger, an interactive, browser-based learning platform. This project combines the static site power of Docusaurus with the client-side Python execution of Skulpt.
- Framework: Docusaurus v3 (React-based SSG)
- Engine: Skulpt (In-browser Python 3 execution)
- Editor: @uiw/react-codemirror (Python syntax highlighting)
- Deployment: CI/CD via GitHub Actions
Visit the site hosted by GitHub Pages
Unlike standard documentation, this project uses a custom React component, InteractivePython, to turn static code blocks into live environments.
To support interactive input() calls without freezing the browser's UI thread or hitting TimeLimitErrors, the engine uses a Promise-based Suspension architecture:
- When Python hits
input(), Skulpt triggers a custominputfun. - The engine returns a
Promiseand captures theresolvefunction in a ReactuseRef. - Skulpt "suspends" execution while the promise is pending.
- Once the user submits the HTML form, the promise resolves, and the Python state resumes exactly where it left off.
- Node.js (v18 or higher)
- npm or yarn
-
Clone the repository:
git clone https://github.com/ThePythonLedger/Curriculum.git git clone https://github.com/ThePythonLedger/Docusaurus-engine.git cd Docusaurus-engine -
Install dependencies:
npm install
-
Start the development server:
npm start
The site will be available at
http://localhost:3000.
/src/components/InteractivePython/: The React logic for the Skulpt engine and terminal UI.
We are looking for contributors to help with both Engine Polish and Lesson Content.
- Engine: Improving the terminal UI or optimizing Skulpt's output handling.
- Content: Drafting new lessons in Markdown and improving existing lessons (tracked separately)
See CONTRIBUTING.md for our full guidelines and the Discord community for real-time discussion.
This project is licensed under the MIT License.
You can join our community on Discord