Skip to content

Category

Web Application Development

Web application development: choosing a tech stack, React vs Angular, custom web apps for business growth and how AI is changing web development.

Four steps to fix Next.js window is not defined: read the first stack frame to see whether the component or module evaluation failed, move browser code used in render into useEffect, load libraries that read window on import with next/dynamic and ssr false, then verify with a hard refresh and next build

10/22/2026

How to Fix Next.js Window Is Not Defined Error

A live vehicle map broke our fleet dashboard build with window is not defined, even though the component was marked use client. Here is why Client Components still render on the server and how I fix each case.

By Muhammad Wilayat Shah

Read
502 Bad Gateway Nginx: Causes and How to Fix It

10/21/2026

502 Bad Gateway Nginx: Causes and How to Fix It

Fix 502 Bad Gateway in Nginx step by step: read error.log, then solve connection refused, PHP-FPM socket and permission errors, crashed workers, big headers and Docker upstream issues.

By Muhammad Wilayat Shah

Read
Four layers of Laravel access control: permissions such as invoices.approve checked on every route, roles that bundle permissions as job titles, policies for record rules such as an approval limit, and Pennant feature flags for rollouts that are not permissions

10/21/2026

Laravel Role Based Permissions: RBAC and Feature Access

Our ERP finance module moved from is_admin to roles, permissions, policies and feature flags. The setup we use with spatie/laravel-permission and Pennant, and seven errors we hit, each reproduced with real output.

By Muhammad Wilayat Shah

Read
Four steps to fix a CORS error between React and Laravel: read the Chrome console message, reproduce the preflight with curl -X OPTIONS and an Origin header, fix paths, allowed origins and credentials in config/cors.php, and run php artisan config:clear

10/20/2026

CORS Error in React and Laravel: How to Fix It

A new developer on our school ERP got a blank React dashboard and a CORS error while production worked. Here is how I read the Chrome message, reproduce the preflight with curl and fix Laravel's CORS config.

By Muhammad Wilayat Shah

Read