Skip to content

mealet/deen-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

☘️ Deen Playground

Deen Playground is a fullstack web application which provides online Deen execution.
Project includes REST API for code execution and frontend page with code editor and controller panel.

🛠️ Usage

  1. Clone this repository:
git clone https://github.com/mealet/deen-playground
  1. Install Docker from official site.
  2. Build images and run them by command:
# Attached (interactive) mode
docker-compose build && docker-compose up

# Detached (background) mode
docker-compose build && docker-compose up -d
  1. Open application on localhost: http://locahost
  2. To stop it run command from the same dir:
docker-compose down

✍️ Tech Stack

Note

Backend:

  • Language: Rust
  • Framework: Axum
  • Code Execution: Docker

Frontend:

  • Language: Typescript
  • Build Tool: Vite
  • Web Library: React

HTTP Server And Reverse Proxy: nginx

❔ How Execution Works

When backend server recieves execution code request it creates temporary file, fills it with code and starts isolated docker container with mounted source file.
Isolated Docker container contains pre-compiled version of deen compiler and standard library (environment already setup). Currently it has next parameters:

  • Memory: 128m
  • CPUs: 1
  • Network: none
  • User: sandbox
  • Acess to Directories: only /sandbox

👮 License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.