{"id":45824192,"url":"https://github.com/cojudge/cojudge","last_synced_at":"2026-02-26T21:35:55.690Z","repository":{"id":320939149,"uuid":"1083832541","full_name":"cojudge/cojudge","owner":"cojudge","description":"Solve classic LeetCode problems complete offline. No discussion forum, no LLM assistant, not even the internet. Solve the curated list with just you, the problem and the offline judge.","archived":false,"fork":false,"pushed_at":"2025-12-08T12:09:13.000Z","size":4628,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-09T17:31:45.147Z","etag":null,"topics":["cpp","docker","education","interview-preparation","java","javascript","leetcode","python"],"latest_commit_sha":null,"homepage":"","language":"Svelte","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/cojudge.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-26T19:52:28.000Z","updated_at":"2025-12-08T12:09:16.000Z","dependencies_parsed_at":"2025-10-26T22:21:25.858Z","dependency_job_id":null,"html_url":"https://github.com/cojudge/cojudge","commit_stats":null,"previous_names":["cojudge/cojudge"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/cojudge/cojudge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cojudge%2Fcojudge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cojudge%2Fcojudge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cojudge%2Fcojudge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cojudge%2Fcojudge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cojudge","download_url":"https://codeload.github.com/cojudge/cojudge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cojudge%2Fcojudge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29873312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T21:05:00.265Z","status":"ssl_error","status_checked_at":"2026-02-26T20:57:13.669Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cpp","docker","education","interview-preparation","java","javascript","leetcode","python"],"created_at":"2026-02-26T21:35:52.626Z","updated_at":"2026-02-26T21:35:55.677Z","avatar_url":"https://github.com/cojudge.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e Solve classic algorithmic problems without the internet or having to deal with installing runtimes. No discussion forum, no LLM assistant, not even the internet. Solve the curated list with just you, the problem and the judge.\n\n![Light Mode](./screenshots/lightmode.png)\n\n![Demo](./screenshots/ide.gif)\n\n![Progress Tracker](./screenshots/progresstracker.png)\n\n### Demo site: [https://cojudge.cloud](https://cojudge.cloud)\n\n## Highlights\n\n- Offline-first: judge solutions without an internet connection\n- Docker sandboxes: consistent, isolated runs across machines\n- LeetCode-style problem packs with statements and tests\n- Simple \u0026 fast web UI (SvelteKit) with in-browser editor and light/dark mode support\n- Multiple languages support (Java/Python/C++)\n- Code Playground: Run code snippets in Java, Python, or C++ without a problem context\n- Extensible: add new problems by dropping folders in `problems/`\n- Persistent Code \u0026 Progress Tracking via Local Storage\n- Browser-like tabs to organize your local solutions\n- Extensive problems: includes 60+ problems with sample testcases and hidden testcases from Blind 75\n\n## Requirements\n\n- Docker (installed and running)\n- Node.js and npm (for development only)\n\n## Quickstart\n\n- Linux/macOS/Windows (WSL)\n```bash\ngit clone https://github.com/cojudge/cojudge\ncd cojudge\nchmod +x run.sh\n./run.sh\n```\n\nThis builds the image, starts the container, and prints the link: http://localhost:5375\n\n## Development\n\n1) Add $USER to docker group\n```bash\nsudo usermod -aG docker \"$USER\"\nnewgrp docker\n```\n\n2) Install dependencies\n```bash\nnpm install\n```\n3) Start the app (dev)\n```bash\nnpm run dev\n```\n\n## Add a problem\n\nCreate a new folder under `problems/\u003cyour-problem-slug\u003e/` with the following files:\n\n1. `statement.md` – problem description in Markdown\n2. `metadata.json` – problem metadata (difficulty, input structure, starter code, etc.)\n3. `official-tests.json` – an array of inputs for the official tests that will run when user clicks `Submit`. Only inputs are needed. **No need to write the expected output**. Our code will get the expected output by passing your input to your `Marker.java`\n4. `Marker.java` – The judger class should contain two public methods:\n\n  4.1. `{outputType} {functionName}(testcase)` that gives the correct solution. `{functionName}` is what you defined in `metadata.json`. This is the correct solution that can pass the LeetCode judge in Java. You can usually find a Java solution on the LeetCode discussion forum pretty easily for any problem. The judger has to be written in Java and called `Marker.java`. **No** `Marker.py` or `Marker.cpp` are needed.\n\n  4.2. `boolean isCorrect(testcase, userOutput)` that judges if a user output is correct for the given testcase.\n\n5. Add the problem to `courses/blind75/courseinfo.json`\n\nRefer to `/problems/two-sum` for a detailed example.\n\n#### Note on problems\n\nSome test cases and reference marker solutions were AI‑assisted and human‑reviewed. Issues may remain—please open an issue or PR if you spot anything.\n\nThe prompt that was given to copilot for generating problems:\n1. With CSV data for adding multiple problems.\n```plaintext\nRefer to /problems/two-sum, please add the following problems:\nCategory,Title,Description,Link\n[problem1_category],[problem1_title],[problem1_description],[problem1_link]\n[problem2_category],[problem2_title],[problem2_description],[problem2_link]\n...\n```\n\n2. With a screenshot\n```plaintext\nRefer to /problems/two-sum, please add the problem shown in the image.\n[pasted image] \n```\n\n## Add a programming language\n\nThis is a more complicated process but it is definitely doable. \n\n1. For starter you need to create a new class that extends class `ProgramRunner.ts` (e.g. `JavascriptRunner.ts`) and implement your own `abstract compile()` and `abstract run()`. It's expected that all runtimes will be executed via [Dockerode](https://github.com/apocas/dockerode)\n\n2. Implement all the `displayOutput({inputType})` and `to_{inputType}()` methods on your custom utilitiy class (e.g. `javascriptUtil.ts`)\n\n3. Add your new languages on `api/image/pull` and `api/image/status` \n\n4. Add `starterCode` to the problem you like to solve in your language. Just the starter code is needed for existing problems. No need for solution in the new language. Our codebase will handle the rest.\n\n5. Update `type ProgrammingLanguage = 'java' | 'python' | 'cpp' | 'your_new_lang'` on `util.ts`;\n\n6. Add a new `\u003coption\u003e` on the UI for the new language in `#language-select`\n\n7. Create a new class that extends `PlaygroundRunner` (e.g. `PlaygroundJavascriptRunner`) in `src/lib/runners/PlaygroundRunners.ts` and add the instantiation logic in `src/routes/api/playground/run/+server.ts`.\n\nRefer to `javaUtil.ts`, `JavaRunner.ts` and `problems/two-sum` for a detailed example. \n\n## Troubleshooting\n\n### Error Connecting to Docker on macOS with Colima\n\nSome Docker environments on macOS (like Colima) use a non-default Docker socket path. If the application has trouble connecting to Docker, you can specify the path manually by setting the `HOST_DOCKER_SOCKET` environment variable.\n\n**Example:**\n```bash\n# Find your socket path by running `colima status`\nHOST_DOCKER_SOCKET=\"/Users/your-user/.colima/default/docker.sock\" ./run.sh\n```\n\n## Contact\n\nFeel free to use the [Issue page](https://github.com/cojudge/cojudge/issues) or [Discussion page](https://github.com/cojudge/cojudge/discussions) for any issues, feedback, comments, feature requests, or anything else related to cojudge. If you would rather reach out privately, contact me [here](https://waiyip.life/#contact); I'll respond as soon as I can.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcojudge%2Fcojudge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcojudge%2Fcojudge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcojudge%2Fcojudge/lists"}