diff --git a/docs/configuration.md b/docs/configuration.md index 60ac0f0..d8893e9 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -18,7 +18,6 @@ For non-core options (for example UI options), take a look at [Settings](https:/ | `APP_FORCE_HTTPS` | Force HTTPS on all URLs | `false` | | `TRUSTED_PROXIES` | Trusted proxy IP addresses | `null` | | `LOG_VIEWER_ENABLED` | Enable log viewer inside Lychee instead of through CLI. | `true` | -| `VUEJS_ENABLED` | Enable v6 VueJs frontend; set to `false` if the new frontend doesn't work on our installation (this is a **temporary** workaround). | `true` | | `LEGACY_API_ENABLED` | Enable the Legacy API. It will also be enabled if `VUEJS_ENABLED` is set to `false`. | `false` | > {note} `APP_URL` must only contain the hostname up to the Top Level Domain (tld) _e.g._ .com, .org etc. diff --git a/docs/contributions.md b/docs/contributions.md index d3823f8..660564a 100644 --- a/docs/contributions.md +++ b/docs/contributions.md @@ -19,7 +19,7 @@ Those are the versions in which we accept vulnerability reports. |----------------|-----------| | master | ✔ | | latest release | ✔ | -| < 6.0 | ✕ | +| < 7.0 | ✕ | If you discover a security vulnerability within Lychee, please contact us directly on [Discord][2]. All security vulnerabilities will be promptly addressed. @@ -27,6 +27,10 @@ If you discover a security vulnerability within Lychee, please contact us direct You may propose new features or improvements to existing Lychee behavior in the [issue board][1]. If you propose a new feature, please be willing to implement at least some of the code that would be needed to complete the feature. +## Lychee Documentation + +You will find a complete documentation in the original [repository](https://github.com/LycheeOrg/Lychee/tree/master/docs) under the `docs/` folder. + ## Joining the Team You would like to support Lychee and help us push it further? Join the team! diff --git a/docs/docker.md b/docs/docker.md index 70f9200..d5a21ed 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -458,6 +458,7 @@ For galleries with thousands of photos: ### FrankenPHP Benefits The FrankenPHP-powered Version 7 image provides significant performance improvements over Version 6: + - **Faster boot times:** 4-6ms vs 40-60ms per request - **Better throughput:** 3-4x improvement in requests per second - **Lower latency:** Reduced response times across all operations diff --git a/docs/frontend.md b/docs/frontend.md deleted file mode 100644 index 54c175f..0000000 --- a/docs/frontend.md +++ /dev/null @@ -1,43 +0,0 @@ -The current Front-end of Lychee is using [Tailwindcss][1], [AlpineJS][2], [TypeScript][3] and [Blade templates][4]. In order to modify it you will need to recompile it. - -### Dependencies - -In order to compile the front-end, you have to install the following dependencies: - -- `node` [Node.js](http://nodejs.org) v20.0.0 or later -- `npm` [Node Packaged Modules](https://www.npmjs.org) - -After installing [Node.js](http://nodejs.org) you can use the included `npm` package manager to download all dependencies: - -```bash -npm install -``` - -### Build - -In order to generate the front-end visual you will need to run the following: - -```bash -npm run dev -``` -This will create the files required to run Lychee. - -When running in production, you should use instead: -```bash -npm run build -``` -This will create a `public/build` folder with the associated files. - -### Points of attention - -To ease your development, some pain points are to be considered: - -- names of variables (attributes) in blade templates must use camelCase. -- try to keep the alpine components code in the `.ts` files. -- TailwindCSS is doing tree-shaking, this means that any unused css class will not be provided in the production build. - When using classes programatically (e.g. in php), make sure to add them to `tailwind.config.js` - -[1]: https://tailwindcss.com/docs/utility-first -[2]: https://alpinejs.dev -[3]: https://www.typescriptlang.org/ -[4]: https://laravel.com/docs/blade \ No newline at end of file diff --git a/docs/structure.md b/docs/structure.md deleted file mode 100644 index d58d5af..0000000 --- a/docs/structure.md +++ /dev/null @@ -1,130 +0,0 @@ - - -## The Root Directory - -### The App Directory -The `app` directory contains the core code of your application. We'll explore this directory in more detail soon; however, almost all of the classes in your application will be in this directory. - - -### The Bootstrap Directory -The `bootstrap` directory contains the `app.php` file which bootstraps Lychee. This directory also houses a `cache` directory which contains framework generated files for performance optimization such as the route and services cache files. - - -### 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, you 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. - - -### 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 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: -`api-v1.php`, `api-v2.php`, `web-admin-v1.php`, `web-admin-v2.php`, `web-install.php`, `web-v1.php`, and `web-v2.php`. - -This makes the separation between the two REST API: -- `v1` routes are used by legacy endpoints, i.e. version 4 of Lychee. This is mostly used as POST requests. -- `v2` routes are used by the Version 6 front-end with VueJs. It makes use of a more proper REST definition with PATCH, POST, GET and DELETE. - -By default `v1` routes are disabled since version 6. - -### 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). - - - - -### The Tests Directory -The `tests` directory contains your automated tests. An example [PHPUnit][1] test is provided out of the box. Each test class should be suffixed with the word `Test`. You may run your tests using the commands: `make test`, `phpunit` or `php vendor/bin/phpunit` commands. - -> {note} This directory is not provided in the release zip file in order to reduce the size of the archive. - - -### The `vendor` Directory -The `vendor` directory contains your [Composer][2] dependencies. - -> {tip} While this directory is not provided if you use *git* to manage your Lychee installation, we provide it in the release wip file. - -## 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 Console Directory -The `Console` directory contains all of the custom Artisan commands for Lychee. These commands may be generated using the `make:command` command. - - -### The ControllerFunctions Directory -The `ControllerFunctions` directory houses some of the Logic of Lychee. It currently is dedicated to the Installation and Update process. It should hold more logic in the future. - - - - -### The Exceptions Directory -The `Exceptions` directory contains Lychee's exception handler. If you would like to customize how your exceptions are logged or rendered, you should modify the Handler class in this directory. - - -### The Http Directory -The `Http` directory contains your controllers, middleware, and form requests. Almost all of the logic to handle requests entering your application will be placed in this directory. - -It currently houses some logic which should be refactored away. - -### The Image Directory -The `Image` directory contains our image handler. We provide here two ways to manipulate pictures: - -- with GD, -- with imagick. - -### The Metadata Directory -The `Metatdata` directory contains logic related to data such as Exif information, geodecoding, lychee version, GitHub monitoring... - -### The ModelFunctions Directory -The `ModelFunctions` directory contains logic related to the models. This aims to improve interaction between models without clustering their files with logic. - - - - - - - - - - - - - -### 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 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 diff --git a/docs/upgrade.md b/docs/upgrade.md index a689a13..7e044da 100644 --- a/docs/upgrade.md +++ b/docs/upgrade.md @@ -42,6 +42,10 @@ volumes: > {note} Notice the key changes: uploads are now at `/app/public/uploads`, storage at `/app/storage/app`, tmp at `/app/storage/tmp`, and the `.env` file is mounted read-only. +The `/sym` volume has been removed as Lychee no longer uses symbolic links for storage. This was a security feature that originated from version 4, but is no longer necessary as the functionality has been removed. + +**Important:** With the 3 volumes under `/app/storage`, you may think you could simplify the configuration by specifying one single volume for `/app/storage` instead. This is incorrect. Doing so will make the app exit with the error "The `/app/bootstrap/cache` directory must be present and writable." + ### Service Architecture Changes Version 7 introduces a multi-service architecture with an optional worker service for background job processing. @@ -215,12 +219,7 @@ Key changes to your environment configuration: docker-compose up -d ``` -#### 7. **Run Migrations** -```bash -docker exec lychee php artisan migrate -``` - -#### 8. **Verify Installation** +#### 7. **Verify Installation** Check that all services are running: ```bash @@ -232,6 +231,16 @@ Check logs for errors: docker-compose logs -f lychee ``` +#### 8. **Fix the thumbnails** + +You will notice that after the upgrade, thumbnails are missing. You can regenerate them by running: +```bash +docker exec -it lychee php artisan lychee:backfill-album-fields +``` + +or by logging into the web interface and going to Settings ⇒ Maintenance ⇒ Album Precomputed Fields. + + ### Troubleshooting **Workers not processing jobs** diff --git a/gen.py b/gen.py index a2e92f7..c1507bd 100644 --- a/gen.py +++ b/gen.py @@ -63,8 +63,6 @@ def generate_base(): pages_title['contributions'] = 'Contribution Guide' pages_title['api'] = 'API Documentation' pages_title['architecture'] = 'Lychee logic overview' -pages_title['structure'] = 'Directory Structure' -pages_title['frontend'] = 'Front-end' structure = [['Prologue', ['releases']]] @@ -75,7 +73,7 @@ def generate_base(): structure += [['Frequently Asked Question', ['faq_general', 'faq_installation', 'faq_troubleshooting']]] structure += [['Contributing', - ['contributions', 'api', 'architecture', 'structure', 'frontend']]] + ['contributions', 'api', 'architecture']]] def gen_github_link(page):