{"id":23379512,"url":"https://github.com/cloudinary-devs/php-product-catalog","last_synced_at":"2025-04-08T06:39:07.060Z","repository":{"id":266527962,"uuid":"898591422","full_name":"cloudinary-devs/php-product-catalog","owner":"cloudinary-devs","description":"Manage a catalog of products, each comprising a name, metadata (SKU, price, and category), an automatically generated description, an image, and a video.","archived":false,"fork":false,"pushed_at":"2025-01-14T18:01:49.000Z","size":1261,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T04:19:49.686Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/cloudinary-devs.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":"2024-12-04T17:06:23.000Z","updated_at":"2025-01-14T18:01:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"91e4165e-cbd3-4279-8464-746c5a871faa","html_url":"https://github.com/cloudinary-devs/php-product-catalog","commit_stats":null,"previous_names":["cloudinary-devs/php-product-catalog"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudinary-devs%2Fphp-product-catalog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudinary-devs%2Fphp-product-catalog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudinary-devs%2Fphp-product-catalog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudinary-devs%2Fphp-product-catalog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudinary-devs","download_url":"https://codeload.github.com/cloudinary-devs/php-product-catalog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247792899,"owners_count":20996893,"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":[],"created_at":"2024-12-21T19:19:11.312Z","updated_at":"2025-04-08T06:39:07.034Z","avatar_url":"https://github.com/cloudinary-devs.png","language":"PHP","readme":"## PHP Product Catalog App\n\nThis app allows you to manage a catalog of products, each comprising a name, metadata (description, SKU, price, and category), an image with automatically generated alt text, and a video.\n\nYou can:\n\n* Add new products.\n* View all products in the database.\n* View individual products in detail.\n* Edit product details.\n\n## Features\n\n### Product Images\n\n* **Client-Side Upload**: Images are uploaded directly from the client side using the [Upload Widget](https://cloudinary.com/documentation/upload_widget), eliminating backend dependencies. \n* **Synchronous Processing with AI-Generated Image Alt Text**: Images are processed immediately on upload.\n* **Database Integration**: Image names and Cloudinary public IDs are stored in the database for easy management.\n* **Dynamic Delivery**: Public IDs are used to create delivery URLs with transformations like resizing, cropping, and overlay effects.\n* **Metadata Management**: User-provided data is saved as metadata in Cloudinary and retrieved for product display.\n\n### Product Videos\n\n* **Client-Side Upload**: Videos are uploaded directly from the client side using the [Upload Widget](https://cloudinary.com/documentation/upload_widget), bypassing backend processes.\n* **Asynchronous Processing**: Videos are moderated in the background, allowing users to continue using the app during processing.\n* **Content Moderation**: Videos are reviewed for inappropriate content.\n    * Approved videos are displayed after a manual page refresh.\n    * Rejected videos are flagged with actionable feedback.\n* **Enhanced Video Playback**: Videos are rendered using Cloudinary's feature-rich Video Player.\n  \n#### **Optional Features**:\n\n* **Webhook Integration**: Receive real-time notifications when moderation results are ready.\n* **Live Updates**: Product pages auto-refresh to display newly approved videos without manual intervention.\n\n\n## Tech stack\n\n- **PHP**: 8.2.26\n  - The primary server-side language used to build the application.\n- **SQLite**: 3.37.0\n  - Relational database management system for handling data storage.\n- **Composer**: 2.x\n  - Dependency manager for PHP to manage libraries and packages.\n- **Docker**: For containerization, ensuring consistent development and production environments.\n  - Docker Compose: For managing multi-container Docker applications.\n- **Version Control**:\n  - **Git**: For version control, managing source code.\n  - **GitHub**: Repository hosting and collaboration platform.\n\n## Setup instructions\n\n* **Credentials**\n  * Go to the `.env` file within the root directory of your project. To set up the **CLOUDINARY_URL** and **CLOUDINARY_CLOUD_NAME** credentials, replace the `\u003cyour_api_key\u003e`, `\u003cyour_api_secret\u003e`, and `\u003cyour_cloud_name\u003e` placeholders with the actual values on the [API Keys](https://console.cloudinary.com/settings/api-keys) page of the Cloudinary Console.\n  \n* **Cloudinary add-ons**\n  * Go to the [Add-ons](https://console.cloudinary.com/settings/addons) page of your Cloudinary Console Settings and register for the Cloudinary AI Content Analysis and Rekognition AI Video Moderation add-ons.\n\n## Optional configurations\n\nEnable webhook notifications to automate video rendering after the asynchronous moderation process. Without a webhook, users must manually refresh the page to view the processed video.\n\n* **Webhook notification configuration**\n  * **Set up the webhook**\n    * Add your app's notification URL with the suffix `webhooks/video_upload_webhook.php` on the [Notifications](https://console.cloudinary.com/settings/webhooks) page of the Cloudinary Console.\n    * Select `Moderation` as the **Notification Type**. \n  * **Testing locally**\n    To test your app locally: \n    * Use a tool like [Ngrok](https://ngrok.com/) to create up a secure tunnel connecting the internet to your locally running app.\n    * Alternatively, deploy the app using a service like [Vercel](https://vercel.com/). \n    **Note:** \n      * Make a note of your app's domain (for example, `a-b-c-d.ngrok-free.app` or `a-b-c-d.vercel.app`). \n      * By default, the app runs on port 8000. If you're using Docker, the default port is 80.\n  \n## Run the app\n\nTo start the app on a local server, open a terminal in the project directory and run: \n\n```\nphp -S localhost:8000\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudinary-devs%2Fphp-product-catalog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudinary-devs%2Fphp-product-catalog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudinary-devs%2Fphp-product-catalog/lists"}