: Receives every external HTTP request from the web server, executes actions required in any case, executes matching code in `pg-act` if appropriate, and calls `view.php` either way.
`pg-act/`
: Executed when a form is submitted: checks that every parameter is valid and secure, then executes the feature of the page according to the parameters.
`view.php`
: Displays global HTML and includes matching file from `pg-view`.
`pg-view/`
: Displays the main page content (notably HTML forms), may sometimes display form output passed through the `$data` array.
The `output` function is used to return success or error messages and stop processing of the request.
: When someone tries to log in over SFTP, SFTPGo sends username and password to this script, which queries the database and replies whether authentication succeeded or not.
`DOCS/`
: Documentation (some important or standard files may be directly in the root)
`css/`
: Each `.css` file in this directory is declared in every page.
`db/`
: SQlite database, the only directory writable by the program
`locales/`
: Gettext translations, see [translation.md](translation.md)