Api backend to manage your recipes. Written with the PHP Framework Laravel.
A tool to manage your families and friends recipes like a chef.
- Manage your recipes - You and your friends can save, edit and delete recipes.
- Share recipes - You can share recipes by one click via Telegram or E-Mail.
- Calculate servings - Calculate servings directly in the recipe on the fly.
- Exactly define recipe properties - ..like author, category, tags, ingredients, units and more.
- Disable/Enable functionalities - Disable or enable dynamically cookbooks, tags, registration and more.
- Great and easy API - Access the easy-to-use REST-API.
- Strict or flexible item creation - Disable/Enable the possibility for users to create own foods and ingredient attributes.
- Unit and feature tests
- Improve and add advanced searching and filtering
- An advanced User-Role-System
- Import & more export types of recipes
- Nutrition informations
- Rating system (the API code is already written ;-) )
- Social login with Socialite
- A feature you think is missing...
Get the latest release or clone the repo with
git clone https://github.com/ammannbe/RecipeManagerApi.git
- LAMP Stack or Docker for production use
- Requirements for laravel
- GD and WebP for image manipulation
- Composer
- NPM
- MeiliSearch
- Redis (optional but not recommended)
It's recommended to install and update this software with docker/docker-compose. See here for more information.
Alternatively or for development purposes you can make a manual installation on any linux/unix machine:
- Install composer packages
composer install
- Install NPM packages
npm install
- Copy .env.example to .env and modify it to your needs
- Generate storage symlink
php artisan storage:link
- Generate an app key
php artisan key:generate
- Migrate the database
php artisan migrate
- Import meilisearch indexes
php artisan scout:index recipes && php artisan scout:import "App\Models\Recipes\Recipe"
- Add following to your crontab:
* * * * * www-data cd /path-to-the-project && php artisan schedule:run >> /dev/null 2>&1
- Run the server
php artisan serve
- If not already done, install everything
- Run the server
php artisan serve
- Run the queue worker
php artisan queue:work
- Watch for style and js changes:
npm run watch
- If not already done, install everything
- Optimize composer autoload
composer install --optimize-autoloader --no-dev
- Enable caching:
php artisan config:cache
php artisan route:cache
php artisan view:cache
- Run the queue worker
php artisan queue:work
(or setup via e.g. systemd) - Optimize npm packages:
npm run prod
- Get the latest source (see Getting Started)
- Check
.env.example
for changes - Optimize composer autoload
composer install
- Install NPM packages
npm install
- Migrate the database
php artisan migrate
- Import meilisearch indexes
php artisan scout:index recipes && php artisan scout:import "App\Models\Recipes\Recipe"
- Follow Development deployment or Production deployment
All application related files are translated with laravel-translation-manager and laravel-translations-loader.
You should run these commands only on a development machine.
You need to run the migrations for this package:
php artisan vendor:publish --provider="Barryvdh\TranslationManager\ManagerServiceProvider" --tag=migrations
php artisan migrate
- Import translations
composer run translations:import
- Open
<your-domain>/translations
in a browser - PHP: short keys within
resources/lang/<lang>/<group>.php
- Vue.js: translation strings within
/resources/lang/<lang>.json
(these files will be imported into the_json
group) - Export & generate translations
composer run translations:export
Other commands:
- Export translations
php artisan translations:export \*
- Reset translations
php artisan translations:reset
You get better IDE IntelliSense support with the laravel-ide-helper package.
You need to generate the helpers by yourself:
composer run ide-helper:generate
After that, you should run the commands from Testing / Code Quality.
- Optional: seed the database with test data
# Seed the database with test data
php artisan db:seed
# Freshly migrate and seed the database
php artisan migrate:fresh --seed
# The secret of the seeded users is 'password'
- Run static code analytics
composer run phpstan
- Run PHP Coding Standards Fixer
composer run php-cs-fixer
-
Askedio/laravel-soft-cascade - Cascade Delete & Restore when using Laravel SoftDeletes
-
barryvdh/laravel-dompdf - A DOMPDF Wrapper for Laravel
-
GrKamil/laravel-telegram-logging - Send logs to Telegram chat via Telegram bot
-
laravel/laravel - A PHP framework for web artisans
-
meilisearch/meilisearch-laravel-scout - Laravel Scout Engine for Meilisearch
-
rutorika/sortable - Adds sortable behavior to Laravel Eloquent models
-
spatie/laravel-medialibrary - Associate files with Eloquent models
-
barryvdh/laravel-ide-helper - Laravel IDE Helper
-
barryvdh/laravel-translation-manager - Manage Laravel translation files
-
nunomaduro/larastan - Adds static analysis to Laravel improving developer productivity and code quality
-
stechstudio/Laravel-PHP-CS-Fixer - Artisan Command for FriendsOfPHP/PHP-CS_Fixer
Please see CONTRIBUTING for details.
- Benjamin Ammann - Initial work - ammannbe
This project is licensed under the AGPLv3 or later - see the LICENSE file for details