{"id":27899319,"url":"https://github.com/joshjms/pocket-watch","last_synced_at":"2025-05-05T19:26:59.123Z","repository":{"id":217411869,"uuid":"743803531","full_name":"joshjms/pocket-watch","owner":"joshjms","description":"API for running unreliable code in a sandboxed environment.","archived":false,"fork":false,"pushed_at":"2024-01-30T04:05:26.000Z","size":8896,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T06:12:33.399Z","etag":null,"topics":["isolate","isolation","judge","sandbox"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joshjms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-01-16T02:49:08.000Z","updated_at":"2025-04-10T02:57:57.000Z","dependencies_parsed_at":"2024-01-16T08:06:43.648Z","dependency_job_id":"b5fce39a-e6cb-470f-a6d6-e8515e8328f4","html_url":"https://github.com/joshjms/pocket-watch","commit_stats":null,"previous_names":["joshjms/pocket-watch"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshjms%2Fpocket-watch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshjms%2Fpocket-watch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshjms%2Fpocket-watch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshjms%2Fpocket-watch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshjms","download_url":"https://codeload.github.com/joshjms/pocket-watch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252562034,"owners_count":21768230,"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":["isolate","isolation","judge","sandbox"],"created_at":"2025-05-05T19:26:58.512Z","updated_at":"2025-05-05T19:26:59.117Z","avatar_url":"https://github.com/joshjms.png","language":"Go","readme":"# Pocket Watch\n\nREST + gRPC API for running unreliable code in a sandboxed environment. Everyone can make their very own Leetcode without compromising server security and health.\n\n\u003e The service is still under development. Please ⭐ this project to motivate the coding monkeys ❤️!\n\n## Usage\n\n### Initialization\n\n#### Docker\n\n```bash\ndocker run -p 8080:8080 \\\n--privileged --cap-add SYS_ADMIN --security-opt seccomp=unconfined --cgroup-parent=docker.slice --cgroupns private --tmpfs /tmp --tmpfs /run --tmpfs /run/lock \\\npocketwatch:latest\n```\n\n### Running Source Code (C++ Example)\n\n\u003e Currently, only C/C++ source codes are supported. Add support for other languages in the future.\n\nPOST `/run`\n\n#### Request \n```go\n{\n\tCode     string   `json:\"code\"`\n\tLanguage string   `json:\"language\"` // just use \"cpp\"; other languages not yet supported\n\tStdin    []string `json:\"stdin\"`\n}\n```\n\n#### Response\n```go\n{\n\tVerdict []string `json:\"verdict\"` // OK, RE, TLE, CE\n\tStdout  []string `json:\"stdout\"`\n\tStderr  []string `json:\"stderr\"`\n\tTime    []string `json:\"time\"`\n\tMemory  []string `json:\"memory\"`\n}\n\n```\n\n## Contributing\nTBD - For more information, contact me in Discord `joshjms`.\n\n## References\n- [pocket-api](https://github.com/sanstzu/pocket-api)\n\n## People\n* [Josh](https://github.com/joshjms)\n* [Clay](https://github.com/sanstzu)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshjms%2Fpocket-watch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshjms%2Fpocket-watch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshjms%2Fpocket-watch/lists"}