PySketch is a cutting-edge visual programming platform that revolutionizes how users interact with Python's Turtle graphics. By seamlessly transforming freehand sketches into clean, executable Python code, it empowers both artists and creative coders to prototype, learn, and create generative art without writing a single line of syntax manually. Built with the latest web technologies including Next.js 15 and React 19, PySketch offers a professional-grade environment with layer management, real-time compilation, and a fluid, responsive interface designed for the modern web.
- Real-time Code Compilation: Instantaneously converts vector strokes into optimized Python
turtlescripts using a custom compiler engine. - Intelligent Stroke Smoothing: Applies smart simplification algorithms to reduce node count and eliminate jitter, producing human-readable and efficient code.
- Layer-Based Architecture: Professional-grade layer system allowing visibility toggling, reordering, and independent management of complex compositions.
- Responsive Canvas Engine: High-performance drawing surface that dynamically adapts to viewport dimensions while maintaining coordinate precision.
- Integrated Code Inspector: Real-time code panel with custom-built lightweight syntax highlighting for Python.
- One-Click Export: seamless generation of standalone
.pyfiles that function in any standard Python environment. - Configurable Runtime: Adjustable execution parameters including global animation speed (Instant to Slow) and canvas background settings.
- State Management: Robust
localStoragepersistence layer for auto-saving projects, preserving full edit history, stroke data, and application state. - Modern UI/UX: Premium dark-mode aesthetic utilizing Tailwind CSS, featuring glassmorphic headers and a responsive 3-panel layout (Tools, Canvas, Code).
- Type Safety: Fully typed codebase using TypeScript for reliability and maintainability.
-
Clone the repository:
git clone https://github.com/Solez-ai/PySketch.git cd PySketch/pysketch -
Install dependencies:
npm install # or yarn install -
Run the development server:
npm run dev # or yarn dev -
Open http://localhost:3000 with your browser to start creating!
- Next.js 15 - The React Framework for the Web
- React 19 - The library for web and native user interfaces
- Tailwind CSS - Rapidly build modern websites without ever leaving your HTML
- TypeScript - JavaScript with syntax for types
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please read our Contributing Guide for details on our code of conduct, and the process for submitting pull requests.
Made with ❤️ by Samin Yeasar @ Solez-ai