[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"site-settings":3,"blog-post:soft-delete-inventory-bug-phantom-serial-stock-after-purchase-delete":8,"blog-posts-latest:24":30,"blog-comments:1fac09f2-990e-4ebf-99b1-0cc532e7cb08":323,"site-content":324},{"id":4,"accent_theme":5,"font_theme":6,"updated_at":7},1,"midnight","saas","2026-10-28T07:05:59.308034+00:00",{"id":9,"title":10,"slug":11,"excerpt":12,"content":13,"cover_image":14,"meta_title":15,"meta_description":16,"og_image":17,"tags":18,"status":24,"published_at":25,"view_count":26,"deleted_at":27,"deleted_reason":28,"created_at":29,"updated_at":29},"1fac09f2-990e-4ebf-99b1-0cc532e7cb08","Soft Delete Inventory Bug — Phantom Serial Stock After Purchase Delete","soft-delete-inventory-bug-phantom-serial-stock-after-purchase-delete","Soft-deleting a purchase looked fine until serial-tracked products stayed sellable. The movement ran, quantity didn’t move, and serials were never detached.","\u003Ch2 id=\"quick-answer\">Quick Answer\u003C\u002Fh2>\n\u003Cp>A soft delete inventory bug is when the purchase row gets \u003Ccode>deleted_at\u003C\u002Fcode> but sellable stock does not reverse. On serial-tracked products, quantity usually comes from \u003Ccode>in_stock\u003C\u002Fcode> serial rows. If delete only posts a stock movement and skips serial detach, those serials stay sellable — classic phantom inventory.\u003C\u002Fp>\n\n\u003Ch2 id=\"quick-facts\">Quick Facts\u003C\u002Fh2>\n\u003Ctable>\n\u003Cthead>\u003Ctr>\u003Cth>Item\u003C\u002Fth>\u003Cth>Details\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\u003Ctd>Topic\u003C\u002Ftd>\u003Ctd>Soft delete inventory bug (phantom serial stock)\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>Category\u003C\u002Ftd>\u003Ctd>Laravel \u002F Inventory \u002F Multi-tenant SaaS\u003C\u002Ftd>\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\n\u003Cnav class=\"blog-toc\" aria-label=\"Table of contents\">\n\u003Ch2 id=\"table-of-contents\">Table of Contents\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"#what-is-soft-delete-inventory-bug\">What Is a Soft Delete Inventory Bug?\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#why-it-matters\">Why It Matters\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#how-it-works\">How It Works\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#step-by-step-guide\">Step-by-Step Guide\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#real-world-example\">Real-World Example\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#pros-cons\">Pros &amp; Cons\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#best-practices\">Best Practices\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#common-mistakes\">Common Mistakes\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#frequently-asked-questions\">FAQs\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#summary\">Summary\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#key-takeaways\">Key Takeaways\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003C\u002Fnav>\n\n\u003Ch2 id=\"what-is-soft-delete-inventory-bug\">What Is a Soft Delete Inventory Bug?\u003C\u002Fh2>\n\u003Cp>Soft delete hides a document with \u003Ccode>deleted_at\u003C\u002Fcode>. Inventory soft delete also has to undo what that document did to stock.\u003C\u002Fp>\n\u003Cp>This is not “forgot to soft-delete line items.” The purchase can disappear from the list while serial numbers stay \u003Ccode>in_stock\u003C\u002Fcode>. Non-serial SKUs often reverse with a negative movement. Serial SKUs usually need a second step: detach or void those serials, then sync quantity from what remains.\u003C\u002Fp>\n\n\u003Ch2 id=\"why-it-matters\">Why It Matters\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Phantom stock\u003C\u002Fstrong> — deleted inbound goods still look available; POS and invoices sell units you do not have.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Quiet audit\u003C\u002Fstrong> — a movement can say “Purchase stock restored” with \u003Ccode>quantity_change = 0\u003C\u002Fcode> while serials never moved.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Path drift\u003C\u002Fstrong> — update may detach serials; delete may not. Same domain event, different cleanup. That is how the bug survives review.\u003C\u002Fli>\n\u003C\u002Ful>\n\n\u003Ch2 id=\"how-it-works\">How It Works\u003C\u002Fh2>\n\u003Cp>With \u003Ccode>track_serials\u003C\u002Fcode>, many Laravel inventory apps split ownership: movements stay for audit, but sellable quantity is the count of in-stock serials. Purchase-type movements often force \u003Ccode>change = 0\u003C\u002Fcode> for those products so you do not double-count. That only works if delete also tears down the serials.\u003C\u002Fp>\n\n\u003Cfigure class=\"blog-figure blog-figure--diagram\" contenteditable=\"false\">\n\u003Cdiv class=\"blog-mermaid\">\n\u003Cpre class=\"mermaid-source\">flowchart TD\n  A[Soft-delete purchase] --> B[restoreStock movement]\n  B --> C{track_serials}\n  C -->|no| D[Quantity decreases]\n  C -->|yes| E[change forced to 0]\n  E --> F[Serials still in_stock]\n  F --> G[Phantom sellable stock]\n  A -.-> H[detachPurchase + sync]\n  H --> I[Qty matches reality]\n\n  classDef step fill:#1e3a5f,stroke:#38bdf8,color:#e0f2fe\n  classDef warn fill:#7f1d1d,stroke:#f87171,color:#fecaca\n  classDef ok fill:#14532d,stroke:#4ade80,color:#dcfce7\n  classDef gate fill:#422006,stroke:#fbbf24,color:#fef3c7\n\n  class A,B,D step\n  class C gate\n  class E,F,G warn\n  class H,I ok\u003C\u002Fpre>\n\u003C\u002Fdiv>\n\u003Cfigcaption>Blue = normal path. Gold = serial gate. Red = bug when detach is skipped. Green = fix.\u003C\u002Ffigcaption>\n\u003C\u002Ffigure>\n\n\u003Col>\n\u003Cli>\u003Cstrong>Document delete\u003C\u002Fstrong> — authorize, skip purchases with returns, soft-delete the header.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Stock reverse\u003C\u002Fstrong> — \u003Ccode>restoreStock()\u003C\u002Fcode> records a negative purchase movement per line.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Serial bypass\u003C\u002Fstrong> — for \u003Ccode>track_serials\u003C\u002Fcode>, purchase movements may zero the quantity change on purpose.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Required cleanup\u003C\u002Fstrong> — detach purchase serials and sync quantity inside the same transaction. Update already does this; delete must too.\u003C\u002Fli>\n\u003C\u002Fol>\n\n\u003Ch2 id=\"step-by-step-guide\">Step-by-Step Guide\u003C\u002Fh2>\n\n\u003Ch3 id=\"step-1\">Step 1: Map every path that undoes a purchase\u003C\u002Fh3>\n\u003Cp>Write a table: create, update, soft-delete, restore, purchase-return. Two columns per path — quantity movement, serial mutation. Done when every undo path has both, or a written reason serials stay untouched.\u003C\u002Fp>\n\n\u003Ch3 id=\"step-2\">Step 2: Reuse the update cleanup on delete\u003C\u002Fh3>\n\u003Cp>If update already runs \u003Ccode>restoreStock()\u003C\u002Fcode> then \u003Ccode>detachPurchase\u003C\u002Fcode> before replacing lines, delete should call the same helper while item IDs are still loaded.\u003C\u002Fp>\n\u003Cpre>\u003Ccode>DB::transaction(function () use ($purchase, $purchaseService) {\n    $purchase-&gt;load('items');\n    $purchaseService-&gt;restoreStock($purchase);\n    (new ProductSerialService)-&gt;detachPurchase($purchase-&gt;items);\n    $purchase-&gt;delete();\n});\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Skip detach and serial products keep \u003Ccode>in_stock\u003C\u002Fcode> rows. The movement may still insert with a zero change — easy to miss in logs.\u003C\u002Fp>\n\n\u003Ch3 id=\"step-3\">Step 3: Prove it with a serial fixture\u003C\u002Fh3>\n\u003Cp>Product with \u003Ccode>track_serials = true\u003C\u002Fcode>, purchase 2 serials, confirm quantity = 2. Soft-delete the purchase. Done looks like: \u003Ccode>deleted_at\u003C\u002Fcode> set, those serials gone or not sellable, quantity = 0. Run restore once and confirm you do not invent extra stock.\u003C\u002Fp>\n\n\u003Ch2 id=\"real-world-example\">Real-World Example\u003C\u002Fh2>\n\u003Cp>Stack: Laravel API + Nuxt SPA inventory SaaS. Purchase \u003Cstrong>update\u003C\u002Fstrong> restored stock and called \u003Ccode>detachPurchase()\u003C\u002Fcode> before force-deleting old items. Purchase \u003Cstrong>delete\u003C\u002Fstrong> only called \u003Ccode>restoreStock()\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>\u003Ccode>StockMovementService\u003C\u002Fcode> treats \u003Ccode>purchase\u003C\u002Fcode> as a serialized bypass type — for tracked products it zeroes the change so quantity is not double-managed. Correct when serials are the source of truth. On delete, nobody removed the serials. Shop UI still showed those SNs after the purchase vanished from the list.\u003C\u002Fp>\n\u003Cp>Fix: same detach + sync as update, keep the movement for audit, and stop returning blanket “deleted successfully” when some UUIDs were skipped for returns. Add a feature test that asserts serial count and product quantity after soft-delete.\u003C\u002Fp>\n\n\u003Ch2 id=\"pros-cons\">Pros &amp; Cons\u003C\u002Fh2>\n\u003Ch3>Advantages\u003C\u002Fh3>\n\u003Cul>\n\u003Cli>Serial-as-source-of-truth avoids double-counting when create, sale, and update all go through serial services.\u003C\u002Fli>\n\u003Cli>Soft delete keeps the document for audit and restore instead of hard-wiping history.\u003C\u002Fli>\n\u003Cli>One shared undo helper keeps update and delete from drifting again.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3>Disadvantages\u003C\u002Fh3>\n\u003Cul>\n\u003Cli>Bypass + soft-delete is easy to half-ship: movement looks done, stock is not.\u003C\u002Fli>\n\u003Cli>Restoring a soft-deleted purchase must re-attach serials carefully or you flip the bug.\u003C\u002Fli>\n\u003Cli>Returns need honest API responses — silent \u003Ccode>continue\u003C\u002Fcode> hides failed cleanup.\u003C\u002Fli>\n\u003C\u002Ful>\n\n\u003Ch2 id=\"best-practices\">Best Practices\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>Put serial detach in the same DB transaction as document soft-delete.\u003C\u002Fli>\n\u003Cli>One “undo purchase stock” helper for update, delete, and return — do not copy half of it.\u003C\u002Fli>\n\u003Cli>Assert both \u003Ccode>stock_movements\u003C\u002Fcode> and serial \u003Ccode>in_stock\u003C\u002Fcode> counts; a zero-change movement alone is not green.\u003C\u002Fli>\n\u003Cli>Return 422 or a partial-failure list when returns block delete.\u003C\u002Fli>\n\u003Cli>Document which movement types bypass quantity and which service owns serial lifecycle.\u003C\u002Fli>\n\u003C\u002Ful>\n\n\u003Ch2 id=\"common-mistakes\">Common Mistakes\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Only restoreStock on delete\u003C\u002Fstrong> — update already felt complete. \u003Cstrong>Fix:\u003C\u002Fstrong> call the same detach helper.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Trusting movements as qty truth for serial SKUs\u003C\u002Fstrong> — audit row exists. \u003Cstrong>Fix:\u003C\u002Fstrong> quantity = count of in-stock serials after mutations.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Testing delete only with non-serial products\u003C\u002Fstrong> — bypass never fires. \u003Cstrong>Fix:\u003C\u002Fstrong> one \u003Ccode>track_serials\u003C\u002Fcode> fixture on every reverse path.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Success after skipping returned purchases\u003C\u002Fstrong> — loop continues. \u003Cstrong>Fix:\u003C\u002Fstrong> list blocked UUIDs or fail the request.\u003C\u002Fli>\n\u003C\u002Ful>\n\n\u003Ch2 id=\"frequently-asked-questions\">Frequently Asked Questions\u003C\u002Fh2>\n\u003Ch3 id=\"faq-what-is-soft-delete-inventory-bug\">What is a soft delete inventory bug?\u003C\u002Fh3>\n\u003Cp>Soft-deleting a purchase, invoice, or adjustment leaves product quantity or serial availability inconsistent with the removed document — usually because quantity math and serial lifecycle were not both reversed.\u003C\u002Fp>\n\n\u003Ch3 id=\"faq-how-to\">How do I fix phantom stock after deleting a purchase?\u003C\u002Fh3>\n\u003Cp>In the same transaction: post the reverse movement for audit, detach or void the purchase serials, sync product quantity from remaining in-stock serials. Match the update path.\u003C\u002Fp>\n\n\u003Ch3 id=\"faq-vs\">Soft delete vs hard delete for inventory documents?\u003C\u002Fh3>\n\u003Cp>Soft delete wins for audit and undo when stock and serials reverse cleanly. Hard delete without a ledger is worse. Prefer soft delete plus reversible stock services.\u003C\u002Fp>\n\n\u003Ch3 id=\"faq-worth-it\">Is serial tracking worth the extra delete complexity?\u003C\u002Fh3>\n\u003Cp>Yes for phones, appliances, and warranty-heavy SKUs — every create\u002Fupdate\u002Fdelete\u002Freturn must touch serials. For bulk commodity stock, leave \u003Ccode>track_serials\u003C\u002Fcode> off and use plain quantity movements.\u003C\u002Fp>\n\n\u003Ch2 id=\"summary\">Summary\u003C\u002Fh2>\n\u003Cp>Soft-deleting a purchase is more than \u003Ccode>deleted_at\u003C\u002Fcode>. For serial products a purchase movement may intentionally change quantity by zero — serials own the count. Miss detach on delete and you get phantom sellable stock while the UI says the purchase is gone. Mirror update cleanup, test with serial fixtures, and make skipped deletes visible in the API.\u003C\u002Fp>\n\n\u003Ch2 id=\"key-takeaways\">Key Takeaways\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>Soft delete of inventory documents must reverse stock side effects, not only hide the header.\u003C\u002Fli>\n\u003Cli>When serials drive quantity, a zero-change movement without detach leaves phantom stock.\u003C\u002Fli>\n\u003Cli>Update and delete must share the same undo helper; asymmetric paths are the usual root cause.\u003C\u002Fli>\n\u003Cli>Feature tests need a \u003Ccode>track_serials\u003C\u002Fcode> case on every reverse path or the bug stays invisible.\u003C\u002Fli>\n\u003Cli>Do not report full success if some purchases were skipped for returns or authorization.\u003C\u002Fli>\n\u003C\u002Ful>","https:\u002F\u002Fik.imagekit.io\u002F93se7t7h4e\u002Fportfolio\u002Fposts\u002Fblog\u002Fcovers\u002F1793165769172-Phantom-Inventory_-Deleted-Warehouse-Order_Z0BIZdhyJ.webp","Soft Delete Inventory Bug: Phantom Serial Stock","Soft-delete a serial purchase and stock can stay sellable. Zero-change movements plus a missing detach create phantom inventory — and how to fix it.","https:\u002F\u002Fik.imagekit.io\u002F93se7t7h4e\u002Fportfolio\u002Fposts\u002Fblog\u002Fog\u002F1793165785176-Active-and-Ghosted-Inventory-Boxes_eIfedMzKL.webp",[19,20,21,22,23,6],"laravel","inventory","soft-delete","serial-numbers","stock-movements","published","2026-10-28T05:36:31.148+00:00",21,null,"","2026-10-28T05:36:32.188948+00:00",[31,33,50,67,81,95,107,119,133,146,157,168,180,193,207,218,229,238,249,263,275,284,295,308],{"id":9,"title":10,"slug":11,"excerpt":12,"cover_image":14,"tags":32,"published_at":25,"updated_at":29,"view_count":26},[19,20,21,22,23,6],{"id":34,"title":35,"slug":36,"excerpt":37,"cover_image":38,"tags":39,"published_at":47,"updated_at":48,"view_count":49},"b2a6b718-c6e5-42fa-9358-22e84035aaf2","Multi-Tenant Inventory Manager with Nuxt 3 and Supabase","multi-tenant-inventory-manager-nuxt-supabase","A shop-billing SaaS on Nuxt 3 and Supabase: stock, invoices, UPI links, AI bill scan, and per-shop storefronts — with RLS so shop_id is never trusted from the client.","https:\u002F\u002Fik.imagekit.io\u002F93se7t7h4e\u002Fportfolio\u002Fposts\u002Flibrary\u002F1792583563566-Modern-Retail-POS-Dashboard-Network_-BFGj_TT0.webp?updatedAt=1792583565092",[40,41,42,20,6,43,44,45,46],"nuxt","supabase","multi-tenancy","vue","pinia","vuetify","ai","2026-10-21T12:07:58.857+00:00","2026-10-21T12:07:59.070373+00:00",16,{"id":51,"title":52,"slug":53,"excerpt":54,"cover_image":55,"tags":56,"published_at":64,"updated_at":65,"view_count":66},"58f0adc6-f4e9-4501-bc0e-ab83cc2cc073","Laravel Sanctum 419 Fix — Why XSRF-TOKEN Must Stay Encrypted","laravel-sanctum-419-xsrf-token-encryption","Sanctum SPA login kept returning 419 CSRF token mismatch. The bug wasn’t domains or cookies “not sticking” — it was excluding XSRF-TOKEN from EncryptCookies while Laravel decrypts the X-XSRF-TOKEN header.","https:\u002F\u002Fik.imagekit.io\u002F93se7t7h4e\u002Fportfolio\u002Fposts\u002Fblog\u002Fcovers\u002F1792229994752-From-CSRF-Error-to-Secure-Fix_FIVIW5po2.webp",[57,58,59,60,61,62,63],"Laravel","Sanctum","CSRF","419","SPA","Nuxt","API Authentication","2026-10-17T09:40:04.212+00:00","2026-10-17T09:40:06.051151+00:00",17,{"id":68,"title":69,"slug":70,"excerpt":71,"cover_image":72,"tags":73,"published_at":78,"updated_at":79,"view_count":80},"7b4bee90-b35b-4ced-ae8c-0a71e7d968fb","ImageKit Nuxt Upload — Keep Private Keys Off the Client","imagekit-nuxt-upload-secure","ImageKit Nuxt upload means the browser never sees your private key. Sign or upload on the server, return a CDN URL, and store that URL in your CMS or database.","https:\u002F\u002Fik.imagekit.io\u002F93se7t7h4e\u002Fportfolio\u002Fposts\u002Fblog\u002Fcovers\u002F1792216420019-Secure-Upload-Architecture-Flow_MGyvtL5tR.webp",[62,74,75,76,77],"ImageKit","Vue","TypeScript","SEO","2026-10-17T05:55:24.556+00:00","2026-10-17T05:55:24.735773+00:00",23,{"id":82,"title":83,"slug":84,"excerpt":85,"cover_image":86,"tags":87,"published_at":93,"updated_at":94,"view_count":49},"bd55b3c6-8bd3-447d-99ad-d46a97490d7b","Apache 2 Installation on Ubuntu: Step-by-Step","apache-2-installation-ubuntu","Install Apache 2 on Ubuntu with apt, start the service, open the firewall, and verify the default page. Part 2 of the Apache 2 series — clean setup before virtual hosts.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1788925690969-7zm2c2.webp",[88,89,90,91,92],"Apache","Ubuntu","Installation","Linux","Web Server","2026-09-09T03:49:25.809+00:00","2026-09-09T03:49:26.679843+00:00",{"id":96,"title":97,"slug":98,"excerpt":99,"cover_image":100,"tags":101,"published_at":104,"updated_at":105,"view_count":106},"8c75a723-b1a7-4fab-9bb9-71a111c9d4f8","Apache vs Nginx: What They Are and When to Use Each","apache-vs-nginx","Apache and Nginx are web servers. They take HTTP requests and return files or pass work to PHP, Node, or another app. Apache fits shared hosting and .htaccess; Nginx is the usual reverse proxy on an Ubuntu VPS.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1788524039845-wrez6s.webp",[88,102,89,92,91,103],"Nginx","DevOps","2026-09-04T12:14:08.218+00:00","2026-09-04T12:14:08.430018+00:00",9,{"id":108,"title":109,"slug":110,"excerpt":111,"cover_image":112,"tags":113,"published_at":116,"updated_at":117,"view_count":118},"40dd3304-99d2-4948-b8c1-44625f1f4306","What Is a Virtual Host? Host Multiple Sites on One Ubuntu VPS","virtual-host-linux-multiple-websites","A virtual host maps each domain to its own folder on one server. Developers use this on Ubuntu VPSes so portfolio, API, and staging share one bill. Same idea on any Linux — Ubuntu is just what most tutorials and clouds default to.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1788523755345-javhet.webp",[114,89,102,91,115,103],"Virtual Host","VPS","2026-09-04T12:09:22.623+00:00","2026-09-04T12:09:22.931401+00:00",12,{"id":120,"title":121,"slug":122,"excerpt":123,"cover_image":124,"tags":125,"published_at":130,"updated_at":131,"view_count":132},"6e45f39b-1ade-47f0-a0b0-b4cd386a10dc","Laravel Queues & Jobs: How Background Processing Works","laravel-queues-and-jobs","Laravel queues move slow work off the HTTP request. You push a Job onto a queue, a worker runs it later, and the user gets a fast response. Use them for mail, webhooks, image work, and anything that can fail and retry.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1787286979145-0i7ewp.webp",[57,126,127,128,129],"Queues","Jobs","PHP","backend","2026-08-21T04:36:56.222+00:00","2026-08-21T04:36:56.606735+00:00",20,{"id":134,"title":135,"slug":136,"excerpt":137,"cover_image":138,"tags":139,"published_at":143,"updated_at":144,"view_count":145},"938c7bd9-2cf3-4a81-8dae-cf88c09e64ca","Laravel N+1 Query Problem: How to Detect and Fix It","laravel-n-plus-1-query-problem","The Laravel N+1 query problem is when one listing query is followed by one extra query per row. You spot it in Telescope or the query log, then fix it with with(), withCount(), and nested eager loads.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1787199419649-niq9k8.webp",[57,140,141,142,128],"Eloquent","N+1","performance","2026-08-20T04:17:43.609+00:00","2026-08-20T05:50:24.297698+00:00",14,{"id":147,"title":148,"slug":149,"excerpt":150,"cover_image":151,"tags":152,"published_at":154,"updated_at":155,"view_count":156},"76717847-4080-4ae6-a2d8-b35badc46be3","Laravel Eloquent Relationships","laravel-eloquent-relationships","Laravel Eloquent relationships map how models connect — hasMany, belongsTo, belongsToMany, and more. Define them once, then load related rows with with() instead of stuffing joins into every query.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1787122982331-16979e.webp",[57,140,128,153,129],"ORM","2026-08-19T07:03:17.721+00:00","2026-08-20T04:19:08.829027+00:00",18,{"id":158,"title":159,"slug":160,"excerpt":161,"cover_image":162,"tags":163,"published_at":166,"updated_at":167,"view_count":49},"6bbe0ad8-0c6d-4172-b279-ded8e2ca9416","Laravel Database Transactions: When and Why to Use DB::transaction()","laravel-database-transactions","DB::transaction() runs a closure inside a SQL transaction: Laravel commits if it finishes, and rolls back if it throws. Use it when one action writes more than one row and a half-finished write would leave bad data.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1787114417893-hp3hmc.webp",[57,164,140,128,165],"Database","Transactions","2026-08-19T04:44:00.327+00:00","2026-08-19T05:14:18.190197+00:00",{"id":169,"title":170,"slug":171,"excerpt":172,"cover_image":173,"tags":174,"published_at":178,"updated_at":179,"view_count":145},"d1020b7b-b410-414f-9ceb-eb0501bc905e","Laravel Auditing Package — Track Model Changes the Right Way","laravel-auditing-package","The Laravel auditing package records old and new model values, the user who changed them, and when it happened—without you inventing a second history table for every feature.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1786778101029-mwb9sf.webp",[57,175,128,176,177],"Auditing","Security","Activity Log","2026-08-15T21:24:32.135+00:00","2026-08-15T21:24:32.194447+00:00",{"id":181,"title":182,"slug":183,"excerpt":184,"cover_image":185,"tags":186,"published_at":190,"updated_at":191,"view_count":192},"3d5eb867-6288-48c4-af04-8b7ece8b874e","Laravel Lifecycle — How a Request Becomes a Response","laravel-lifecycle","The Laravel lifecycle is the path from HTTP request to response: bootstrap, service providers, middleware, routing, then the controller. Know that path and most “random” bugs stop being random.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1786777544862-khxf92.webp",[57,128,187,188,189],"Request Lifecycle","Middleware","Backend","2026-08-15T07:15:13.877+00:00","2026-08-15T07:15:13.978037+00:00",11,{"id":194,"title":195,"slug":196,"excerpt":197,"cover_image":198,"tags":199,"published_at":205,"updated_at":206,"view_count":145},"2ab5e08a-7117-43c5-87eb-0789a2fd3af4","Claude Code Best Practices for Large Codebases — Scope Before You Ship","claude-code-best-practices-large-codebases","On a big repo, Claude Code only helps if you lock rules in CLAUDE.md, scope every ticket, plan multi-file edits, and review the diff like a PR.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1786178453897-dulbmv.webp",[200,201,202,203,204],"claude-code","ai-coding","large-codebases","monorepo","developer-tools","2026-08-08T08:41:03.571+00:00","2026-08-08T08:41:03.839922+00:00",{"id":208,"title":209,"slug":210,"excerpt":211,"cover_image":212,"tags":213,"published_at":216,"updated_at":217,"view_count":156},"ddd55ce1-48fd-40b4-ae91-48a6bec20a2a","Nuxt Middleware Explained — Auth, Redirects & Route Guards Deep Dive","nuxt-middleware-explained","Nuxt middleware runs before a page loads so you can check auth, redirect users, or block a route — on the server for the first hit and in the browser on later navigations.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1785902953511-osy6pt.webp",[62,188,214,215,75],"SSR","Auth","2026-08-05T04:09:38.347+00:00","2026-08-05T04:09:38.496803+00:00",{"id":219,"title":220,"slug":221,"excerpt":222,"cover_image":223,"tags":224,"published_at":227,"updated_at":228,"view_count":118},"e0d9941b-467d-45cc-bf12-45390cf9aeaa","Nuxt Lifecycle Explained — Server, Client & Hooks Made Simple","nuxt-lifecycle-explained","Nuxt lifecycle is the order your app boots, fetches data, renders HTML on the server, hydrates in the browser, then runs page navigation — so you know where to put code safely.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1785901639981-9tgcl5.webp",[62,75,214,225,226],"Lifecycle","JavaScript","2026-08-05T03:54:08.301+00:00","2026-08-05T03:54:08.919676+00:00",{"id":230,"title":231,"slug":232,"excerpt":233,"cover_image":234,"tags":235,"published_at":236,"updated_at":237,"view_count":80},"23c9cf92-232b-460f-9825-a9c53e350600","How to Use Laravel Sanctum for API Authentication — SPA Cookies & Tokens","laravel-api-authentication","Laravel Sanctum authenticates first-party SPAs with secure cookies and issues API tokens for mobile or third-party clients—without the complexity of full OAuth.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1785833713437-wcqb6c.webp",[57,58,63,128,61,176],"2026-08-04T08:56:17.304+00:00","2026-08-06T04:07:09.059636+00:00",{"id":239,"title":240,"slug":241,"excerpt":242,"cover_image":243,"tags":244,"published_at":247,"updated_at":248,"view_count":156},"f50b774a-c745-41aa-a3b0-72ac1f5b7117","Laravel Sanctum vs Passport — Which API Auth Should You Use?","laravel-sanctum-vs-passport","Laravel Sanctum is the lighter choice for SPAs and simple API tokens; Passport is full OAuth2 for third-party apps. Pick Sanctum for most apps, Passport when you need real OAuth2.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1785817155174-054d6s.webp",[57,58,245,63,128,246,61],"Passport","OAuth2","2026-08-04T04:19:37.286+00:00","2026-08-04T04:49:08.25034+00:00",{"id":250,"title":251,"slug":252,"excerpt":253,"cover_image":254,"tags":255,"published_at":260,"updated_at":261,"view_count":262},"ef36ca16-73ab-4f9a-9584-ff70a60da5f5","Laravel vs NestJS in 2026: Which Backend Should US Startups Choose?","laravel-vs-nestjs-2026-us-startups","Laravel vs NestJS for US startups in 2026: compare speed, TypeScript, hiring, SaaS MVPs, and real-time apps — and pick the backend that matches your team.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1785609396341-ungcby.jpg",[57,256,189,257,258,128,76,259],"NestJS","SaaS","Startups","Web Development","2026-08-01T18:40:05.071+00:00","2026-08-01T18:40:05.261242+00:00",38,{"id":264,"title":265,"slug":266,"excerpt":267,"cover_image":268,"tags":269,"published_at":273,"updated_at":274,"view_count":118},"c4e41758-834c-476e-8830-f776c963a784","What Is TypeScript? A Beginner’s Guide to Safer JavaScript","what-is-typescript","TypeScript is JavaScript with types. Learn what it is, how it works, and how to write your first typed script with clear examples and FAQs.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1785574204088-8bc8es.jpg",[76,226,259,270,271,272],"Programming","Beginners","Frontend","2026-08-01T08:50:45.861+00:00","2026-08-01T08:50:45.958378+00:00",{"id":276,"title":277,"slug":278,"excerpt":279,"cover_image":280,"tags":281,"published_at":282,"updated_at":283,"view_count":145},"37ee32f1-7b8d-4c4d-92b4-37bb37ff64c5","What Is JavaScript? A Beginner’s Guide to Modern Web Development","what-is-javascript","JavaScript is the programming language that makes websites interactive. Learn what it is, how it works, and how to write your first script with clear examples and FAQs.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1785561346515-utrr91.jpg",[226,259,270,271,272],"2026-08-01T05:16:12.728+00:00","2026-08-01T08:50:11.164531+00:00",{"id":285,"title":286,"slug":287,"excerpt":288,"cover_image":289,"tags":290,"published_at":293,"updated_at":294,"view_count":156},"f238da13-8416-41e6-8281-a6185efd4bd4","Laravel Sanctum Explained: Simple API Authentication for Modern Apps","laravel-sanctum-api-authentication","Laravel Sanctum makes API authentication simple — whether you need token-based APIs for mobile apps or cookie-based auth for SPAs. Here’s how it works, without the jargon.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1785470074981-vejfi4.jpg",[57,58,291,292,61],"API","Authentication","2026-08-01T04:13:15.178+00:00","2026-08-01T08:50:11.393519+00:00",{"id":296,"title":297,"slug":298,"excerpt":299,"cover_image":300,"tags":301,"published_at":305,"updated_at":306,"view_count":307},"d8c77913-46f4-4012-ade6-bd5a81676001","Laravel Module Structure Explained: Keep Large Apps Clean","laravel-module-structure-explained","A practical guide to Laravel module architecture — folder layout, providers, routes, and boundaries that keep features independent as your app grows.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1785385385865-8oyk12.png",[57,128,302,303,189,304],"Modules","Architecture","Clean Code","2026-07-30T04:54:17.431+00:00","2026-08-01T08:50:11.599795+00:00",6,{"id":309,"title":310,"slug":311,"excerpt":312,"cover_image":313,"tags":314,"published_at":321,"updated_at":322,"view_count":132},"26ccd19c-a8bb-419d-be11-efd1d221b415","Cursor vs Claude vs ChatGPT: Which AI Actually Helps with Laravel & Nuxt?","cursor-ai-vs-claude-code-vs-chatgpt-for-laravel-nuxt-development-2026","Tired of constantly copying and pasting code between your Vue frontend and PHP backend? I tested Cursor, Claude Code, and ChatGPT to see which one actually speeds up a real-world Laravel and Nuxt workflow. Here is my breakdown.","https:\u002F\u002Fkjnzswhfjfkhvplczgfs.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fimages\u002Fblog\u002Fcovers\u002F1785300697566-pn766r.png",[57,315,316,317,318,319,320],"Nuxt 3","AI for Developers","Cursor","Claude Code","ChatGPT","Full Stack","2026-07-29T04:46:50.88+00:00","2026-08-01T08:50:11.809909+00:00",[],{"variant":325,"profile":330,"heroStats":343,"aboutParagraphs":347,"aboutPillars":354,"aboutFacts":367,"skillCategories":380,"experiences":419,"education":446,"projects":465,"languages":535,"interests":538},{"id":326,"slug":327,"label":328,"is_active":329,"sort_order":4},"481b2725-e0f6-43df-beea-937ec806a438","full-stack-developer","Full Stack Developer",true,{"name":331,"title":332,"tagline":332,"photo_url":333,"summary":334,"email":335,"phone":28,"location":336,"linkedin":337,"github":338,"instagram":339,"hero_headline":340,"hero_headline_accent":341,"hero_subheadline":342},"Mohd Anish","Full Stack Developer ","\u002Fprofile.png","Full Stack Developer with 3.5+ years of experience specializing in Laravel, Vue.js, Nuxt.js, MySQL, and modern web technologies. Experienced in designing, developing, and maintaining scalable web applications with a strong focus on performance, security, and code quality.","anhali736@gmail.com","Rajasthan, India","linkedin.com\u002Fin\u002Fmohd-anish-23096635a","https:\u002F\u002Fgithub.com\u002Fmrmolani76","https:\u002F\u002Fwww.instagram.com\u002Fmohdanish.me\u002F","Building Scalable Web Apps","using Modern Technologies","Building secure, scalable, and high-performance web applications using Laravel, Vue.js, Nuxt.js, and MySQL.",[344],{"value":345,"label":346},"3.5+","Yrs Development",[348,350,352],{"html":349},"I'm a \u003Cspan class=\"text-gold font-medium\">Full Stack Developer\u003C\u002Fspan> passionate about building secure, scalable, and high-performance web applications. I enjoy solving complex problems and creating modern digital experiences with clean, maintainable code.",{"html":351},"I specialize in \u003Cspan class=\"text-gold font-medium\">Laravel\u003C\u002Fspan>, \u003Cspan class=\"text-foreground\">Vue.js\u003C\u002Fspan>, \u003Cspan class=\"text-foreground\">Nuxt.js\u003C\u002Fspan>, \u003Cspan class=\"text-foreground\">MySQL\u003C\u002Fspan>, and \u003Cspan class=\"text-foreground\">REST APIs\u003C\u002Fspan>, building responsive and scalable applications with a strong focus on performance, security, and code quality.",{"html":353},"With \u003Cspan class=\"text-foreground\">3.5+ years of experience\u003C\u002Fspan>, I've contributed to enterprise-grade applications, including compliance-critical modules for the \u003Cspan class=\"text-foreground\">Complere eQMS\u003C\u002Fspan> platform. I'm committed to continuous learning and building software that is reliable, maintainable, and ready for real-world use.",[355,359,363],{"icon":356,"label":357,"description":358},"lucide:code-2","Build","Scalable, clean web apps",{"icon":360,"label":361,"description":362},"lucide:trending-up","Grow","Marketing-driven results",{"icon":364,"label":365,"description":366},"lucide:shield-check","Ship","Reliable, compliant systems",[368,372,376],{"icon":369,"label":370,"value":371},"lucide:settings","Core Stack","Laravel · Nuxt · Vue · MySQL",{"icon":373,"label":374,"value":375},"lucide:building-2","Currently","Complibued — eQMS Platform",{"icon":377,"label":378,"value":379},"lucide:map-pin","Availability","Open to opportunities",[381,394,403,414],{"title":382,"icon":383,"color":384,"show_on_home":329,"show_on_resume":329,"skills":385},"Backend Development","lucide:database","from-gold-soft to-gold-deep",[57,128,386,387,388,389,390,391,392,393],"Supabase (BaaS)","MySQL","REST APIs","Git","Docker","Redis","GitHub Actions","Cloudflare",{"title":395,"icon":396,"color":384,"show_on_home":329,"show_on_resume":397,"skills":398},"Frontend Development","lucide:code",false,[399,400,401,76,402,226],"Nuxt.js","Vue.js","React","Tailwind CSS",{"title":404,"icon":405,"color":384,"show_on_home":329,"show_on_resume":397,"skills":406},"AI & Automation","lucide:zap",[407,408,409,410,411,412,413],"Prompt Engineering","ChatGPT & Claude","Google Gemini","AI Grok","GitHub Copilot","AI Content Strategy","Workflow Automation",{"title":415,"icon":416,"color":384,"show_on_home":329,"show_on_resume":329,"skills":417},"Development","lucide:wrench",[57,128,400,399,226,76,402,388,387,418],"Git & GitHub",[420],{"role":328,"company":421,"note":422,"period":423,"description":424,"stack":425,"color":384,"icon":426,"points":427},"Complibued","Complere eQMS — Pharmaceutical SaaS","2023 – Present","Building Complere eQMS, a cloud-based Quality Management System for regulated life sciences using Laravel and Nuxt.js. Developed compliance-critical modules — Document Control, LMS, Events, CAPA, Change Control, Audit, and Risk Assessment.","Laravel · Vue\u002FNuxt · MySQL · Tailwind CSS","lucide:folder-git-2",[428,431,433,435,437,440,442,444],{"text":429,"surface":430},"Developing and maintaining a pharma-focused eQMS platform using Laravel and Nuxt.js.","resume",{"text":432,"surface":430},"Built compliance-critical modules: Document Control, Training (LMS), Event Handling, CAPA, Change Control (CR), Audit, and Risk Assessment (RA).",{"text":434,"surface":430},"Implemented approval workflows, version control, and immutable audit trails aligned to 21 CFR Part 11.",{"text":436,"surface":430},"Collaborated with QA teams to meet pharmaceutical compliance standards.",{"text":438,"surface":439},"Built Document Control & LMS (training) modules","home",{"text":441,"surface":439},"Implemented CAPA and Event management workflows",{"text":443,"surface":439},"Developed Change Control (CR) with impact-assessed approvals",{"text":445,"surface":439},"Delivered Audit & Risk Assessment (RA) modules with audit trails",[447,452,456,461],{"degree":448,"school":449,"period":450,"score":451},"M.Sc. (Computer Science)","MDS University, Ajmer","2023 – 2025","73%",{"degree":453,"school":449,"period":454,"score":455},"BCA","2020 – 2023","71%",{"degree":457,"school":458,"period":459,"score":460},"Senior Secondary (12th)","RBSE, Ajmer","2018 – 2019","68.80%",{"degree":462,"school":458,"period":463,"score":464},"Secondary (10th)","2016 – 2017","48.75%",[466,483,500],{"title":467,"slug":468,"description":469,"why":470,"category":471,"image":472,"emoji":473,"link":474,"is_active":329,"stack":475,"features":477,"metrics":482},"Inventory Manager","inventory-manager","Professional inventory management system for tracking stock, orders, and enterprise operations. Powered by Supabase auth and a relational MySQL backend.","Stock and order tracking needed a reliable source of truth for enterprise operations. This system was built so teams can monitor inventory, manage orders, and report status from one authenticated app.","Enterprise","bg-gradient-to-br from-gold-soft\u002F15 via-gold\u002F5 to-transparent","📦","https:\u002F\u002Fruby-enterprise.vercel.app\u002F",[400,476,387,402,76],"Supabase",[478,479,480,481],"Stock Tracking","Order Management","User Authentication","Reporting & Analytics",[],{"title":484,"slug":485,"description":486,"why":487,"category":488,"image":489,"emoji":490,"link":491,"is_active":329,"stack":492,"features":494,"metrics":499},"Random Video Chat","random-video-chat","Omegle-style platform for spontaneous 1-on-1 video conversations with strangers. Uses WebRTC for peer-to-peer video and Supabase Realtime for matchmaking and signaling.","I wanted to explore real-time peer connections without a heavy media server. The app was built to practice WebRTC + realtime matchmaking and deliver instant 1-on-1 video chat with no account friction.","Real-time","bg-gradient-to-br from-gold\u002F15 via-gold\u002F5 to-transparent","🎥","https:\u002F\u002Fomegle-seven-xi.vercel.app\u002F",[400,493,476,402,76],"WebRTC",[495,496,497,498],"Peer-to-Peer Video","Random Matchmaking","Realtime Signaling","No Sign-up Required",[],{"title":501,"slug":502,"description":503,"why":504,"category":505,"image":489,"emoji":506,"link":507,"is_active":329,"stack":508,"features":516,"metrics":525},"Nexro","nexro","Multi-tenant retail web app for GST billing and inventory — products, purchases, sales, POS, quotations, supplier ledgers, and reports. Landing page: nexro.me.","Retail shops were juggling billing, stock, purchases, and supplier dues across sheets and separate tools. Nexro was built as a multi-tenant SaaS so each shop gets its own data on a shared Laravel + Nuxt stack, with GST invoices, live stock, and day-to-day ops from one login.","Web App \u002F SaaS","🏪","https:\u002F\u002Fnexro.me",[509,510,511,512,402,76,387,513,514,515,390],"Laravel 12","Nuxt 4","Vue 3","Vuetify 3","stancl\u002Ftenancy","Laravel Sanctum","Spatie Permission",[517,518,519,520,521,522,523,524],"Multi-tenant shop isolation","GST billing & POS","Inventory with SKU \u002F barcode \u002F serial","Purchases & supplier ledger","Quotations → invoice","Sales, stock & dues reports","Thermal & A4 print","Region-aware landing (nexro.me)",[526,529,532],{"value":527,"label":528},"1","Product platform",{"value":530,"label":531},"7+","Core modules",{"value":533,"label":534},"MT","Multi-tenant",[536,537],"Hindi","English",[259,539,540],"Video Content","New Tools & Tech"]