<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Decilap</title>
    <description>The latest articles on DEV Community by Decilap (@amazscript).</description>
    <link>https://dev.to/amazscript</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3857135%2F6139dbff-e3ac-4918-954e-3c5176f75cbf.png</url>
      <title>DEV Community: Decilap</title>
      <link>https://dev.to/amazscript</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/amazscript"/>
    <language>en</language>
    <item>
      <title>I Built a Complete E-commerce REST API with Laravel 12 — Here's What's Inside</title>
      <dc:creator>Decilap</dc:creator>
      <pubDate>Thu, 02 Apr 2026 07:57:16 +0000</pubDate>
      <link>https://dev.to/amazscript/i-built-a-complete-e-commerce-rest-api-with-laravel-12-heres-whats-inside-3aah</link>
      <guid>https://dev.to/amazscript/i-built-a-complete-e-commerce-rest-api-with-laravel-12-heres-whats-inside-3aah</guid>
      <description>&lt;p&gt;Building an e-commerce backend from scratch takes months. Authentication, payments, inventory, shipping, admin panel, tests… the list never ends.&lt;/p&gt;

&lt;p&gt;I decided to build it once, properly, and package it for other developers. The result is LaraCommerce API — a complete, production-ready e-commerce backend built with Laravel 12.&lt;/p&gt;

&lt;p&gt;WHAT I BUILT&lt;/p&gt;

&lt;p&gt;A fully-featured REST API covering every e-commerce use case, with an admin panel, full Stripe integration, and 100% test coverage.&lt;/p&gt;

&lt;p&gt;THE NUMBERS&lt;/p&gt;

&lt;p&gt;API Endpoints: 325+ across 25+ modules&lt;br&gt;
Database: 88 Eloquent models, 72 migrations&lt;br&gt;
Admin Panel: Filament v3 with 46 screens&lt;br&gt;
Tests: 2,452 tests / 100% coverage&lt;br&gt;
Docker: 12 services, one-command setup&lt;br&gt;
Languages: 3 (EN, FR, AR)&lt;br&gt;
Currencies: 7 (USD, EUR, GBP, MAD, CAD, CHF, AED)&lt;/p&gt;

&lt;p&gt;TECH STACK&lt;/p&gt;

&lt;p&gt;Framework: Laravel 12 (PHP 8.5+)&lt;br&gt;
Auth: Laravel Sanctum (access + refresh tokens)&lt;br&gt;
Roles: Spatie Permissions (3 roles, 57 permissions)&lt;br&gt;
Admin: Filament v3&lt;br&gt;
Payments: Stripe PHP SDK&lt;br&gt;
Search: Meilisearch + Laravel Scout&lt;br&gt;
Storage: MinIO / AWS S3&lt;br&gt;
Queue: Redis + Laravel Horizon&lt;br&gt;
Database: MySQL 8.4&lt;br&gt;
Infrastructure: Docker Compose + Nginx SSL&lt;/p&gt;

&lt;p&gt;MODULES BREAKDOWN&lt;/p&gt;

&lt;p&gt;Authentication &amp;amp; Security&lt;/p&gt;

&lt;p&gt;Not just basic login/register. The API supports:&lt;/p&gt;

&lt;p&gt;Sanctum dual-token system (access + refresh)&lt;br&gt;
Social OAuth (Google, Facebook, Apple)&lt;br&gt;
Email verification with resend&lt;br&gt;
Password reset flow&lt;br&gt;
Rate limiting with 3 tiers (standard, auth, strict)&lt;br&gt;
Security headers middleware&lt;br&gt;
Role-based access control (customer, manager, admin)&lt;/p&gt;

&lt;p&gt;Product Catalog&lt;/p&gt;

&lt;p&gt;Products with unlimited variants (size, color, custom attributes)&lt;br&gt;
Nested categories, brands, tags, collections&lt;br&gt;
Product images via MinIO/S3&lt;br&gt;
Translations (EN, FR, AR with RTL support)&lt;br&gt;
Flash sales with countdown&lt;br&gt;
Product bundles with discount&lt;br&gt;
Volume-based price tiers&lt;/p&gt;

&lt;p&gt;Cart &amp;amp; Checkout&lt;/p&gt;

&lt;p&gt;Persistent cart with coupon application&lt;br&gt;
Coupon types: percentage, fixed, BOGO, free shipping&lt;br&gt;
Smart shipping rate calculation (flat, weight-based, price-based, free)&lt;br&gt;
Tax calculation&lt;br&gt;
Stock deduction at checkout&lt;/p&gt;

&lt;p&gt;Stripe Payments&lt;/p&gt;

