{"id":17767203,"url":"https://github.com/samzhang02/code-editor","last_synced_at":"2025-04-01T14:18:47.519Z","repository":{"id":242427473,"uuid":"808845752","full_name":"SamZhang02/code-editor","owner":"SamZhang02","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-03T00:14:11.000Z","size":148,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T01:49:30.710Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/SamZhang02.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,"publiccode":null,"codemeta":null}},"created_at":"2024-06-01T00:46:20.000Z","updated_at":"2024-06-03T16:30:37.000Z","dependencies_parsed_at":"2024-06-02T23:49:28.762Z","dependency_job_id":"69ea4409-00f8-42bc-afaf-3ae421b28f60","html_url":"https://github.com/SamZhang02/code-editor","commit_stats":null,"previous_names":["samzhang02/code-editor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamZhang02%2Fcode-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamZhang02%2Fcode-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamZhang02%2Fcode-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamZhang02%2Fcode-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamZhang02","download_url":"https://codeload.github.com/SamZhang02/code-editor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246651559,"owners_count":20811994,"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":[],"created_at":"2024-10-26T20:43:32.821Z","updated_at":"2025-04-01T14:18:47.502Z","avatar_url":"https://github.com/SamZhang02.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple online Python 3.11 Code Editor\n\nThis is a take home assignment for a job position at a cool company.\n\n\n\nhttps://github.com/SamZhang02/code-editor/assets/112342947/4d83afb1-405c-46a4-9e4f-571fa45b0fcf\n\n\nThe website is an online code editor for Python 3.11, with a `test code` button\nthats runs the code, and a `submit` button to persist the code into a database.\n\n## Prerequisites\n\n- Python3\n- Poetry\n- npm\n- Docker\n- just (optional)\n\nYou should first build a Docker container with the image containing Python 3.11,\nnumpy, pandas and scipy with one of the following commands.\n\nThe backend Python's package management is done using `Poetry`, and the\nfrontend's package management is done using `npm`.\n\nYou can find an\n[overview](https://github.com/SamZhang02/code-editor/blob/main/docs/OVERVIEW.md)\nof the codebase's key elements in `/docs`.\n\n```shell\njust build-container\n```\n\n```shell\ndocker build -t python-numpy-pandas .\n```\n\nThis is the container image for where user submitted codes will be ran.\n\nYou should also provide environment variables as per any instances of `.env.example`. In this project, you need to provide an environment variable indicating the server's url in the `/client` codes, otherwise, a default one will be used.\n\n## Running the project\n\nI use `just` as a script runner, with available scripts located in the\n`justfile`, for functionalities such as formatting, testing, etc.\n\nFrom the root directory of the project, to launch the frontend, use one of the\nfollowing commands below\n\n```shell\njust ui\n```\n\n```shell\nnpm run dev\n```\n\nAnd one of the following commands for the backend:\n\n```shell\njust serve\n```\n\n```shell\npoetry run fastapi dev src/server.py\n```\n\n## Running tests\n\nThere are a couple simple test cases for the backend of the project, testing for\ncorrect functioning of some components, including their security against\nmalicious user submissions. To run tests, use one of the following commands\n\n```shell\njust test\n```\n\n```shell\npoetry run pytest src/tests\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamzhang02%2Fcode-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamzhang02%2Fcode-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamzhang02%2Fcode-editor/lists"}