{"id":28919703,"url":"https://github.com/sreeharshrajan/recipe-tracker-api","last_synced_at":"2026-05-05T00:34:09.467Z","repository":{"id":299870670,"uuid":"1004146145","full_name":"sreeharshrajan/recipe-tracker-api","owner":"sreeharshrajan","description":"A production-ready RESTful API built with Laravel 12 for managing cooking recipes. ","archived":false,"fork":false,"pushed_at":"2025-06-18T17:57:25.000Z","size":171,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-18T18:46:05.566Z","etag":null,"topics":["crud","interview-project","laravel","laravel-sanctum","php","phpunit","recipe-tracker","rest-api","sqlite"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sreeharshrajan.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,"zenodo":null}},"created_at":"2025-06-18T07:26:07.000Z","updated_at":"2025-06-18T17:57:28.000Z","dependencies_parsed_at":"2025-06-18T18:46:07.325Z","dependency_job_id":"2484676f-257c-478c-ad14-b4fd2f5dd88e","html_url":"https://github.com/sreeharshrajan/recipe-tracker-api","commit_stats":null,"previous_names":["sreeharshrajan/recipe-tracker-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sreeharshrajan/recipe-tracker-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sreeharshrajan%2Frecipe-tracker-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sreeharshrajan%2Frecipe-tracker-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sreeharshrajan%2Frecipe-tracker-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sreeharshrajan%2Frecipe-tracker-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sreeharshrajan","download_url":"https://codeload.github.com/sreeharshrajan/recipe-tracker-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sreeharshrajan%2Frecipe-tracker-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32631058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["crud","interview-project","laravel","laravel-sanctum","php","phpunit","recipe-tracker","rest-api","sqlite"],"created_at":"2025-06-22T04:00:43.708Z","updated_at":"2026-05-05T00:34:09.462Z","avatar_url":"https://github.com/sreeharshrajan.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🍽️ Symmersive Recipe Tracker API\n\nA RESTful API-only Laravel application for managing cooking recipes. Developed as an interview project, this application supports recipe CRUD operations, advanced search by ingredients and cook time, authentication via Laravel Sanctum, and robust documentation with Swagger.\n\n## 🚀 Features\n\n- Full CRUD for recipes\n- JSON responses with proper HTTP status codes\n- SQLite file-based development database\n- Authentication via Laravel Sanctum\n- Input validation using Form Request classes\n- Swagger documentation (OpenAPI) via L5-Swagger\n- Filter recipes by difficulty\n- Advanced search by ingredients and total cook time\n- Custom Resource classes with calculated `total_time`\n- Unit \u0026 feature tests using PHPUnit\n- PSR-12 linting applied via Laravel Pint\n\n---\n\n## 🧠 Tech Stack\n\n- **Laravel 12**\n- **PHP 8.2+**\n- **SQLite**\n- **Laravel Sanctum**\n- **L5-Swagger** for API docs\n- **PHPUnit** for testing\n- **Laravel Pint** for code linting\n\n---\n\n## 📦 Installation\n\n```bash\ngit clone https://github.com/sreeharshrajan/recipe-tracker-api.git\ncd recipe-tracker-api\ncomposer install\ncp .env.example .env\ntouch database/database.sqlite\nphp artisan key:generate\nphp artisan migrate --seed\n```\n\n### Make sure `.env` contains:\n\n```\nDB_CONNECTION=sqlite\nDB_DATABASE=database/database.sqlite\n```\n\n---\n\n## 📖 API Documentation\n\nAccess Swagger UI at:\n\n```\nhttp://127.0.0.1:8000/api/documentation\n```\n\n---\n\n## 🔐 Authentication\n\nLaravel Sanctum is used for secure API authentication.\n\n**Register**\n```\nPOST /api/register\n```\n\n**Login**\n```\nPOST /api/login\n```\n\nUse the token in headers:\n\n```\nAuthorization: Bearer {your_token}\n```\n\n---\n\n## 📚 API Endpoints\n\n| Method | Endpoint | Description | Auth Required |\n|--------|----------|-------------|---------------|\n| GET    | /api/recipes | List all recipes | ✅ |\n| POST   | /api/recipes | Create a new recipe | ✅ |\n| GET    | /api/recipes/{id} | Show a specific recipe | ✅ |\n| PUT    | /api/recipes/{id} | Update a recipe | ✅ |\n| DELETE | /api/recipes/{id} | Delete a recipe | ✅ |\n| GET    | /api/recipes/difficulty/{level} | Filter recipes by difficulty | ✅ |\n| GET    | /api/recipes/search | Search by ingredients + time | ✅ |\n\n### Search Example\n\n```\nGET /api/recipes/search?ingredients=potatoes,onion,cumin\u0026min_time=20\u0026max_time=30\n```\n\n---\n\n## 🧪 Testing\n\nRun all tests using:\n\n```bash\nphp artisan test\n```\n\nTests cover:\n- Recipe CRUD\n- Input validation\n- 404 handling\n- Auth \u0026 middleware\n- Search feature\n\n---\n\n## 🌱 Seeder\n\nSeeder uses the provided `recipe.json` file.\n\nEach Recipe has:\n- `name`: string\n- `ingredients`: text (comma-separated)\n- `prep_time`: integer\n- `cook_time`: integer\n- `difficulty`: enum (easy, medium, hard)\n- `description`: string\n\n---\n\n## ✅ Validation Rules\n\nHandled by:\n- `StoreRecipeRequest`\n- `UpdateRecipeRequest`\n\nValidates required fields, type, enum constraints, and format.\n\n---\n\n## 🧩 Laravel API Resource\n\nAll API responses are wrapped using `RecipeResource` which also includes:\n\n```php\n'total_time' =\u003e $prep_time + $cook_time\n```\n\n---\n\n## 🧹 Code Quality\n\n```bash\n./vendor/bin/pint\n```\n\nApplies PSR-12 coding standards using Laravel Pint.\n\n---\n\n## 📝 License\n\nMIT License\n\n---\n\n## 👤 Author\n\nSreeharsh Rajan  \nFull Stack Developer (Laravel)\n[LinkedIn](https://linkedin.com/in/sreeharshk) | [GitHub](https://github.com/sreeharshrajan) | [Portfolio](https://sreeharsh.vercel.app/)\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsreeharshrajan%2Frecipe-tracker-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsreeharshrajan%2Frecipe-tracker-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsreeharshrajan%2Frecipe-tracker-api/lists"}