&lt;p&gt;This was one of the most complex parts to get right:&lt;/p&gt;

&lt;p&gt;PaymentIntents API with 3D Secure / SCA&lt;br&gt;
Saved payment methods per customer&lt;br&gt;
Webhook event handlers&lt;br&gt;
Refund processing with validation and audit trail&lt;br&gt;
Internal wallet system&lt;br&gt;
Cash-on-delivery support&lt;/p&gt;

&lt;p&gt;Orders &amp;amp; Returns&lt;/p&gt;

&lt;p&gt;Full order lifecycle (pending → confirmed → shipped → delivered)&lt;br&gt;
Status history tracking&lt;br&gt;
Automatic invoice generation&lt;br&gt;
Cancellation workflow&lt;br&gt;
Return request processing&lt;/p&gt;

&lt;p&gt;Multi-Warehouse Inventory&lt;/p&gt;

&lt;p&gt;Stock tracked per variant per warehouse&lt;br&gt;
Movement logs with before/after quantities&lt;br&gt;
Negative stock prevention&lt;br&gt;
Low stock alerts&lt;br&gt;
Automatic reorder notifications&lt;/p&gt;

&lt;p&gt;Marketing Suite&lt;/p&gt;

&lt;p&gt;Coupons &amp;amp; promotions engine&lt;br&gt;
Flash sales with countdown timers&lt;br&gt;
Product bundles&lt;br&gt;
Banners management&lt;br&gt;
Newsletter campaigns&lt;br&gt;
Abandoned cart tracking&lt;/p&gt;

&lt;p&gt;Loyalty &amp;amp; Retention&lt;/p&gt;

&lt;p&gt;Points system (earn &amp;amp; redeem)&lt;br&gt;
Digital gift cards&lt;br&gt;
Affiliate program with conversion tracking&lt;br&gt;
Customer group segmentation&lt;/p&gt;

&lt;p&gt;Search&lt;/p&gt;

&lt;p&gt;Meilisearch full-text search&lt;br&gt;
Typo tolerance&lt;br&gt;
Faceted filtering&lt;br&gt;
Price range filters&lt;br&gt;
Autocomplete suggestions&lt;br&gt;
Multiple sort options&lt;/p&gt;

&lt;p&gt;Notifications&lt;/p&gt;

&lt;p&gt;Email notification templates&lt;br&gt;
In-app notifications&lt;br&gt;
Push notifications (Firebase FCM)&lt;br&gt;
Custom webhook endpoints with delivery logs&lt;/p&gt;

&lt;p&gt;ADMIN PANEL&lt;/p&gt;

&lt;p&gt;46 fully-configured Filament v3 screens covering:&lt;/p&gt;

&lt;p&gt;Dashboard with live sales stats&lt;br&gt;
Order management with refund integration&lt;br&gt;
Product management with variants, images, translations&lt;br&gt;
Inventory with stock adjustments&lt;br&gt;
Customer management with order history&lt;br&gt;
Coupon &amp;amp; promotion management&lt;br&gt;
Shipping configuration&lt;br&gt;
Blog &amp;amp; content management&lt;br&gt;
Full activity audit log&lt;/p&gt;

&lt;p&gt;TESTING: 100% COVERAGE&lt;/p&gt;

&lt;p&gt;Every controller, service, model, middleware, and policy is tested.&lt;br&gt;
2,452 tests with 4,808 assertions.&lt;/p&gt;

&lt;p&gt;Built to be reliable — no guesswork.&lt;/p&gt;

&lt;p&gt;DOCKER: ONE COMMAND&lt;/p&gt;

&lt;p&gt;docker compose up -d&lt;/p&gt;

&lt;p&gt;That’s it. Everything runs instantly with all required services.&lt;/p&gt;

&lt;p&gt;WHO IS THIS FOR?&lt;/p&gt;

&lt;p&gt;Developers building mobile apps&lt;br&gt;
Developers building web frontends (React, Vue, Next.js…)&lt;br&gt;
Agencies needing a reusable e-commerce base&lt;br&gt;
Anyone tired of rebuilding the same backend logic&lt;/p&gt;

&lt;p&gt;GET IT&lt;/p&gt;

&lt;p&gt;LaraCommerce API is available at:&lt;br&gt;
&lt;a href="https://amazscript.com/products/laracommerce-api-complete-e-commerce-backend-laravel-12-x9jkbo" rel="noopener noreferrer"&gt;https://amazscript.com/products/laracommerce-api-complete-e-commerce-backend-laravel-12-x9jkbo&lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>ecommerce</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
