{"id":22065258,"url":"https://github.com/jgcarrillo/reverse-recipes","last_synced_at":"2026-04-11T01:02:46.665Z","repository":{"id":37096033,"uuid":"480349364","full_name":"jgcarrillo/reverse-recipes","owner":"jgcarrillo","description":"Web application to manage database of recipes by ingredients","archived":false,"fork":false,"pushed_at":"2023-04-02T10:55:17.000Z","size":4208,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2024-03-27T18:47:13.931Z","etag":null,"topics":["docker","inertiajs","javascript","jetstream","laravel","mysql","php","tailwindcss","vue"],"latest_commit_sha":null,"homepage":"","language":"Vue","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/jgcarrillo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-04-11T11:26:03.000Z","updated_at":"2024-03-27T18:47:13.932Z","dependencies_parsed_at":"2024-12-06T07:45:54.546Z","dependency_job_id":null,"html_url":"https://github.com/jgcarrillo/reverse-recipes","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgcarrillo%2Freverse-recipes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgcarrillo%2Freverse-recipes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgcarrillo%2Freverse-recipes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgcarrillo%2Freverse-recipes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jgcarrillo","download_url":"https://codeload.github.com/jgcarrillo/reverse-recipes/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245144975,"owners_count":20568056,"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","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":["docker","inertiajs","javascript","jetstream","laravel","mysql","php","tailwindcss","vue"],"created_at":"2024-11-30T19:15:57.875Z","updated_at":"2026-04-11T01:02:46.615Z","avatar_url":"https://github.com/jgcarrillo.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"![image](docs/images/cover.JPG)\n\n\u003cdiv align=\"center\"\u003e\n    \u003cb\u003e🍕🍔🍟 Reverse recipes. A basic web app to manage a database of recipes 🍕🍔🍟\u003c/b\u003e\n\u003c/div\u003e\n\n## Table of contents 👇\n\n- [✨ How to install](#-how-to-install)\n- [🚀 Git Workflow](#-git-workflow)\n- [🕸️ How to contribute](#-how-to-contribute)\n- [🚩 Cheatsheet](#-cheatsheet)\n- [🔒 Database](#-database)\n- [🔥 Production mode](#-production-mode)\n- [🌎 Test the app in your phone](#-test-the-app-in-your-phone)\n- [🔧 PHP GD library](#-php-gd-library)\n- [📧 Email verification](#-email-verification)\n- [🎢 Deployment](#-deployment)\n- [😖 Throubleshooting with deployment](#-throubleshooting-with-deployment)\n- [💣 Graphical access to Heroku Database](#-graphical-access-to-heroku-database)\n- [💘 Reset to a specific commit](#-reset-to-a-specific-commit)\n\n## ✨ How to install\n\n1. `Git clone`.\n2. Execute `npm install and composer install`.\n3. Copy *.env.example* file to *.env* on the root folder.\n4. Change database name to `laravel_vue_reverse_recipes`.\n5. Create a file `.env` in the root and copy the content of `.env.example` inside it.\n6. Run `php artisan key:generate`. \n7. Run `php artisan migrate`.\n8. Run `php artisan serve`.\n\nTo run scripts from package.json when files change (TailwindCSS) execute `npm run watch` in another terminal. **Don't close it.**\n\n### 🚀 Git Workflow\n\n- **Main branch**: this branch includes the last version of the web (production).\n- **Develop branch**: this branch has all the changes waiting to be merged into the *main branch*.\n- **Feature branch**: new feature until it is complete.\n\n## 🕸️ How to contribute\n\nIf you want to make changes into the project, do the following:\n\n1. Create a new feature branch, for example, `feature/create-navbar`.\n2. Make changes and test them.\n3. If everything is correct, commit those changes and push to Github.\n4. Switch to the `develop` branch and merge those changes. For example, `git checkout develop`, to switch to develop branch, and then `git merge feature/create-navbar`.\n5. Test everything and, if it's ok, commit and push to GitHub.\n6. Once several changes have been made to the `develop branch` it's time to merge with `main` to create stable version of the project. `git checkout main` and `git merge develop`. Then `git push`.\n7. Delete the feature branch `git branch -d feature/create-navbar`.\n\n## 🚩 Cheatsheet\n\n- Show branches: `git branch`\n- Create branch: `git branch \u003cbranch\u003e`\n- Create branch and switch: `git checkout -b \u003cbranch\u003e`\n- Switch to another branch: `git checkout \u003cbranch\u003e`\n- Delete branch: `git branch -d \u003cbranch\u003e`\n- Push branch to Github: `git push --set-upstream origin \u003cbranch\u003e`\n- Delete remote branch: `git push origin -d \u003cbranch\u003e`\n- Update remote branches: `git remote update origin --prune`\n- Create tag: `git tag v0.1.0`\n- List tags: `git tag -l`\n- Push tag to Github: `git push origin \u003ctag\u003e`\n\nTo create the **storage link** you need to type `php artisan storage:link` and then change the current `APP_URL` inside `.env` file to `APP_URL=http://localhost:8000` or whatever you use.\n\n## 🔒 Database\n\nIn order to create database you need to run `php artisan migrate`. After that, execute `php artisan db:seed`. Make sure you only execute that last command **once**.\n\n## 🔥 Production mode \n\nTo test the app in production mode set those variables in `.env` file:\n```env\nAPP_ENV=production\nAPP_DEBUG=false\n```\n\nRestart the server to apply the changes.\n\n## 🌎 Test the app in your phone\n\nRun a local serve with: `php artisan serve --host [YOUR IP] --port 8000`. Now, you will be able to access from *http://[YOUR IP]:8000*.\n\n## 🔧 PHP GD Library\n\nIf you are a Windows user, and you are using XAMPP, in order to see the images when you export a recipe as PDF you need to go to your *PHP folder* inside XAMPP, open `php.ini` and uncomment the option `;extension=gd`.\n\nThe set the GD extension available also in deployment, you need to add it into the `composer.json` file.\n\n```json\n{\n    \"require\": {\n        \"ext-gd\": \"*\"\n    }\n}\n```\n\nThen, run a `composer update` command.\n\n## 📧 Email verification\n\n**DEPRECATED**\n\n⚠️ Since May 2022 Google doesn't allow you to access third-party apps, so you can't set up *email verification* using Google Services. You need to use another provider such as Mailtrap. ⚠️\n\nThe proper configuration is similar to this:\n\n```dotenv\nMAIL_MAILER=smtp\nMAIL_HOST=smtp.mailtrap.io\nMAIL_PORT=2525\nMAIL_USERNAME=\u003cYour Mailtrap username\u003e\nMAIL_PASSWORD=\u003cYour Mailtrap password\u003e\nMAIL_ENCRYPTION=tls\nMAIL_FROM_ADDRESS=\"\u003cYour custom address\u003e\"\nMAIL_FROM_NAME=\"${APP_NAME}\"\n```\n\nYou need to configure your `.env` file with something like this (if you are using Gmail):\n\n```dotenv\nMAIL_MAILER=smtp\nMAIL_HOST=smtp.gmail.com\nMAIL_PORT=465\nMAIL_USERNAME=\u003cEnter your Gmail address\u003e\nMAIL_PASSWORD=\u003cEnter your Gmail password\u003e\nMAIL_ENCRYPTION=ssl\nMAIL_FROM_ADDRESS=\"\u003cEnter your custom address\u003e\"\nMAIL_FROM_NAME=\"${APP_NAME}\"\n```\n\nIn Gmail configuration, you need to activate the `Less secure app access` option.\n\n## 🎢 Deployment\n\nAdd the project to Heroku using the Heroku CLI or by connecting the project to GitHub. Follow the steps shown in Heroku documentation. For a Laravel/Vue project do:\n\n1. Create `Procfile` for Laravel with `web: vendor/bin/heroku-php-apache2 public/` inside of it. See [documentation](https://devcenter.heroku.com/articles/getting-started-with-laravel) for more info.\n2. Add Node JS buildpack using Heroku interface or running in Heroku CLI this command: `heroku buildpacks:add heroku/nodejs`.\n3. Go inside console in Activity \u003e Open app \u003e Run console and execute the `Heroku run bash`. Then do a `php artisan key:generate --show`.\n4. Add database plugin, in this case, **ClearDB**. Probably you will need to add a credit card (but it's free).\n5. Add variables without **double quotes**.\n\n| Variable name     | Value                        |\n|-------------------|------------------------------|\n| APP_NAME          | Reverse Recipes              |\n| APP_ENV           | production                   |\n| APP_DEBUG         | true                         |\n| APP_KEY           | the key of step 2 (base:...) |\n| DATABASE_URL      | your cleardb url             |\n| MAIL_MAILER       | smtp                         |\n| MAIL_HOST         | smtp.mailtrap.io             |\n| MAIL_PORT         | 2525                         |\n| MAIL_USERNAME     | your username                |\n| MAIL_PASSWORD     | your password                |\n| MAIL_ENCRYPTION   | tls                          |\n| MAIL_FROM_ADDRESS | your custom address          |\n| MAIL_FROM_NAME    | your app name                |\n\n5. In the Heroku console (see step 2) run `heroku run php artisan migrate`, `heroku run php artisan db:seed` and `heroku run php artisan storage:link`.\n\n## 😖 Throubleshooting with deployment\n\n### Add HTTPS\n\nIn  `app/Provides/AppServiceProvider.php` add:\n\n```php\nuse Illuminate\\Support\\Facades\\URL;\n\npublic function boot()\n{\n    if(env('APP_ENV') !== 'local') {\n        URL::forceScheme('https');\n    }\n}\n```\n\n### Post script\n\nIn `packaje.json` add:\n\n```json\n{\n    \"scripts\": {\n        \"postinstall\": \"npm run production\"\n    }\n}\n```\n\n### Allow proxies\n\nIn `app/Http/Middleware/TrustProxies.php` add:\n\n```php\nprotected $proxies = '*';\n\nprotected $headers =\n        Request::HEADER_X_FORWARDED_FOR |\n        Request::HEADER_X_FORWARDED_HOST |\n        Request::HEADER_X_FORWARDED_PORT |\n        Request::HEADER_X_FORWARDED_PROTO |\n        Request::HEADER_X_FORWARDED_AWS_ELB;\n```\n\nSee [documentation](https://laravel.com/docs/5.7/requests#configuring-trusted-proxies) for more information at the end of the post.\n\n### Storage\n\nHeroku doesn't persist images in storage folder due to [documentation](https://help.heroku.com/K1PPS2WM/why-are-my-file-uploads-missing-deleted-from-the-application), so you will need to set up, for example, an Amazon S3 service to storage files.\n\n### Secure assets\n\nI'm not sure if this is mandatory, but we added the `secure_asset()` function in `app.blade.php` as follows. Probably it's necessary to add in `styles` and `scripts` too.\n\n```php\n\u003clink rel=\"icon\" type=\"image/x-icon\" {{ secure_asset('./favicon.ico') }}\u003e\n```\n\n## 💣 Graphical access to Heroku database\n\nIn order to use a graphical database interface (such as Heidi SQL) you need to run `heroku config --app=YOURAPPNAME` inside your project, then use the data in the `DATABASE_URL` variable as following to connect with Heidi SQL. This configuration was tested using **ClearDB** plugin inside Heroku.\n\n`mysql://\u003cusername\u003e:\u003cpassword\u003e@\u003chost\u003e/\u003cdatabase\u003e?reconnect=true`\n\n| Name       | Value        |\n|------------|--------------|\n| Host name  | `\u003chost\u003e`     |\n| User       | `\u003cuser\u003e`     |\n| Password   | `\u003cpassword\u003e` |\n| Port       | 3306         |\n| Database   | `\u003cdatabase\u003e` |\n\n## 💘 Reset to a specific commit\n\nIf you want to revert some changes do the following: `git reset --hard \u003ccommit-hash\u003e` then push the changes with `git push -f \u003cremote\u003e \u003cbranch\u003e`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgcarrillo%2Freverse-recipes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjgcarrillo%2Freverse-recipes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgcarrillo%2Freverse-recipes/lists"}