How jaypatil9/codeleaf works
CodeLeaf is presented as an embeddable C++/Python playground. Its implemented run workflow is the playground page sending code, language, and stdin to Flask, which creates and polls a Paiza runner and returns execution details for display. A separate shared-snippet route reads stored snippets from MongoDB. The homepage’s demo run is a local mock, not connected to execution. The README is minimal; embedding and collaboration are described in frontend copy, but their implementations are not established by the sampled source.
Main entry points: server.py Execution API · [code_id]/page.tsx Shared playground · app/page.tsx Landing page · playground/page.tsx General playground
Components 9
Web interface
- Landing page
frontend/app/page.tsx - Local demo
frontend/app/page.tsx - General playground
frontend/app/playground/page.tsx - Shared playground
frontend/app/playground/[code_id]/page.tsx
Execution backend
- Execution API
backend/server.py - Snippet lookup
backend/server.py
External services
- MongoDB snippets
- Paiza runner API
Other components
- Playground user
Connections 10
- Playground user → Landing page: opens
- Landing page → Local demo: starts mock
- Playground user → General playground: opens
- Playground user → Shared playground: opens link
- General playground → Execution API: posts code
- Shared playground → Execution API: posts code
- Shared playground → Snippet lookup: requests snippet
- Snippet lookup → MongoDB snippets: reads
- Execution API → Paiza runner API: creates runner
- Execution API → Paiza runner API: polls status