{"id":34903447,"url":"https://github.com/huseynovvusal/gojudge","last_synced_at":"2025-12-26T09:13:09.475Z","repository":{"id":319325747,"uuid":"1076314900","full_name":"huseynovvusal/gojudge","owner":"huseynovvusal","description":"🔥🛡️ Blazingly Fast \u0026 Secure Code Execution Platform Powered by nsjail","archived":false,"fork":false,"pushed_at":"2025-12-20T22:00:32.000Z","size":171,"stargazers_count":5,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-22T20:57:22.176Z","etag":null,"topics":["code-execution","code-runner","docker","golang","hacktoberfest","nsjail","online-judge"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/huseynovvusal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-14T17:28:11.000Z","updated_at":"2025-12-20T22:00:35.000Z","dependencies_parsed_at":"2025-10-18T20:30:04.557Z","dependency_job_id":null,"html_url":"https://github.com/huseynovvusal/gojudge","commit_stats":null,"previous_names":["huseynovvusal/gojudge"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/huseynovvusal/gojudge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huseynovvusal%2Fgojudge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huseynovvusal%2Fgojudge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huseynovvusal%2Fgojudge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huseynovvusal%2Fgojudge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huseynovvusal","download_url":"https://codeload.github.com/huseynovvusal/gojudge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huseynovvusal%2Fgojudge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28050905,"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","status":"online","status_checked_at":"2025-12-26T02:00:06.189Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["code-execution","code-runner","docker","golang","hacktoberfest","nsjail","online-judge"],"created_at":"2025-12-26T09:13:06.222Z","updated_at":"2025-12-26T09:13:09.468Z","avatar_url":"https://github.com/huseynovvusal.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoJudge 🚀\n\nBlazingly Fast \u0026 Secure Code Execution Platform Powered by nsjail 🔥🛡️\n\n---\n\n## Overview\n\nGoJudge is a high-performance, secure, and extensible code execution engine designed for online judges, code runners, and educational platforms. It leverages [nsjail](https://github.com/google/nsjail) for robust sandboxing, ensuring every code execution is isolated, safe, and resource-limited.\n\n- **Languages Supported:** Python, C, C++, Go\n- **API:** gRPC-based for lightning-fast communication\n- **Security:** Each submission runs in a hardened nsjail sandbox\n- **Performance:** Optimized for minimal overhead and rapid execution\n- **Containerized:** Easy deployment with Docker\n\n---\n\n## Features ✨\n\n- **gRPC API:** Modern, efficient, and scalable interface for code execution\n- **Multi-language Support:** Python, C, C++, Go (easily extendable)\n- **Resource Limits:** Time, memory, and CPU restrictions per execution\n- **Postman Collection:** Ready-to-use API samples ([see below](#api-sample))\n- **Dockerized:** One-command setup for local or cloud environments\n- **Makefile:** Simple build, run, and clean commands\n\n---\n\n## Architecture 🏗️\n\n- **`cmd/server/main.go`:** gRPC server entrypoint\n- **`internal/executor/`:** Language-specific execution logic, all sandboxed with nsjail\n- **`proto/`:** Protocol Buffers definitions for the gRPC API\n- **`Dockerfile` \u0026 `docker-compose.yml`:** Containerization and orchestration\n- **`Makefile`:** Build and automation scripts\n\n---\n\n## Quick Start 🚦\n\n### 1. Build \u0026 Run with Docker\n\n```sh\ndocker build -t gojudge .\ndocker run -p 50051:50051 gojudge\n```\n\n### 2. Local Development\n\n```sh\nmake build\nmake run\n```\n\n### 3. Generate gRPC Code\n\n```sh\nmake proto\n```\n\n---\n\n## API Sample (Postman) 📬\n\n![Postman Sample](assets/postman.png)\n\n---\n\n## gRPC Request Examples 🛰️\n\n### 1. Using Go Client\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"google.golang.org/grpc\"\n\tpb \"huseynovvusal/gojudge/internal/proto\"\n)\n\nfunc main() {\n\tconn, err := grpc.Dial(\"localhost:50051\", grpc.WithInsecure())\n\tif err != nil {\n\t\tlog.Fatalf(\"did not connect: %v\", err)\n\t}\n\tdefer conn.Close()\n\tclient := pb.NewExecutorServiceClient(conn)\n\n\treq := \u0026pb.ExecutorRequest{\n\t\tCode:      \"print('Hello, World!')\",\n\t\tInput:     \"\",\n\t\tLanguage:  \"python\",\n\t\tTimeLimit: 2,\n\t\tMemoryLimit: 256,\n\t\tCpuLimit: 1,\n\t}\n\tresp, err := client.Execute(context.Background(), req)\n\tif err != nil {\n\t\tlog.Fatalf(\"Execution error: %v\", err)\n\t}\n\tlog.Printf(\"Output: %s\", resp.Output)\n\tlog.Printf(\"Execution Time: %d ms\", resp.ExecutionTime)\n}\n```\n\n### 2. Using grpcurl\n\n```sh\ngrpcurl -plaintext -d '{\"code\":\"print(\\\"Hello, World!\\\")\",\"input\":\"\",\"language\":\"python\",\"time_limit\":2,\"memory_limit\":256,\"cpu_limit\":1}' \\\n  localhost:50051 executor.ExecutorService/Execute\n```\n\n---\n\n## Why GoJudge? 🤔\n\n- **Blazingly Fast:** Minimal overhead, instant response\n- **Hardened Security:** nsjail ensures every execution is isolated\n- **Extensible:** Add new languages or features with ease\n- **Production Ready:** Containerized, scalable, and robust\n\n---\n\n## Contributing 🤝\n\nWe welcome contributions from everyone! Please read our [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines on how to get started, code style, submitting pull requests, and our review process.\n\n- **Issues \u0026 Suggestions:** Open an issue for bugs, feature requests, or questions.\n- **Pull Requests:** Fork the repo, create a feature branch, and submit a PR. All contributions are reviewed and discussed before merging.\n- **Code Style:** Follow the conventions described in CONTRIBUTING.md for consistency and quality.\n- **Communication:** Be respectful and constructive in all interactions.\n\n---\n\nPull requests and issues are welcome! For major changes, please open an issue first to discuss what you would like to change.\n\n---\n\n## Author\n\n[Huseynov Vusal](https://github.com/huseynovvusal)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuseynovvusal%2Fgojudge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuseynovvusal%2Fgojudge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuseynovvusal%2Fgojudge/lists"}