Add a software architecture documentation page
This commit is contained in:
parent
ff7e770654
commit
2ecc520dae
1 changed files with 40 additions and 0 deletions
40
DOCS/architecture.md
Normal file
40
DOCS/architecture.md
Normal file
|
@ -0,0 +1,40 @@
|
|||
# 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 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.
|
||||
|
||||
## 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](translation.md)
|
Loading…
Reference in a new issue