├── run ├── frontend ├── src │ ├── components │ │ ├── header │ │ │ ├── Header.js │ │ │ └── css │ │ │ │ └── Header.css │ │ ├── Error404 .js │ │ ├── footer │ │ │ ├── css │ │ │ │ └── footer.css │ │ │ └── Footer.js │ │ └── code │ │ │ ├── defaults.js │ │ │ ├── css │ │ │ └── Execute.css │ │ │ └── Execute.js │ ├── media │ │ ├── icon-gears.png │ │ ├── icon-play-black.png │ │ ├── icon-octocat-black.png │ │ ├── icon-octocat-gray.png │ │ └── icon-play-light-gray.png │ ├── actions │ │ ├── types.js │ │ └── Execute.js │ ├── reducers │ │ ├── index.js │ │ └── Execute.js │ ├── setupTests.js │ ├── App.test.js │ ├── index.js │ ├── App.css │ ├── index.css │ ├── store.js │ ├── App.js │ ├── logo.svg │ └── serviceWorker.js ├── .firebaserc ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── firebase.json └── package.json ├── .dockerignore ├── core ├── services │ ├── config.js │ ├── javascript.js │ ├── python.js │ ├── cSharp.js │ ├── java.js │ ├── rust.js │ └── golang.js ├── package.json ├── Server.js └── yarn.lock ├── Dockerfile ├── .github ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md └── workflows │ ├── deploy_frontend.yml │ └── deploy_backend.yml ├── LICENSE ├── README.md ├── CONTRIBUTING.md ├── CODE_OF_CONDUCT.md └── .gitignore /run: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd core && yarn run dev -------------------------------------------------------------------------------- /frontend/src/components/header/Header.js: -------------------------------------------------------------------------------- 1 | // add header code here... 2 | -------------------------------------------------------------------------------- /frontend/.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "white-rose-ont" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | Dockerfile 4 | .dockerignore 5 | 6 | frontend/ 7 | .github -------------------------------------------------------------------------------- /frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /core/services/config.js: -------------------------------------------------------------------------------- 1 | exports.codePath = process.env.CODE_PATH || "../../"; 2 | exports.timeOut = process.env.TIME_OUT || 5000; 3 | -------------------------------------------------------------------------------- /frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulonteri/remote-code-execution-environment/HEAD/frontend/public/favicon.ico -------------------------------------------------------------------------------- /frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulonteri/remote-code-execution-environment/HEAD/frontend/public/logo192.png -------------------------------------------------------------------------------- /frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulonteri/remote-code-execution-environment/HEAD/frontend/public/logo512.png -------------------------------------------------------------------------------- /frontend/src/media/icon-gears.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulonteri/remote-code-execution-environment/HEAD/frontend/src/media/icon-gears.png -------------------------------------------------------------------------------- /frontend/src/media/icon-play-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulonteri/remote-code-execution-environment/HEAD/frontend/src/media/icon-play-black.png -------------------------------------------------------------------------------- /frontend/src/media/icon-octocat-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulonteri/remote-code-execution-environment/HEAD/frontend/src/media/icon-octocat-black.png -------------------------------------------------------------------------------- /frontend/src/media/icon-octocat-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulonteri/remote-code-execution-environment/HEAD/frontend/src/media/icon-octocat-gray.png -------------------------------------------------------------------------------- /frontend/src/media/icon-play-light-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulonteri/remote-code-execution-environment/HEAD/frontend/src/media/icon-play-light-gray.png -------------------------------------------------------------------------------- /frontend/src/actions/types.js: -------------------------------------------------------------------------------- 1 | export const RUN_CODE_SUCCESS = "RUN_CODE_SUCCESS"; 2 | export const RUN_CODE_RUNNING = "RUN_CODE_RUNNING"; 3 | export const RUN_CODE_FAILED = "RUN_CODE_FAILED"; 4 | -------------------------------------------------------------------------------- /frontend/src/reducers/index.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from "redux"; 2 | 3 | import execution from "./Execute"; 4 | 5 | export default combineReducers({ 6 | executionReducer: execution, 7 | }); 8 | -------------------------------------------------------------------------------- /frontend/src/components/Error404 .js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export const Error404 = () => { 4 | return ( 5 |
6 |

404 Error

