{"id":19901011,"url":"https://github.com/m-thalmann/cookbook","last_synced_at":"2025-07-25T00:44:36.955Z","repository":{"id":47793865,"uuid":"390850296","full_name":"m-thalmann/Cookbook","owner":"m-thalmann","description":"A recipe web-app","archived":false,"fork":false,"pushed_at":"2024-04-30T12:44:26.000Z","size":3822,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-24T15:54:16.131Z","etag":null,"topics":["cookbook","recipes","self-hosted","webapp"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m-thalmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-29T21:04:46.000Z","updated_at":"2025-05-30T18:44:53.000Z","dependencies_parsed_at":"2024-04-30T14:07:55.359Z","dependency_job_id":"6faa6b14-3c0a-4f6c-8445-2930b03b3cc5","html_url":"https://github.com/m-thalmann/Cookbook","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/m-thalmann/Cookbook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-thalmann%2FCookbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-thalmann%2FCookbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-thalmann%2FCookbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-thalmann%2FCookbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-thalmann","download_url":"https://codeload.github.com/m-thalmann/Cookbook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-thalmann%2FCookbook/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266933037,"owners_count":24008679,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cookbook","recipes","self-hosted","webapp"],"created_at":"2024-11-12T20:13:52.806Z","updated_at":"2025-07-25T00:44:36.902Z","avatar_url":"https://github.com/m-thalmann.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg alt=\"Cookbook\" src=\"client/src/assets/images/cookbook.svg\" width=\"150\"/\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003eCookbook - Self-hosted recipes\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/license/m-thalmann/cookbook\"\u003e\n\u003cimg alt=\"GitHub code size in bytes\" src=\"https://img.shields.io/github/languages/code-size/m-thalmann/cookbook\"\u003e\n\u003cimg alt=\"GitHub issues\" src=\"https://img.shields.io/github/issues/m-thalmann/cookbook\"\u003e\n\u003ca href=\"https://codecov.io/gh/m-thalmann/Cookbook\"\u003e\n   \u003cimg src=\"https://codecov.io/gh/m-thalmann/Cookbook/branch/main/graph/badge.svg?token=KO36KNI37E\"/\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n## Description\n\nCookbook is a web application that stores all your favorite recipes. Self-hosting gives you full control over your personal recipes and lets you share them with your friends and family.\n\n![Cookbook](docs/images/cookbook.png)\n\n## Selfhosting\n\n### Requirements\n\n- PHP ^8.1\n- Composer (if you want to execute certain commands on the server)\n- MySQL (or almost any other SQL-Server)\n- Apache Webserver\n  - Alternatively any other webserver, in which case you have to replicate the behavior of the `.htaccess` files in `api/public` and `client/src/.htaccess`\n  - Make sure you enable the `mod-rewrite` for Apache and set `AllowOverride All` in order for the `.htaccess` files to work.\n\nTo check the PHP requirements run the following command inside of the release folder (or the api folder):\n\n```\ncomposer check-platform-reqs\n```\n\n### From release\n\n1. Download the `Cookbook-\u003cversion\u003e.zip` file from the release\n1. Create a MySQL-database (alternatively a SQLite-database can be used; see [Development](#development))\n1. Host the `public`-directory publicly on an Apache-Webserver\n1. Update the `.env` and `public/app/assets/config.json` configuration files if necessary (see [Configuration](#configuration))\n1. Run the following command to set the application key: `php artisan key:generate`\n   - Alternatively you can set the `APP_KEY` manually inside of the `.env` file\n1. Run the following command to setup the database: `php artisan migrate --seed`\n   - This also creates the administrator user (you can then update the details of the user)\n1. Link the `public` storage: `php artisan storage:link`\n   - See: https://laravel.com/docs/10.x/filesystem#the-public-disk\n1. Run the following commands (optional; for better performance):\n   1. `php artisan cache:clear`\n   1. `php artisan route:cache` \u0026rarr; https://laravel.com/docs/10.x/routing#route-caching\n   1. `php artisan config:cache` \u0026rarr; https://laravel.com/docs/10.x/configuration#configuration-caching\n   1. `php artisan view:cache` \u0026rarr; https://laravel.com/docs/10.x/views#optimizing-views\n   - **Info:** If the the config (`.env`) or the routes are updated, the corresponding commands have to be re-executed\n\n\u003e **Info:** The `php artisan \u003c...\u003e` commands can also be executed locally, before uploading the application to the server\n\n### From repository\n\n1. Clone the repository / download and extract it\n1. Create a MySQL-database (alternatively a SQLite-database can be used; see [Development](#development))\n1. Setup the api:\n   1. Navigate to the `api` directory\n   1. Install the composer dependencies using `composer install --no-interaction --no-progress --prefer-dist --optimize-autoloader --no-dev`\n   1. Copy `.env.example` to `.env` and update the file if necessary (see section [Configuration](#configuration))\n   1. Host the `public`-directory publicly on an Apache-Webserver\n   1. Run the following command to setup the database: `php artisan migrate --seed`\n      - This also creates the administrator user (you can then update the details of the user)\n   1. Link the `public` storage: `php artisan storage:link`\n   - See: https://laravel.com/docs/10.x/filesystem#the-public-disk\n   1. Run the same optional commands from above\n1. Setup the client\n   1. Navigate into the `client`-directory\n   1. Install the npm dependencies using `npm install`\n   1. Build the client `npm run build`\n   1. Host the created `client/dist/cookbook`-folder publicly\n      - Create a configuration file by copying the file `client/dist/Cookbook/assets/config.example.json` to `client/dist/Cookbook/assets/config.json` and setting the values accordingly (see section [Configuration](#configuration))\n\n### Setting up the cronjob\n\nThere are some (optional) cleanup commands being executed automatically depending on a cronjob. To set that one up do the following:\n\n`/etc/crontab`:\n\n```crontab\n* * * * * www-data cd /project/root \u0026\u0026 php artisan schedule:run \u003e\u003e /dev/null 2\u003e\u00261\n```\n\nSee [Laravel docs](https://laravel.com/docs/9.x/scheduling#running-the-scheduler)\n\n## Configuration\n\n### API configuration\n\n`api/.env`\n\n| Key                              | Datatype  | Description                                                                                          |\n| -------------------------------- | --------- | ---------------------------------------------------------------------------------------------------- |\n| `APP_ENV`                        | `string`  | The API's environment: production, local, demo                                                       |\n| `APP_DEBUG`                      | `boolean` | Whether to pass debug-messages (errors etc.) to the client. \u003cbr\u003e Should not be enabled in production |\n| `APP_URL`                        | `string`  | The url at which the API is reachable                                                                |\n| `APP_FRONTEND_URL`               | `string`  | The url at which the client is reachable                                                             |\n| `APP_TIMEZONE`                   | `string`  | The servers timezone                                                                                 |\n| `APP_DEFAULT_LANGUAGE`           | `string`  | The default language to use                                                                          |\n| `APP_SIGN_UP_ENABLED`            | `boolean` | Whether users are allowed to register                                                                |\n| `APP_EMAIL_VERIFICATION_ENABLED` | `boolean` | Whether the email must be verified                                                                   |\n| `HCAPTCHA_ENABLED`               | `boolean` | Whether the hCaptcha is enabled (see below)                                                          |\n| `HCAPTCHA_SECRET`                | `string`  | The hCaptcha secret (see below)                                                                      |\n| `DB_CONNECTION`                  | `string`  | The database connection to use                                                                       |\n| `DB_HOST`                        | `string`  | The host of the database                                                                             |\n| `DB_PORT`                        | `string`  | The port of the database                                                                             |\n| `DB_DATABASE`                    | `string`  | The database name                                                                                    |\n| `DB_USERNAME`                    | `string`  | The username to access the database                                                                  |\n| `DB_PASSWORD`                    | `string`  | The password to access the database                                                                  |\n| `MAIL_MAILER`                    | `string`  | The mailer to use (normally `smtp`)                                                                  |\n| `MAIL_HOST`                      | `string`  | The host of the mailer Host                                                                          |\n| `MAIL_PORT`                      | `integer` | The port of the mailer                                                                               |\n| `MAIL_USERNAME`                  | `integer` | Email username                                                                                       |\n| `MAIL_PASSWORD`                  | `integer` | Email password                                                                                       |\n| `MAIL_ENCRYPTION`                | `integer` | The encryption used by the mailer                                                                    |\n| `MAIL_FROM_ADDRESS`              | `integer` | The senders email                                                                                    |\n| `MAIL_FROM_NAME`                 | `integer` | The senders name                                                                                     |\n\n\u003e `hcaptcha`: hCaptcha is used to prevent bots from signing-up. Create a free account here: https://www.hcaptcha.com\n\n### Client configuration\n\n`client/src/assets/config.json`:\n\n```jsonc\n{\n  \"apiUrl\": \"/api\", // the URL at which the API is reachable (if release is used this should not be changed)\n  // hcaptcha data (see above)\n  \"hcaptcha.enabled\": true,\n  \"hcaptcha.siteKey\": \"\u003chcaptcha site-key\u003e\"\n}\n```\n\n## Translation\n\nCurrently the Webapp is translated to the following languages:\n\n- English\n- German\n\nTo add a new translation:\n\n1. Client translations:\n   1. Add a file to the `client/src/assets/i18n` directory (use the language-code (ISO 639-1 Language Code))\n   1. Translate the keys used in the other translation-files\n   - **Info:** You can use the [i18n Manager](https://github.com/gilmarsquinelato/i18n-manager) to create the translations (even though the project is archived it works well).\n1. API translations\n   1. Copy the `api/lang/en` directory to `api/lang/\u003clanguage code\u003e`\n   1. Update the values\n\n## Development\n\n### API\n\n1. Navigate to the `api` directory\n1. Install the composer dependencies: `composer install`\n1. Copy the `.env.development` to `.env` and set values if necessary (don't set any database settings)\n1. Create the `api/database/database.sqlite` file (empty)\n1. Set the application key: `php artisan key:generate`\n1. Run the following command to setup the database: `php artisan migrate --seed`\n   - This also creates the administrator user (you can then update the details of the user)\n1. Link the `public` storage: `php artisan storage:link`\n   - See: https://laravel.com/docs/10.x/filesystem#the-public-disk\n1. Start: `php artisan serve`\n\n### Client\n\n1. Navigate to the `client` directory\n1. Install the npm dependencies: `npm install`\n1. Copy the `src/assets/config.example.json` to `src/assets/config.json` and set values if necessary (don't set the `apiUrl`)\n1. Start: `npm run start`\n\n\u003e **Info:** The local development environment uses a proxy to access the API (see https://angular.io/guide/build#proxying-to-a-backend-server)\n\n### Tools \u0026 Routes\n\nThe API has the following helper routes:\n\n- http://localhost:8000/api/docs - Access the OpenAPI documentation (also available in production)\n- http://localhost:8000/clockwork - Debug tool of any request made to the api (not available in production)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-thalmann%2Fcookbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-thalmann%2Fcookbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-thalmann%2Fcookbook/lists"}