1.4 KiB
1.4 KiB
Software architecture
Program flow
router.php
- Receives every external HTTP request from the web server, executes actions required in any case, executes matching code in
pg-act
if appropriate, and callsview.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.
Other components
fn/
- Functions, grouped by concerned service
sftpgo-auth.php
- 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.
check.php
- This file is not part of the normal program execution, it is meant to be run by developers to test that the current setup is working.
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