7 |
8 | ); 9 | }; 10 | 11 | export default Error404; 12 | -------------------------------------------------------------------------------- /frontend/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /frontend/firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": "build", 4 | "site": "code-executer", 5 | "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], 6 | "rewrites": [ 7 | { 8 | "source": "**", 9 | "destination": "/index.html" 10 | } 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /frontend/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { render } from "@testing-library/react"; 3 | import App from "./App"; 4 | 5 | test("renders learn react link", () => { 6 | const { getByText } = render(); 7 | // const linkElement = getByText(/learn react/i); 8 | // expect(linkElement).toBeInTheDocument(); 9 | }); 10 | -------------------------------------------------------------------------------- /frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom"; 3 | import "./index.css"; 4 | import App from "./App"; 5 | import * as serviceWorker from "./serviceWorker"; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById("root") 12 | ); 13 | 14 | serviceWorker.register(); 15 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:alpine 2 | 3 | RUN apk add --no-cache nodejs yarn 4 | RUN apk add --no-cache openjdk8 5 | ENV JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk 6 | ENV PATH="$JAVA_HOME/bin:${PATH}" 7 | RUN apk add --no-cache python3 8 | RUN apk add --no-cache rust 9 | RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing mono 10 | 11 | WORKDIR /usr/src/app 12 | 13 | COPY ./core/package.json ./ 14 | COPY ./core/yarn.lock ./ 15 | 16 | RUN yarn --production 17 | 18 | COPY ./core . 19 | 20 | 21 | EXPOSE 8080 22 | 23 | CMD [ "node", "Server.js" ] 24 | -------------------------------------------------------------------------------- /frontend/src/App.css: -------------------------------------------------------------------------------- 1 | ul { 2 | margin: 0; 3 | padding: 0; 4 | list-style-type: none; 5 | } 6 | 7 | a { 8 | text-decoration: none; 9 | } 10 | 11 | .larger-screen-warn { 12 | font-size: small !important; 13 | margin-bottom: 15px !important; 14 | display: none; 15 | } 16 | 17 | @media only screen and (max-width: 769px) { 18 | .hide-tablet { 19 | display: none !important; 20 | } 21 | 22 | .larger-screen-warn { 23 | display: block; 24 | } 25 | } 26 | 27 | @media only screen and (max-width: 600px) { 28 | .hide-mobile { 29 | display: none !important; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /frontend/src/components/footer/css/footer.css: -------------------------------------------------------------------------------- 1 | footer ul { 2 | display: flex; 3 | flex-direction: row; 4 | justify-content: center; 5 | align-content: center; 6 | width: 100%; 7 | margin-top: 20px; 8 | margin-bottom: 10px; 9 | } 10 | 11 | footer li { 12 | margin: 0 20px; 13 | } 14 | 15 | footer li a, 16 | p { 17 | color: var(--editer-white); 18 | } 19 | 20 | footer p a { 21 | color: var(--editer-white); 22 | font-weight: bold; 23 | text-decoration: underline; 24 | } 25 | 26 | footer p { 27 | margin-top: 20px; 28 | margin-bottom: 30px; 29 | text-align: center; 30 | } 31 | -------------------------------------------------------------------------------- /frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Code Executer", 3 | "name": "Remote Code Executor", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /frontend/src/index.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --editer-gray: #808080; 3 | --editer-light-gray: lightgray; 4 | --editer-black: #282a36; 5 | --editer-white: azure; 6 | --editer-min-height: 490px; 7 | --editer-height: 74vh; 8 | } 9 | 10 | body { 11 | margin: 0; 12 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 13 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 14 | sans-serif; 15 | -webkit-font-smoothing: antialiased; 16 | -moz-osx-font-smoothing: grayscale; 17 | } 18 | 19 | code { 20 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 21 | monospace; 22 | } 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /frontend/src/store.js: -------------------------------------------------------------------------------- 1 | import { createStore, applyMiddleware } from "redux"; 2 | import thunk from "redux-thunk"; 3 | import rootReducer from "./reducers"; 4 | 5 | const initialState = {}; 6 | const middleware = [thunk]; 7 | 8 | var md = null; 9 | 10 | if (process.env.NODE_ENV === `development`) { 11 | const { createLogger } = require(`redux-logger`); 12 | const { composeWithDevTools } = require("redux-devtools-extension"); 13 | 14 | const logger = createLogger({ 15 | // ...options 16 | }); 17 | 18 | middleware.push(logger); 19 | md = composeWithDevTools(applyMiddleware(...middleware)); 20 | } else { 21 | md = applyMiddleware(...middleware); 22 | } 23 | 24 | const store = createStore(rootReducer, initialState, md); 25 | 26 | export default store; 27 | -------------------------------------------------------------------------------- /frontend/src/App.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Provider } from "react-redux"; 3 | import store from "./store"; 4 | import "./App.css"; 5 | import Execute from "./components/code/Execute"; 6 | import Footer from "./components/footer/Footer"; 7 | // TODO: Add more paths 8 | // import { Switch, HashRouter, Route } from "react-router-dom"; 9 | // import Error404 from "./components/Error404 "; 10 | 11 | function App() { 12 | return ( 13 | 14 | 15 | {/* 16 | 17 | 18 | 19 | 20 | */} 21 |