diff --git a/docs/configuration.md b/docs/configuration.md index 75f4b6da..c17bd5cc 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -5,16 +5,19 @@ For non-core options (for example UI options), take a look at [Settings](https:/ ### Base options -|Option|Description|Default| -|---|---|---| -|`APP_NAME`|The gallery name|`Lychee`| -|`APP_ENV`|Environment of your gallery, `production` or `development`|`production`| -|`APP_URL`|The URL of your gallery (which resolves to the `public/` folder)|`http://localhost`| -|`APP_KEY`|Your app key which is used for encryption (set during installation)|`null`| -|`TIMEZONE`|The timezone of your photos, requires a named timezone identifier like `Europe/Paris`, don't use an offset (`+01:00`) or an abbreviation (`CEST`)|system timezone of server| -|`LYCHEE_UPLOADS`|Path to uploads directory|`uploads/` inside `public/`| -|`LYCHEE_UPLOADS_URL`|URL to uploads directory|`uploads/`| -|`TRUSTED_PROXIES`|Trusted proxy IP addresses|`null`| +| Option | Description | Default | +|------------|-----------------------------------------------------------------------------------------------------------------|--------------------| +| `APP_NAME` | The gallery name | `Lychee` | +| `APP_ENV` | Environment of your gallery, `production` or `development` | `production` | +| `APP_URL` | The URL of your gallery (which resolves to the `public/` folder) | `http://localhost` | +| `APP_DIR` | The URL path after the domain name of your gallery (which resolves to the `public/` folder), better left empty. | _empty_ | +| `APP_KEY` | Your app key which is used for encryption (set during installation) | `null` | +|`TIMEZONE` | The timezone of your photos, requires a named timezone identifier like `Europe/Paris`, don't use an offset (`+01:00`) or an abbreviation (`CEST`)|system timezone of server| +|`LYCHEE_UPLOADS` | Path to uploads directory | `uploads/` inside `public/` | +|`LYCHEE_UPLOADS_URL`| URL to uploads directory, better left empty | `/uploads` | +|`TRUSTED_PROXIES` | Trusted proxy IP addresses | `null` | +|`LIVEWIRE_ENABLED` | Enable v5 Livewire frontend, set to false if you prefer old v4 (but no front-end updates). | `true` | +|`LOG_VIEWER_ENABLED`| Enable log viewer inside Lychee instead of through CLI. | `true` | ### Database options @@ -35,47 +38,47 @@ If this applies to your hosting provider, you can skip the other DB configuratio The configuration is exactly the same for both systems. -|Option|Value it should have| -|---|---| -|`DB_CONNECTION`|`mysql`| -|`DB_HOST`|Host of the database server (if it's running on the same server use `127.0.0.1`)| -|`DB_PORT`|Port of the database server (default 3306)| -|`DB_DATABASE`|The name of the database| -|`DB_USERNAME`|Username of the database user| -|`DB_PASSWORD`|Password of the database user| -|`DB_SOCKET`|UNIX socket to DB server, replaces `DB_HOST` and `DP_PORT`| -|`MYSQL_ATTR_SSL_CA`|Optional and only used when using the `pdo_mysql` extension, file path to the SSL certificate authority| +| Option | Value it should have | +|---------------------|---------------------------------------------------------------------------------------------------------| +| `DB_CONNECTION` | `mysql` | +| `DB_HOST` | Host of the database server (if it's running on the same server use `127.0.0.1`) | +| `DB_PORT` | Port of the database server (default 3306) | +| `DB_DATABASE` | The name of the database | +| `DB_USERNAME` | Username of the database user | +| `DB_PASSWORD` | Password of the database user | +| `DB_SOCKET` | UNIX socket to DB server, replaces `DB_HOST` and `DP_PORT` | +| `MYSQL_ATTR_SSL_CA` | Optional and only used when using the `pdo_mysql` extension, file path to the SSL certificate authority | #### SQLite -|Option|Value it should have| -|---|---| -|`DB_CONNECTION`|`sqlite`| -|`DB_DATABASE`|Path to the database file (default `database/database.sqlite`)| +| Option | Value it should have | +|-----------------|----------------------------------------------------------------| +| `DB_CONNECTION` | `sqlite` | +| `DB_DATABASE` | Path to the database file (default `database/database.sqlite`) | #### PostgreSQL -|Option|Value it should have| -|---|---| -|`DB_CONNECTION`|`pgsql`| -|`DB_HOST`|Host of the database server (if it's running on the same server use `127.0.0.1`) or socket path| -|`DB_PORT`|Port of the database server or `null` if using socket (default 5432)| -|`DB_DATABASE`|The name of the database| -|`DB_USERNAME`|Username of the database user| -|`DB_PASSWORD`|Password of the database user| +| Option | Value it should have | +|-----------------|-------------------------------------------------------------------------------------------------| +| `DB_CONNECTION` | `pgsql` | +| `DB_HOST` | Host of the database server (if it's running on the same server use `127.0.0.1`) or socket path | +| `DB_PORT` | Port of the database server or `null` if using socket (default 5432) | +| `DB_DATABASE` | The name of the database | +| `DB_USERNAME` | Username of the database user | +| `DB_PASSWORD` | Password of the database user | #### Microsoft SQL Server > {note} Microsoft SQL Server is not officially supported. It may work, but we can't help you if you have any issues with it that do not affect other DB systems as well. -|Option|Value it should have| -|---|---| -|`DB_CONNECTION`|`sqlsrv`| -|`DB_HOST`|Host of the database server (if it's running on the same server use `127.0.0.1`)| -|`DB_PORT`|Port of the database server (default 1433)| -|`DB_DATABASE`|The name of the database| -|`DB_USERNAME`|Username of the database user| -|`DB_PASSWORD`|Password of the database user| +| Option | Value it should have | +|-----------------|----------------------------------------------------------------------------------| +| `DB_CONNECTION` | `sqlsrv` | +| `DB_HOST` | Host of the database server (if it's running on the same server use `127.0.0.1`) | +| `DB_PORT` | Port of the database server (default 1433) | +| `DB_DATABASE` | The name of the database | +| `DB_USERNAME` | Username of the database user | +| `DB_PASSWORD` | Password of the database user | ### Mailer options @@ -83,21 +86,21 @@ Supported mailers are `smtp`, `ses`, `mailgun`, `postmark` or `sendmail`, which #### General options -|Option|Description| -|---|---| -|`MAIL_DRIVER`|Mailer type| -|`MAIL_FROM_ADDRESS`|"From" address| -|`MAIL_FROM_NAME`|"From" name| +| Option | Description | +|---------------------|----------------| +| `MAIL_DRIVER` | Mailer type | +| `MAIL_FROM_ADDRESS` | "From" address | +| `MAIL_FROM_NAME` | "From" name | #### SMTP -|Option|Description| -|---|---| -|`MAIL_HOST`|Host of SMTP server| -|`MAIL_PORT`|Port of SMTP server (default 587)| -|`MAIL_ENCRYPTION`|Encryption for SMTP server (default `tls`)| -|`MAIL_USERNAME`|Username of SMTP server| -|`MAIL_PASSWORD`|Password of SMTP server| +| Option | Description | +|-------------------|--------------------------------------------| +| `MAIL_HOST` | Host of SMTP server | +| `MAIL_PORT` | Port of SMTP server (default 587) | +| `MAIL_ENCRYPTION` | Encryption for SMTP server (default `tls`) | +| `MAIL_USERNAME` | Username of SMTP server | +| `MAIL_PASSWORD` | Password of SMTP server | #### SES @@ -105,17 +108,17 @@ SES can be configured using AWS settings. See [AWS configuration](#aws). #### Mailgun -|Option|Description| -|---|---| -|`MAILGUN_DOMAIN`|Domain of the Mailgun server| -|`MAILGUN_SECRET`|Secret of the Mailgun server| -|`MAILGUN_ENDPOINT`|Mailgun endpoint (default `api.mailgun.net`)| +| Option | Description | +|--------------------|----------------------------------------------| +| `MAILGUN_DOMAIN` | Domain of the Mailgun server | +| `MAILGUN_SECRET` | Secret of the Mailgun server | +| `MAILGUN_ENDPOINT` | Mailgun endpoint (default `api.mailgun.net`) | #### Postmark -|Option|Description| -|---|---| -|`POSTMARK_TOKEN`|Token for Postmark| +| Option | Description | +|------------------|--------------------| +| `POSTMARK_TOKEN` | Token for Postmark | #### sendmail @@ -127,36 +130,36 @@ Lychee can use various services as cache driver to store temporary data. The dri #### General options -|Option|Description| -|---|---| -|`CACHE_PREFIX`|Prefix of cache data keys in in-memory stores| +| Option | Description | +|----------------|-----------------------------------------------| +| `CACHE_PREFIX` | Prefix of cache data keys in in-memory stores | #### Memcached -|Option|Description| -|---|---| -|`MEMCACHED_HOST`|Host for memcached| -|`MEMCACHED_PORT`|Port for memcached| -|`MEMCACHED_USERNAME`|Username for memcached| -|`MEMCACHED_PASSWORD`|Password for memcached| -|`MEMCACHED_PERSISTENT_ID`|Persistent ID for memcached| +| Option | Description | +|---------------------------|-----------------------------| +| `MEMCACHED_HOST` | Host for memcached | +| `MEMCACHED_PORT` | Port for memcached | +| `MEMCACHED_USERNAME` | Username for memcached | +| `MEMCACHED_PASSWORD` | Password for memcached | +| `MEMCACHED_PERSISTENT_ID` | Persistent ID for memcached | #### DynamoDB Base options are configured using [AWS options](#aws). You need to create a table, please refer to the [Laravel docs](https://laravel.com/docs/8.x/cache#dynamodb). -|Option|Description| -|---|---| -|`DYNAMODB_CACHE_TABLE`|Cache table name|`cache`| -|`DYNAMODB_ENDPOINT`|DynamoDB endpoint|`null`| +| Option | Description | Default | +|------------------------|-------------------|---------| +| `DYNAMODB_CACHE_TABLE` | Cache table name | `cache` | +| `DYNAMODB_ENDPOINT` | DynamoDB endpoint | `null` | #### Redis Also see [Redis](#redis). -|Option|Description| -|---|---| -|`REDIS_CACHE_DB`|Redis cache database| +| Option | Description | +|------------------|----------------------| +| `REDIS_CACHE_DB` | Redis cache database | #### Database @@ -170,74 +173,74 @@ Lychee can interact with various third-party services. You can find config optio To use Redis, you need the [PhpRedis](https://github.com/phpredis/phpredis) PHP extension. -|Option|Description| -|---|---| -|`REDIS_SCHEME`|Redis connection scheme (default `tcp`, other option `unix`)| -|`REDIS_PATH`|Redis Unix socket path| -|`REDIS_HOST`|Redis host| -|`REDIS_PASSWORD`|Redis password| -|`REDIS_PORT`|Redis port| -|`REDIS_CLUSTER`|Redis cluster| -|`REDIS_PREFIX`|Redis prefix| -|`REDIS_URL`|Redis URL| +| Option | Description | +|------------------|--------------------------------------------------------------| +| `REDIS_SCHEME` | Redis connection scheme (default `tcp`, other option `unix`) | +| `REDIS_PATH` | Redis Unix socket path | +| `REDIS_HOST` | Redis host | +| `REDIS_PASSWORD` | Redis password | +| `REDIS_PORT` | Redis port | +| `REDIS_CLUSTER` | Redis cluster | +| `REDIS_PREFIX` | Redis prefix | +| `REDIS_URL` | Redis URL | #### AWS -|Option|Description| -|---|---| -|`AWS_ACCESS_KEY_ID`|Access key ID for AWS| -|`AWS_SECRET_ACCESS_KEY`|Secret access key for AWS| -|`AWS_DEFAULT_REGION`|Default AWS region| +| Option | Description | +|-------------------------|---------------------------| +| `AWS_ACCESS_KEY_ID` | Access key ID for AWS | +| `AWS_SECRET_ACCESS_KEY` | Secret access key for AWS | +| `AWS_DEFAULT_REGION` | Default AWS region | ### Authentication Guards Support for token based authentication used by API requests. -|Name|Description| -|---|---| -|`ENABLE_TOKEN_AUTH`|Authentication Guard token support| +| Name | Description | +|---------------------|------------------------------------| +| `ENABLE_TOKEN_AUTH` | Authentication Guard token support | ### Session and security options Sessions are stored in the same locations as [cache](#cache). You change the used driver using `SESSION_DRIVER`. -|Name|Description| -|---|---| -|`SESSION_LIFETIME`|Idle session expiration in minutes; the session will need to be reinitialized once it has expired (default 120)| -|`SESSION_SECURE_COOKIE`|Cookies only via HTTPS|`false`| -|`SECURITY_HEADER_HSTS_ENABLE`|Enable HTTP strict transport security|`false`| +| Name | Description | Default | +|-------------------------------|----------------------------------------------------------------------------------------------------|---------| +| `SESSION_LIFETIME` | Idle session expiration in minutes; the session will need to be reinitialized once it has expired. | 120 | +| `SESSION_SECURE_COOKIE` | Cookies only via HTTPS | `false` | +| `SECURITY_HEADER_HSTS_ENABLE` | Enable HTTP strict transport security | `false` | #### Advanced options > {note} These config options are advanced config options. Do not change them unless you know what you are doing. -|Option|Description| -|---|---| -|`APP_CIPHER`|The app's cipher suite| -|`HASHING_DRIVER`|Hashing algorithm for passwords (default `bcrypt`, other options `argon` or `argon2id`)| -|`ARGON_MEMORY`|Memory for Argon hashing algorithm| -|`ARGON_THREADS`|Threads for Argon hashing algorithm| -|`ARGON_TIME`|Time for Argon hashing algorithm| -|`BCRYPT_ROUNDS`|Rounds for bcrypt hashing algorithm| -|`WEBAUTHN_NAME`|Name for Webauthn devices| -|`WEBAUTHN_ID`|ID for Webauthn devices| -|`WEBAUTHN_ICON`|Icon for Webauthn devices| -|`WEBAUTHN_CACHE`|Cache for Webauthn devices| -|`SESSION_COOKIE`|The cookie's name| -|`SESSION_DOMAIN`|Session cookie domain| +| Option | Description | +|------------------|-----------------------------------------------------------------------------------------| +| `APP_CIPHER` | The app's cipher suite | +| `HASHING_DRIVER` | Hashing algorithm for passwords (default `bcrypt`, other options `argon` or `argon2id`) | +| `ARGON_MEMORY` | Memory for Argon hashing algorithm | +| `ARGON_THREADS` | Threads for Argon hashing algorithm | +| `ARGON_TIME` | Time for Argon hashing algorithm | +| `BCRYPT_ROUNDS` | Rounds for bcrypt hashing algorithm | +| `WEBAUTHN_NAME` | Name for Webauthn devices | +| `WEBAUTHN_ID` | ID for Webauthn devices | +| `WEBAUTHN_ICON` | Icon for Webauthn devices | +| `WEBAUTHN_CACHE` | Cache for Webauthn devices | +| `SESSION_COOKIE` | The cookie's name | +| `SESSION_DOMAIN` | Session cookie domain | ### Development options > {note} Don't use this in productive environments. May affect stability and performance. -|Option|Description| -|---|---| -|`APP_ENV`|Set to `development` to enable development environment| -|`APP_DEBUG`|Enable debug mode| -|`DEBUGBAR_ENABLED`|Enable debugbar| -|`DB_LOG_SQL`|Log SQL statements, find the log file under `storage/logs/laravel.log`| -|`LIVEWIRE_ENABLED`|Enable experimental Livewire frontend| +| Option | Description | Default | +|----------------------|--------------------------------------------------------|---------| +| `APP_ENV` | Set to `development` to enable development environment | `prod` | +| `APP_DEBUG` | Enable debug mode | `false` | +| `DEBUGBAR_ENABLED` | Enable debugbar | `false` | +| `DB_LOG_SQL` | Log SQL statements, see your Logs within Lychee. | `false` | +| `DB_LOG_SQL_EXPLAIN` | Explain the SQL statements for MySQL. | `false` | ### Advanced configuration @@ -251,17 +254,17 @@ You can look at the files in the `config/` folder. They contain some options you These options are unused right now, but may be used in the future. -|Option|Description| -|---|---| -|`REDIS_DB`|Redis database, used for broadcasting and queue| -|`REDIS_QUEUE`|Redis queue| -|`BROADCAST_DRIVER`|Broadcast driver| -|`QUEUE_DRIVER`|Queue driver| -|`PUSHER_APP_ID|Pusher app ID| -|`PUSHER_APP_KEY|Pusher app secret| -|`PUSHER_APP_SECRET|Pusher app secret| -|`PUSHER_APP_CLUSTER|Pusher app cluster| -|`FILESYSTEM_CLOUD`|Cloud Filesystem| +| Option | Description | +|----------------------|-------------------------------------------------| +| `REDIS_DB` | Redis database, used for broadcasting and queue | +| `REDIS_QUEUE` | Redis queue | +| `BROADCAST_DRIVER` | Broadcast driver | +| `QUEUE_DRIVER` | Queue driver | +| `PUSHER_APP_ID` | Pusher app ID | +| `PUSHER_APP_KEY` | Pusher app secret | +| `PUSHER_APP_SECRET` | Pusher app secret | +| `PUSHER_APP_CLUSTER` | Pusher app cluster | +| `FILESYSTEM_CLOUD` | Cloud Filesystem | --> @@ -281,48 +284,16 @@ If you are developing with a team, you may wish to continue including a `.env.ex All variables in your `.env` files are parsed as strings, so some reserved values have been created to allow you to return a wider range of types from the `env()` function: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
.env Valueenv() Value
true(bool) true
(true)(bool) true
false(bool) false
(false)(bool) false
empty(string) ''
(empty)(string) ''
null(null) null
(null)(null) null
+| `.env` Value | `env()` Value | +|--------------|---------------| +| true | (bool) true | +| (true) | (bool) true | +| false | (bool) false | +| (false) | (bool) false | +| empty | (string) '' | +| (empty) | (string) '' | +| null | (null) null | +| (null) | (null) null | If you need to define an environment variable with a value that contains spaces, you may do so by enclosing the value in double quotes. diff --git a/docs/contributions.md b/docs/contributions.md index 9c578a84..6fd937fc 100644 --- a/docs/contributions.md +++ b/docs/contributions.md @@ -15,11 +15,11 @@ Lychee's GitHub issue trackers are not intended to provide Lychee help or suppor Lychee uses a rolling release system, **we do not backport fixes to previously released versions**. Those are the versions in which we accept vulnerability reports. -| Version | Supported| -|--------------|----------| -|master |✔ | -|latest release|✔ | -|< 4.0 |✕ | +| Version | Supported | +|----------------|-----------| +| master | ✔ | +| latest release | ✔ | +| < 5.0 | ✕ | If you discover a security vulnerability within Lychee, please contact us directly on [Gitter][2]. All security vulnerabilities will be promptly addressed. diff --git a/docs/installation.md b/docs/installation.md index 4f497cc7..6a761505 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -9,7 +9,7 @@ The Lychee gallery has a few system requirements. You will need to make sure you - MySQL _(version > 5.7.8)_ / MariaDB _(version > 10.2)_ - PostgreSQL _(version > 9.2)_ - Lychee's inbuilt SQLite3 support -- PHP >= 8.1 with these PHP extensions: +- PHP >= 8.2 with these PHP extensions: - bcmath - ctype - dom @@ -205,7 +205,7 @@ server { fastcgi_param HTTP_PROXY ""; ######### Make sure this is the correct socket for your system - fastcgi_pass unix:/run/php/php8.1-fpm.sock; + fastcgi_pass unix:/run/php/php8.2-fpm.sock; fastcgi_index index.php; ######## You may need to replace $document_root with the absolute path to your public folder. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; diff --git a/docs/releases.md b/docs/releases.md index c867dd1b..011c85d4 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -30,6 +30,65 @@ ## Version 5 +### v5.0.3 + +Released on Jan 12, 2024 + +#### New settings on `APP_URL` + +From this version Lychee v5 supports hosting with sub-folders. Please update your `.env` as follows: + +- `APP_URL` **must** only contain the hostname up to the Top Level Domain (tld) e.g. .com, .org etc. + +If you are using Lychee in a sub folder, specify the path after the tld here in the `APP_DIR` constant. +For example for `https://lychee.test/path/to/lychee`: + +- Set `APP_URL=https://lychee.test` +- and `APP_DIR=/path/to/lychee` + +#### Do note that We (LycheeOrg) do not recommend the use of APP_DIR. + +#### Changes + +* `fixes` #2126 : Cover for upper level album cannot be set - error 500 by @ildyria +* `new` #2124 : Add clear error message when CSS is not loading by @ildyria +* `fixes` #2135 : Description should be desc for overlay by @ildyria +* `new` #2128 : Provide the ability to change the sorting of sub-album per album (Livewire only). by @ildyria +* `fixes` #2142 : Improved diagnostics with censored URLs by @ildyria +* `fixes` #2143 and #2157 : fix Russian about. by @ildyria +* `fixes` #2158 : Error displaying enlarged images when accessing a public album without being logged in by @ildyria +* `fixes` #2161 : Update Readme, add theme repository, optimize ImageMagick by @tinohager +* `fixes` #2147 : Fix custom.js not being loaded by @ildyria +* `fixes` #2166 : Fix uploading large number of images fails with 429 by @ildyria +* `fixes` #2171 : Remove text-neutral for easier configuration of themes by @ildyria +* `new` #2153 : Add compact view for albums by @ildyria +* `fixes` #2154 : Fix WebAuthn not working by @ildyria +* `fixes` #2172 : Fix QR code displaying wrong URL by @ildyria +* `fixes` #2137 : Fix livewire not working on directory folders by @ildyria +* `new` #2138 : Allow different aspect ratios for album thumbs (+ per album setting) by @ildyria +* `fixes` #2181 : Improved diagnostics by @ildyria +* `fixes` #2186 : Fix double f aperture in sidebar by @ildyria +* `new` #2179 : Add notify toast when updating user by @ildyria +* `fixes` #2164 : Fix errors on access rights by @ildyria +* `fixes` #2178 : Fix back button on unlock page. by @ildyria +* `new` #2185 : Add left-right for login button + add custom go Home button by @ildyria +* `new` #2182 : make APP_URL optional again by @ildyria + +### v5.0.2 + +Released on Dec 28, 2023 + +#### Fix SQL injection. + +See here for more details: [GHSA-rjwv-5j3m-p5x4](https://github.com/LycheeOrg/Lychee/security/advisories/GHSA-rjwv-5j3m-p5x4) + +#### Changes + +* `fixes` #2116 : Fixes hover (left-right) preventing clicks on volume etc buttons + fix frame button by @ildyria +* `fixes` #2118 : Fix drag upload bug by @maoxian-1 +* `fixes` #2123 : Fix SQL Injection by @ildyria + + ### v5.0.1 Released on Dec 27, 2023 diff --git a/docs/structure.md b/docs/structure.md index 7c928ff9..9763ef22 100644 --- a/docs/structure.md +++ b/docs/structure.md @@ -14,6 +14,8 @@ The `bootstrap` directory contains the `app.php` file which bootstraps Lychee. T ### The Config Directory The `config` directory, as the name implies, contains all of Lychee's configuration files. It's a great idea to read through all of these files and familiarize yourself with all of the options available to you. +### The Lang Directory +The `lang` directory contains your language localization. If you wish, can update our translations and submit a pull request. ### The Database Directory The `database` directory contains your database migrations, model factories, and seeds. If you wish, you may also use this directory to hold an SQLite database. @@ -21,27 +23,15 @@ The `database` directory contains your database migrations, model factories, and ### The Public Directory The `public` directory contains the `index.php` file, which is the entry point for all requests entering Lychee and configures autoloading. - +This directory also houses your assets such as images, JavaScript, and CSS. ### The Resources Directory -The `resources` directory contains your views. - - +The `resources` directory contains your views as well as the TypeScript and CSS for the front-end. ### The Routes Directory -The `routes` directory contains all of the route definitions for Lychee. Several route files are included with Lychee: `admin.php`, `web.php`, `api.php`, `console.php` and `channels.php`. We only use the first two. - -The `web.php` file contains routes that the `RouteServiceProvider` places in the `web` middleware group, which provides session state, CSRF protection, and cookie encryption. - -The `admin.php` file contains routes with the same requirement as in `web.php` while adding an admin middleware to protect them. - - - - - - - +The `routes` directory contains all of the route definitions for Lychee. Several route files are included with Lychee: +`api.php`, `web-admin.php`, `web-install.php`, `web-livewire.php`, and `web.php`. ### The Storage Directory The `storage` directory contains your compiled Blade templates, file based sessions, file caches, and other files generated by the framework. This directory is segregated into `app`, `framework`, and `logs` directories. The `app` directory may be used to store any files generated by your application. The `framework` directory is used to store framework generated files and caches. Finally, the `logs` directory contains Laravel's log files (useful in case of hard crash). @@ -63,16 +53,7 @@ The `vendor` directory contains your [Composer][2] dependencies. ## The App Directory The majority of Lychee is housed in the `app` directory. By default, this directory is namespaced under `App` and is autoloaded by Composer using the [PSR-4 autoloading standard][3]. -The `app` directory contains a variety of additional directories such as `Console`, `Http`, and `Providers`. Think of the `Console` and `Http` directories as providing an API into the core of your application. The HTTP protocol and CLI are both mechanisms to interact with Lychee, but do not actually contain application logic. In other words, they are two ways of issuing commands to Lychee. The `Console` directory contains all of the Artisan commands, while the `Http` directory contains your controllers, middleware, and requests. - - - - - - - - +The `app` directory contains a variety of additional directories such as `Console`, `Http`, `Livewire` and `Providers`. Think of the `Console`, `Livewire`, and `Http` directories as providing an API into the core of your application. The HTTP protocol and CLI are both mechanisms to interact with Lychee, but do not actually contain application logic. In other words, they are two ways of issuing commands to Lychee. The `Console` directory contains all of the Artisan commands, while the `Http` directory contains your controllers, middleware, and requests. Furthermore the `Livewire` directory contains the serverside code necessary for new front-end. ### The Console Directory The `Console` directory contains all of the custom Artisan commands for Lychee. These commands may be generated using the `make:command` command. @@ -100,8 +81,8 @@ The `Image` directory contains our image handler. We provide here two ways to ma - with GD, - with imagick. -### The Locale Directory -The `Locale` directory contains at the moment all the translations strings for Lychee. This inhouse solution needs to be refactored to follow a better design. +### The Livewire Directory +The `Livewire` directory contains the server-side logic for the Livewire front-end. See more [here](livewire.html) ### The Metadata Directory The `Metatdata` directory contains logic related to data such as Exif information, geodecoding, lychee version, GitHub monitoring... @@ -125,20 +106,22 @@ This directory does not exist by default, but will be created for you if you exe This directory does not exist by default, but will be created for you if you execute the make:notification Artisan command. The Notifications directory contains all of the "transactional" notifications that are sent by your application, such as simple notifications about events that happen within your application. Laravel's notification features abstracts sending notifications over a variety of drivers such as email, Slack, SMS, or stored in a database. --> - - +### The Policies Directory +The `Policies` directory contains the authorization policy classes for your application. Policies are used to determine if a user can perform a given action against a resource. ### The Providers Directory The `Providers` directory contains all of the [service providers][4] for Lychee. Service providers bootstrap Lychee by binding services in the service container, registering events, or performing any other tasks to prepare your application for incoming requests. +### The Relation Directory +The `Relation` directory contains the handcrafted relationships used by Lychee to between models. Those house some of the most complex part of Lychee. + ### The Redirection Directory The `Redirection` directory houses main redirection to handle the installation (database not set) and safety cases (security key not set). - +### The Rules Directory +The `Rules` directory contains the custom validation rule objects for your application. Rules are used to encapsulate complicated validation logic in a simple object. [1]: https://phpunit.de/ [2]: https://getcomposer.org/ [3]: https://www.php-fig.org/psr/psr-4/ -[4]: https://laravel.com/docs/7.x/providers \ No newline at end of file +[4]: https://laravel.com/docs/7.x/providers