syncCaricamento...

It happens a lot: an application built years ago as a single Symfony project holds together the public site, the business logic and the back office. It works, but the part users see starts to age, and changing it gets harder and harder, because every tweak to the presentation goes through the same code that runs everything else.
That was the situation one of our clients was in. They needed a new frontend. They did not need a new back office. In this case study we explain how we separated the two, what choices we made, and which trade-off we knowingly accepted.
The starting point: a back office that was doing its job
The original Symfony project combined three things: the public site, the backend logic and the back office the client used to manage content. The first two needed rethinking. The back office, on the other hand, was still doing its job. The client knew it, used it every day and had no reason to change it.
Replacing it in the same project would have been possible, but it would have taken more time and more budget. Rebuilding the frontend would also have meant rebuilding the tools the client used to create and update content, and so redesigning workflows that already worked. That was a cost the project didn't need to carry.
The question we started from was simple:
Can the new frontend use the content already managed in Symfony without depending on how Symfony builds its pages?
If the answer was yes, we could focus the work where it was really needed.
The solution: a Laravel API layer between the data and the new frontend
We introduced an API layer written in Laravel and built the new frontend as a standalone application. The flow fits in one sentence: the back office writes, Laravel reads, the frontend displays.
- Symfony back office: still the place where the client creates and updates content, which continues to be stored in the MySQL database.
- Laravel API: reads the data it needs from the database and exposes it through APIs designed for the new frontend.
- Frontend: consumes the APIs, builds its own pages and decides on its own how to present the content.
For the people who manage the site, nothing changed in their day-to-day work: same screens, same operations, same content. For the people developing the frontend, though, the integration point is no longer the Symfony code but the API. It's a cleaner boundary and easier to reason about.
No changes to the back office code
One thing that made a big difference to the timeline: we were able to introduce this flow without changing the Symfony back office code. All the work went into two areas, the API and the new public interface. The legacy code stayed where it was, doing what it already did well.
This is not a minor point. Working on a production back office that the client uses every day means introducing risk into a part that had no problems. Avoiding that kept the project smaller and more predictable.
An independent release for the public site
Separating the frontend at the code level only made sense if the release was separate too. So we set up the infrastructure on AWS so that each component had its own path.
- The new frontend has its own repository and its own release pipeline on AWS Amplify.
- The Laravel API and the Symfony back office have separate pipelines and are deployed to the same EC2 instance, where Apache serves them through separate virtual hosts.
- The MySQL database runs on Amazon RDS.
In practice, a change to how the site looks ships through the frontend pipeline alone, as long as the API contract stays compatible. No need to touch the API, no need to redeploy the back office. Fewer components are involved in each change to the public site, which is exactly the part that changes most often.
The trade-off: the database is still shared
It would be wrong to present this architecture as full decoupling. It isn't, and we knew that from the start.
The dependency on the legacy system didn't go away: it moved downstream of the API. The frontend is decoupled from the back office, but Laravel still depends on the MySQL schema managed by Symfony. This has specific consequences:
- If a change to the back office alters a table, a field or the meaning of a value that Laravel reads, the API has to be checked too.
- If a change to the API alters the shape of the response, the frontend may need to be updated as well.
In other words, schema changes have to be coordinated between the two backends. It's a real cost, and one to keep in mind every time someone works on the back office.
Why it was worth it
The alternative would have been to give Laravel its own database. But that would have required a data migration or a sync process between the two systems: more work, more places where things can go wrong, more budget.
Sharing the database let us reuse the existing content as it was, with no migrations and no syncing. In exchange, we accepted having to coordinate schema changes. For the scope of this project, it was the right trade.
What the client got
The approach worked for the goals we had:
- the client kept publishing content with the tools they already knew;
- we rebuilt the public experience within the available time and budget;
- the public site now has a release cycle independent of the back office.
There's also a benefit looking ahead. If the back office needs to be replaced someday, the frontend can keep using the same API, provided its contract stays stable. The API has become the fixed point around which the other parts can change, one at a time.
What we take away from this project
When you work on a legacy application, the temptation is to rebuild everything. Sometimes that's the right call, often it isn't. In this case the useful question wasn't how do we modernize the application, but which part really needs to change, and how do we isolate it from the rest.
Adding an API layer between the data and the presentation let us work only where it was needed, without interrupting the client's day-to-day work. The price, a shared database, is clear and manageable, as long as it's stated openly and taken into account whenever the schema or the APIs are changed.
If you also have an application where the frontend and back office grew up together and you want to figure out which part to separate first, let's talk: we'll look at the project with you and tell you how we would approach it.