Run Python notebooks with real-time execution inside Docker containers.
This project is a simple notebook platform inspired by Google Colab.
You can:
- Create notebooks
- Write Python code in cells
- Execute code
- See output instantly
- Save your work
All code runs inside Docker containers for isolation.
This demo shows how the draftly notebook can be used in a simple data science workflow.
We use a small dataset to:
- Explore data (EDA)
- Visualize patterns
- Train a basic model using PyTorch
- Generate insights
We load a dataset using pandas and display it.
We perform basic statistical analysis and check for missing values.
We visualize relationships in the data using matplotlib and seaborn.
We train a simple linear model using PyTorch.
We use the trained model to make predictions.
- Students who study more tend to score higher
- Sleep also impacts performance
- The model learns a simple relationship between study, sleep, and score
- User writes code in the browser
- Code is sent to the backend
- Backend runs the code inside a Docker container
- Output is returned and displayed
- User authentication
- Notebook creation
- Code execution in cells
- Output display
- Storing Snippets,secrets
- Docker-based isolation
- Notebook saving
Frontend:
- React
- React Flow
- Shadcn
- Tldraw
- Tiptap
- TanStack
- Monaco Editor
- Clerk (Authentication and Authorization)
Backend:
- Python (FastAPI)
Execution:
- Docker containers
- Managing Docker containers dynamically
- Keeping notebook state across cells
- Handling execution errors properly
All code runs inside isolated Docker containers. This prevents direct access to the host system.
git clone https://github.com/Fluffy-debuger/Draftly.git
cd Draftlycd notebook_server
python3 -m venv .pyenv
source .pyenv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload
uvicorn RT_server:app --port 8082 --reloadcd notebook_UI
npm install
npm run devcd notebook_server
docker build -f dockertemplate -t executionserver .- Improved user interface and experience
- Terminal and shell support (using xterm.js)
- Kernel persistence across sessions
- Resource limits for container execution
- Support for web preview inside notebooks
- Drag and drop cells for better interaction
- Runtime flexibility (local, Docker, and remote/cloud execution)
- Storage integration (Google Drive, OneDrive)






