The client's cloud storage app was a tightly coupled monolith built in Laravel with Blade templates — frontend and backend fused together. The server-rendered UI worked, but it lacked a modern, app-like feel, and critically, its architecture couldn't support the native iOS app they wanted to add. Business logic was baked into the views, so nothing could be reused from another platform.
The goal was to modernize the user experience while powering both the web app and a native iOS app from a single source of truth. Core logic — file uploads, sharing, permissions — had to be consumed securely by multiple clients without duplicating any of it. On top of that, the migration had to happen incrementally, without taking the live service offline.
Re-architected Laravel into a stateless, view-less JSON API with token authentication via Laravel Sanctum. All file, sharing, and permission logic became a single source of truth that any client could call.
Built a new web frontend on Next.js (App Router): SSG/SSR for marketing pages to keep SEO and speed, and an app-like SPA dashboard that consumes the API.
Migrated route by route using the strangler pattern — the existing Laravel app kept serving each page until its replacement was ready, achieving the cutover with zero downtime.
Implemented presigned-URL direct-to-S3 uploads with chunked uploading, bypassing the app server so even very large files upload fast and scale cleanly.
The native Swift iOS app consumes the exact same REST API as the web. No business logic was duplicated, web and iOS behavior stay perfectly consistent, and the build timeline shrank dramatically.
The turning point of this project was the decision to decouple the backend into an API. Separating frontend from backend let us build a modern Next.js web app and a native iOS app on the same API — with no duplicated logic — something the tightly coupled Laravel monolith could never have supported. Making the backend an independent single source of truth is one of the highest-value investments any product planning a multi-platform future can make.