{"id":18799424,"url":"https://github.com/messa/pyladies-courseware","last_synced_at":"2025-04-13T17:33:10.332Z","repository":{"id":28500722,"uuid":"118565092","full_name":"messa/pyladies-courseware","owner":"messa","description":"Homework/task submit and review web app · based on React and Python aiohttp","archived":false,"fork":false,"pushed_at":"2025-03-19T19:10:00.000Z","size":6338,"stargazers_count":18,"open_issues_count":99,"forks_count":30,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-05T07:04:58.257Z","etag":null,"topics":["aiohttp","aiohttp-server","asyncio","graphql","hacktoberfest","markdown","mongodb","motor","nextjs","python","python3","react","relay","relay-modern","semantic-ui","yaml"],"latest_commit_sha":null,"homepage":"https://projekty.pyladies.cz/","language":"CSS","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/messa.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}},"created_at":"2018-01-23T06:00:34.000Z","updated_at":"2023-10-20T09:51:56.000Z","dependencies_parsed_at":"2023-09-29T21:40:55.342Z","dependency_job_id":"4ec34c7d-fe3f-48a4-886f-91ba10655091","html_url":"https://github.com/messa/pyladies-courseware","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messa%2Fpyladies-courseware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messa%2Fpyladies-courseware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messa%2Fpyladies-courseware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messa%2Fpyladies-courseware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/messa","download_url":"https://codeload.github.com/messa/pyladies-courseware/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248752600,"owners_count":21156124,"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":["aiohttp","aiohttp-server","asyncio","graphql","hacktoberfest","markdown","mongodb","motor","nextjs","python","python3","react","relay","relay-modern","semantic-ui","yaml"],"created_at":"2024-11-07T22:15:16.168Z","updated_at":"2025-04-13T17:33:10.296Z","avatar_url":"https://github.com/messa.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"Pyladies Courseware\n===================\n\nNástroj pro odevzdávání a review domácích úkolů z programování.\n\n[![CircleCI](https://circleci.com/gh/messa/pyladies-courseware.svg?style=svg\u0026circle-token=d5dc8be048ef0289f18f729db33f21118c0a5656)](https://circleci.com/gh/messa/pyladies-courseware)\n\nProduction deployment: https://projekty.pyladies.cz/\n\nDemo (reseted on every deploy): https://projekty-demo.messa.cz/\n\n\nTodo\n----\n\nNext steps:\n\n- dokončit workflow pro review úkolů\n- ~rozběhat FB a Google login~\n- přidat Github login\n- ~někam to nasadit :)~\n- udělat notifikace\n  - uvnitř aplikace\n  - do Slacku\n  - e-mail\n  - debouncing (neposílat každou zvlášť, ale agregovat)\n- dodělat admin uživatelů, ať se dají přiřazovat studenti a koučové do jednotlivých kurzů\n\nDlouhodoběji:\n\n- odevzdávání přes Github\n\nViz také [issues](https://github.com/messa/pyladies-courseware/issues).\n\nPokud máte dotaz nebo chcete spustit diskuzi nad některým todo, založte issue (pokud už takové neexistuje).\n\n\nArchitecture\n------------\n\nUses React frontend based on [Next.js](https://github.com/zeit/next.js/) and Python backend based on [aiohttp.server](https://aiohttp.readthedocs.io/en/stable/).\n\n```\nbrowser --\u003e nginx\n              - /* ------------\u003e node.js frontend\n              - /api, /auth ---\u003e Python aiohttp backend ---\u003e MongoDB  \n```\n\nWhy React:\n\n- the site will be very dynamic, with complex forms, no-reload page updates, notifications etc. React enables to do this on client-side easily\n- so far we keep the code as simple as possible - no redux, no graphql etc., just \"classic\" React component state\n\nWhy Next.js:\n\n- handles all the boring stuff: webpack, routing, code splitting...\n- we just write the React components, nothing else, no server-side code (except getInitialProps)\n- we don't even use \"nice\" dynamic URLs to keep things as simple as possible\n  - URL `/lesson?courseId=abc` is served from `pages/lesson.js` with `props: { query: { courseId: 'abc' }}`\n\nWhy Python backend:\n\n- the language we all love :)\n- libraries for everything\n- more mature language for business logic and advanced I/O, process management etc.\n- API backend is more responsive when the HTML server-rendering is outsourced to client process (or to static files)\n\nWhy aiohttp:\n\n- supports websockets natively\n- enables the server to be single-process, single-thread, so things like notification broadcasting become much easier\n- powerful enough (just serves JSON API, no template rendering)\n- the MongoDB asyncio client [motor](https://github.com/mongodb/motor) is a \"first-class\" MongoDB client library\n\nWhy MongoDB:\n\n- provides all we need\n- \"operations friendly\" - replication, migration etc. much easier than with *SQL\n- MongoDB and its Python client [motor](https://github.com/mongodb/motor) provide nice asyncio API\n\n\nRequirements\n------------\n\n- Node.js \u003e= 10.0\n- Python \u003e= 3.6\n  - Ubuntu: install also `python3-venv`\n- MongoDB\n  - via Docker: `docker run --rm -it -p 27017:27017 mongo:4`\n\n\nLocal Development\n-----------------\n\nVe 3 samostatných konzolích spusť:\n\n```shell\n$ make run-mongod\n$ make run-backend\n$ make run-frontend\n```\n\nOtevři http://localhost:3000/\n\n| Port  | Služba\n|-------|-------\n| 3000  | Node.js – frontend\n| 5000  | aiohttp – backend\n| 27017 | MongoDB\n\nPři změně kódu Python backendu je potřeba restartovat proces (tj. znovu spustit `make run-backend`).\nPro automatizaci tohoto lze použít nějaký watchdog, např. [watch_files.py](https://github.com/messa/tools/blob/master/watch_files.py).\n\n\nDeveloper login\n---------------\n\nPro usnadnění vývoje na localhostu, je možné (v defaultu automaticky) zapnout tlačítka přihlášení různých rolí.\n\n![local dev login](docs/images/local_dev_login.png \"Tlačítka rychlého přihlášení\")\n\nUsage:\n\n```shell\n# in the backend directory\n$ export ALLOW_DEV_LOGIN=1\n$ make run-backend\n```\n\n\nProject structure\n-----------------\n\n```\npyladies-courseware\n├── Dockerfile\n├── Makefile\n├── backend\n│   ├── Makefile\n│   ├── cw_backend\n│   │   ├── __init__.py\n│   │   ├── __main__.py\n│   │   ├── configuration.py\n│   │   ├── courses.py\n│   │   ├── main.py\n│   │   ├── model\n│   │   ├── util\n│   │   └── views\n│   ├── requirements-tests.txt\n│   ├── requirements.txt\n│   ├── setup.py\n│   └── tests\n│       ├── conftest.py\n│       ├── data\n│       ├── model\n│       │   ├── test_users.py\n│       │   └── ...\n│       ├── ...\n├── data - course, session and task data\n├── frontend\n│   ├── components\n│   │   ├── ALink.js\n│   │   ├── CodeEditor.js\n│   │   ├── Header.js\n│   │   ├── HomeworkComments.js\n│   │   ├── ...\n│   │   ├── admin\n│   │   └── forms\n│   ├── package-lock.json\n│   ├── package.json\n│   ├── pages\n│   │   ├── admin\n│   │   │   └── users.js\n│   │   ├── course.js\n│   │   ├── index.js\n│   │   ├── lesson.js\n│   │   ├── login.js\n│   │   └── profile.js\n│   ├── static\n│   └── util\n└── resources - images for README etc.\n    └── local_dev_login.png\n```\n\n\nPoznámky\n--------\n\nNějaký pokus o přepsání domácích úkolů proběhl zde: https://github.com/pyvec/naucse.python.cz/pull/153\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmessa%2Fpyladies-courseware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmessa%2Fpyladies-courseware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmessa%2Fpyladies-courseware/lists"}