{"id":16264997,"url":"https://github.com/akshitgrover/box-exec","last_synced_at":"2025-03-19T23:30:29.832Z","repository":{"id":48343400,"uuid":"131517671","full_name":"akshitgrover/box-exec","owner":"akshitgrover","description":"Box execute is a npm package to compile/run codes (c,cpp,python) in a virtualized environment, Here virtualized environment used is a docker container. This packages is built to ease the task of running a code against test cases as done by websites used to practice algorithmic coding.","archived":false,"fork":false,"pushed_at":"2021-07-30T23:14:38.000Z","size":103,"stargazers_count":18,"open_issues_count":8,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-28T21:32:31.941Z","etag":null,"topics":["docker","docker-container","executor","sandbox","stage"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akshitgrover.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-29T18:07:51.000Z","updated_at":"2023-08-30T11:19:49.000Z","dependencies_parsed_at":"2022-08-19T03:21:17.065Z","dependency_job_id":null,"html_url":"https://github.com/akshitgrover/box-exec","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshitgrover%2Fbox-exec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshitgrover%2Fbox-exec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshitgrover%2Fbox-exec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshitgrover%2Fbox-exec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akshitgrover","download_url":"https://codeload.github.com/akshitgrover/box-exec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244029446,"owners_count":20386409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-container","executor","sandbox","stage"],"created_at":"2024-10-10T17:05:09.785Z","updated_at":"2025-03-19T23:30:29.549Z","avatar_url":"https://github.com/akshitgrover.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Box Execute\n\n[![Build Status](https://travis-ci.org/akshitgrover/box-exec.svg?branch=master)](https://travis-ci.org/akshitgrover/box-exec) [![npm 1.0.3](https://img.shields.io/badge/npm-1.0.3-blue.svg)](https://npmjs.org/package/box-exec) ![node \u003e=6](https://img.shields.io/badge/node-\u003e=6-red.svg) [![dependencies null](https://img.shields.io/badge/dependencies-null-yellow.svg)](https://npmjs.org/package/box-exec) [![examples 5](https://img.shields.io/badge/examples-4-orange.svg)](https://github.com/akshitgrover/box-exec/tree/master/examples)\n\n## What Is Box-Execute?\n\nBox execute is an npm package to compile/run codes (c,cpp,python) in a virtualized environment, Here virtualized environment used is a docker container. This packages is built to ease the task of running a code against test cases as done by websites used to practice algorithmic coding.\n\n## Using Box-Execute\n\n* `npm i box-exec`\n* [`Look For Examples`](https://github.com/akshitgrover/box-exec/tree/master/examples)\n\n## Box-Execute Structure\n\nLanguage supported by Box-Execute are:\n* c\n* cpp\n* python 2\n* python 3\n\n**NOTE:** Language support is to be extended.\n\nFor each language supported a docker container is present in which all the codes are executed to get the output.\n\n## Under the hood\n\nBox-Execute utilises staging architecture in order to run a code an get the output.\n\n* **Stage One:**\n\n\u003eContainer for a particular language is checked for it's status and in case of container \"absence\" or \"not \nrunning status\" container is started or restarted based on the container status.\n\n**NOTE:** This stage is executed in all conditions.\n\n* **Stage Two**\n\n\u003eSource code file is copied in the running container.\n\n**NOTE:** This stage is executed in all conditions.\n\n* **Stage Three**\n\n\u003eThis stage is only executed in case when source code file is \"C\" or \"CPP\" file. Used for compiling C/CPP code.\n\n**NOTE:** This stage is executed only when source code file is in C/CPP\n\n* **Stage Four**\n\n\u003eThis is the final stage where code is executed to get the output. Streams are used to write data to STDIN.\n\n**NOTE:** This stage is executed in all conditions.\n\n## Future Work\n\n* Update Error Return On Command Failure\n\n* Extend Language Support\n\n* Add CLI tool\n\n* Explore For Erroneous Conditions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakshitgrover%2Fbox-exec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakshitgrover%2Fbox-exec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakshitgrover%2Fbox-exec/lists"}