-
Notifications
You must be signed in to change notification settings - Fork 188
Architecture
Karl Dubost edited this page Aug 9, 2018
·
10 revisions
- GitHub is used for recording issues
- Flask for the main backend operation
- A layer of JavaScript to handle the JSON data
The simplified graphical version looks a bit like this:
@startuml
Browser -> webcompat: HTTP Request [by JS on client]
webcompat -> Browser: HTTP Response (html/css/js/images)
Browser -> "webcompat API": HTTP XHR Request [by JS on client]
"webcompat API" -> "GitHub API": HTTP Request [by Python]
"GitHub API" -> "webcompat API": HTTP Response (json)
"webcompat API" -> Browser: HTTP Response (json) [by Python on server]
@enduml
See also API description
Webcompat-bot is the main customer of the webhook system. Each time a new issue is created, webcompat-bot will assign labels and milestones to the issue, depending on a certain number of parameters.
- URI parameters assign labels
- new issue created goes automatically to triage.
- User Agent detection assign browser labels.
Webcompat-bot is here to help with:
- automatic labeling
- handling anonymous bug reporting.
The site currently delivers mostly empty HTML templates containing JavaScript.
Once a page is delivered on a HTTP request /issues/[number]
, a JavaScript fetch is executed to get both the issue description and the associated comments with it. These are sent with a JSON format. Then the page is rendered with this JSON information reformatted on the fly into HTML.