{"id":25893068,"url":"https://github.com/abhinandanmishra1/leetcode-ide","last_synced_at":"2025-03-02T21:30:11.398Z","repository":{"id":40656196,"uuid":"507868396","full_name":"abhinandanmishra1/Leetcode-Ide","owner":"abhinandanmishra1","description":"It is a clone of Leetcode Ide.","archived":false,"fork":false,"pushed_at":"2023-02-23T09:32:30.000Z","size":1358,"stargazers_count":14,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-06-11T01:00:35.776Z","etag":null,"topics":["code-editor","leetcode","leetcode-ide","online-code-editor","online-ide"],"latest_commit_sha":null,"homepage":"https://leetcode-ide.vercel.app/","language":"JavaScript","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/abhinandanmishra1.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}},"created_at":"2022-06-27T10:46:50.000Z","updated_at":"2023-06-10T23:51:42.000Z","dependencies_parsed_at":"2023-02-01T18:01:32.143Z","dependency_job_id":null,"html_url":"https://github.com/abhinandanmishra1/Leetcode-Ide","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhinandanmishra1%2FLeetcode-Ide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhinandanmishra1%2FLeetcode-Ide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhinandanmishra1%2FLeetcode-Ide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhinandanmishra1%2FLeetcode-Ide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhinandanmishra1","download_url":"https://codeload.github.com/abhinandanmishra1/Leetcode-Ide/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241574900,"owners_count":19984764,"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":["code-editor","leetcode","leetcode-ide","online-code-editor","online-ide"],"created_at":"2025-03-02T21:30:10.043Z","updated_at":"2025-03-02T21:30:11.375Z","avatar_url":"https://github.com/abhinandanmishra1.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Leetcode Ide  [See Live](https://leetcode-ide.vercel.app/)\n\n- It is a clone of Leetcode Ide\n\n**Version-1**\n\u003ckbd\u003e![Version-1](https://user-images.githubusercontent.com/64205626/176822891-187fb3b9-f3b4-429f-ace7-2f937ac0f23d.png)\u003c/kbd\u003e\n\nhttps://user-images.githubusercontent.com/64205626/177022732-d633f91a-ae5f-4afc-b002-e30d4023ce2c.mp4\n\n\n**Understanding Folder Structure [ This was version1 and is moved to another branch ]** \n\n- There are two folders `client` for frontend `backend` for backend.\n- In `client` folder:\n\n  - `app.js` is the Home page or main page.\n  - `components` folder have all the components :\n    - `CodeEditor` - The editor for writing codes [ Multiple themes/Language support]\n    - `CodeInput` - For taking user input same as in leetcode ide\n    - `CodeOutput` - For showing the result of the code\n    - `Navbar` - It is the basic navbar above editor for providing features of Run Code and theme selection etc.\n  - `lib` folder contains a file `defineTheme.js` which is used to define a new theme for the editor\n  - `boilerCodes` contains the initial codes for all the languages in the editor\n\n- In `backend` folder:\n  - `index.js` is the main file of execution.\n  - A post request `/run` is created using Express inside it which is the main request of this project.\n  - It gets the `user-code`,`code-language` and `user-input` as request.\n  - Then it creates two separate files one for code [like 'a.cpp','a.py','a.js'] and other file for input ['input.txt'] using `generateCodeFile.js`\n  - Now Node child process [ exec ] is used to compile the compiled language [cpp] or interpret the interpreted languages [py,js] using `executeCodeFile.js`\n  - Return the error or result as promise to frontend.\n\n\u003e This was all about the folder structure and working of the files.\n\n\n**For Deploying the project**\n\n- As I was not getting any idea how to create a file on mongodb database and then compile that file.\n- I researched a lot about it and then I found some online compiler api's that gives support to all languages.\n- I will be implementing that in my project and then will deploy it.\n\n\n---\n\n**Version -2** \n\n## Using Rapid API and Judge0 \n- I have used RapidAPI and JUDGE0 for compiling the codes.\n\n\nhttps://user-images.githubusercontent.com/64205626/182112312-18be0413-a8ef-4f99-a676-8f8bd27f4fc2.mp4\n\n\n### Things that are to be implemented in it\n- [ ] Boiler Code for all languages.\n- [ ] Facility to save code snippets with some keywords and accessing it\n- [ ] Saving the code in system.\n- [ ] Save current code in localstorage to avoid loss of code on reload.\n\n### Later on extra features \n- [] Authentication \n- [] Settings, snippets for each user\n- [] Many more things\n\n### How to run this project in your local?\n\n- Go to [Judge0-rapidApi](https://rapidapi.com/judge0-official/api/judge0-ce/) and signup if needed\n- Create a `.env` file with given keys and values [These values can be taken from above link]\n```env\n  REACT_APP_RAPID_API_HOST = X-RapidAPI-Host\n  REACT_APP_RAPID_API_KEY = X-RapidAPI-Key\n  REACT_APP_RAPID_API_URL = X-RapidAPI-Host/submissions\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhinandanmishra1%2Fleetcode-ide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhinandanmishra1%2Fleetcode-ide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhinandanmishra1%2Fleetcode-ide/lists"}