Skip to content

feat: dynamic showcase products and admin management - #356

Merged
trtajim merged 8 commits into
mainfrom
feature/dynamic-projects-management
Sep 21, 2026
Merged

trtajim merged 8 commits into
mainfrom
feature/dynamic-projects-management

Conversation

@trtajim

@trtajim trtajim commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Description

This PR makes the /projects showcase page dynamic and adds full administrative CRUD management for products.

Summary of Changes:

  • Database Migrations:
    • Created products table with columns: name, description, image_path, users, link, open_type (_blank vs _self), button_text, order, and is_active.
    • Added on-demand migration to automatically register the manage products permission and grant it to the admin role on php artisan migrate.
  • Model & Caching:
    • Product Eloquent model with image URL accessors and casts.
    • Forever caching via Cache::rememberForever('projects_page_products') on ProductController@index.
    • Registered ProductObserver to automatically evict the cache on create, update, and delete.
  • Admin Management:
    • Added full admin CRUD routes under permission:manage products.
    • Admin\ProductController with support for image uploads/replacements.
    • Admin UI components and pages: admin/Product.vue, admin/ProductRow.vue, and admin/ProductCreateOrEdit.vue.
    • Integrated Manage Products entry in admin navigation (AdminLayout.vue & Navigation.tsx).
  • Frontend & Public Showcase:
    • Extracted reusable ProductCard.vue component.
    • Updated Projects.vue to render dynamically with fallback empty states.
  • Tests:
    • Comprehensive feature tests covering public rendering, cache invalidation, role authorization, and admin CRUD operations.

Summary by CodeRabbit

  • New Features
    • Added a dynamic Products catalog with responsive product cards, images, descriptions, user counts, and configurable links.
    • Added admin product management, including create, edit, delete, image uploads or URLs, ordering, and visibility controls.
    • Added permission-based access for managing products.
  • Updates
    • Navigation and footer links now direct users to Products.
    • The /projects page has been replaced by a permanent redirect to /products.
  • Bug Fixes
    • Product listings now reflect changes promptly after products are created, updated, or deleted.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository: hscstack/platform/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: cb59576b-15df-4770-a6d8-0b92e9b364e5

📥 Commits

Reviewing files that changed from the base of the PR and between 9630345 and f97da1e.

📒 Files selected for processing (24)
  • app/Console/Commands/GenerateSitemap.php
  • app/Http/Controllers/Admin/ProductController.php
  • app/Http/Controllers/ProductController.php
  • app/Http/Requests/Product/StoreProductRequest.php
  • app/Http/Requests/Product/UpdateProductRequest.php
  • app/Models/Product.php
  • app/Observers/ProductObserver.php
  • app/Providers/AppServiceProvider.php
  • database/migrations/2026_09_21_210000_create_products_table.php
  • database/migrations/2026_09_21_210100_add_manage_products_permission.php
  • database/seeders/RolePermissionSeeder.php
  • resources/js/components/Footer.vue
  • resources/js/components/ProductCard.vue
  • resources/js/components/admin/ProductRow.vue
  • resources/js/components/navigation/Navigation.tsx
  • resources/js/layouts/AdminLayout.vue
  • resources/js/pages/Products.vue
  • resources/js/pages/Projects.vue
  • resources/js/pages/admin/Product.vue
  • resources/js/pages/admin/ProductCreateOrEdit.vue
  • routes/admin.php
  • routes/web.php
  • tests/Feature/ProductTest.php
  • tests/Feature/PublicPagesTest.php
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@trtajim
trtajim merged commit 4a12586 into main Sep 21, 2026
5 checks passed
@trtajim
trtajim deleted the feature/dynamic-projects-management branch September 21, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant