On https://junior.guru/handbook/github-profile/ there is a form which allows juniors to get an automatic GitHub profile review. It leads to GitHub issue form with some prefilled data, e.g. https://github.com/juniorguru/eggtray/issues/new?template=check.md&title=Zp%C4%9Btn%C3%A1%20vazba%20na%20profil%20%40honzajavorek&body=Ku%C5%99%C3%A1tko%2C%20mrkni%20pros%C3%ADm%20na%20%40honzajavorek%2C%20d%C3%ADky! If they submit the form, it triggers a special GitHub Action, e.g. https://github.com/juniorguru/eggtray/actions/runs/21717415886 where it runs uv run eggtray check check command – using the https://github.com/juniorguru/eggtray tool. Some progress is reported back under the issue and then, when it's done, it comments under the issue, e.g. juniorguru/eggtray#259 (comment). The comment always intentionally contains JSON version of the results (in details tag with summary "Výsledky jako JSON").
I'd like to somehow move this process to the backend and introduce frontend, which allows me to have a form at https://junior.guru/handbook/github-profile/, which submits somewhere, and then redirects user to a new page, where the user waits for results. The whole https://junior.guru website is static though, and cannot have any backend. I can imagine introducing a separate service which does something totally minimal though. It could take GitHub username (input from the form), file the GitHub issue on user's behalf, and redirect to the results page with the issue number in the URL. The results page would be ideally static and would work with the GitHub API just through CORS, local-first. It would check the issue and the action progress and report progress back. Once there's the final summary, it would take the JSON from the comment and use it as data for displaying rich results. Whenever someone loads the static results page with issue number in URL, on load it would check the issue and "hydrate" with current state of the issue. If the issue is done, it would just display the results.
But ideally I wouldn't need to introduce a separate backend service and everything could be done frontend-side only, possibly with a service worker or something.
Implementation of the frontend would use alpine.js and htmx. Those aren't in the project yet, so this would be first time we use them and we'd need to adjust the frontend setup to use them.
On https://junior.guru/handbook/github-profile/ there is a form which allows juniors to get an automatic GitHub profile review. It leads to GitHub issue form with some prefilled data, e.g. https://github.com/juniorguru/eggtray/issues/new?template=check.md&title=Zp%C4%9Btn%C3%A1%20vazba%20na%20profil%20%40honzajavorek&body=Ku%C5%99%C3%A1tko%2C%20mrkni%20pros%C3%ADm%20na%20%40honzajavorek%2C%20d%C3%ADky! If they submit the form, it triggers a special GitHub Action, e.g. https://github.com/juniorguru/eggtray/actions/runs/21717415886 where it runs
uv run eggtray checkcheck command – using the https://github.com/juniorguru/eggtray tool. Some progress is reported back under the issue and then, when it's done, it comments under the issue, e.g. juniorguru/eggtray#259 (comment). The comment always intentionally contains JSON version of the results (in details tag with summary "Výsledky jako JSON").I'd like to somehow move this process to the backend and introduce frontend, which allows me to have a form at https://junior.guru/handbook/github-profile/, which submits somewhere, and then redirects user to a new page, where the user waits for results. The whole https://junior.guru website is static though, and cannot have any backend. I can imagine introducing a separate service which does something totally minimal though. It could take GitHub username (input from the form), file the GitHub issue on user's behalf, and redirect to the results page with the issue number in the URL. The results page would be ideally static and would work with the GitHub API just through CORS, local-first. It would check the issue and the action progress and report progress back. Once there's the final summary, it would take the JSON from the comment and use it as data for displaying rich results. Whenever someone loads the static results page with issue number in URL, on load it would check the issue and "hydrate" with current state of the issue. If the issue is done, it would just display the results.
But ideally I wouldn't need to introduce a separate backend service and everything could be done frontend-side only, possibly with a service worker or something.
Implementation of the frontend would use alpine.js and htmx. Those aren't in the project yet, so this would be first time we use them and we'd need to adjust the frontend setup to use them.