Ram.Franco LogoRam.Franco
From PHP Spaghetti to Next.js Nirvana: A Developer Origin Story
PHP

From PHP Spaghetti to Next.js Nirvana: A Developer Origin Story

8 min read

Everyone has a "first project."

Mine was Eye Vision—an e-commerce optical shop built with PHP, vanilla JavaScript, and prayers. It worked. Barely. And it taught me everything about how not to build software.

The Spaghetti Era (2022)

Picture this: A single index.php file with 2,000 lines. No framework. No routing library. Just this:

<?php
if ($_GET['page'] == 'products') {
    include 'products.php';
} elseif ($_GET['page'] == 'cart') {
    include 'cart.php';
} elseif ($_GET['page'] == 'checkout') {
    include 'checkout.php';
} else {
    include 'home.php';
}
// ... 47 more elseifs
?>

Authentication? $_SESSION['logged_in'] = true; (Security experts, please look away.)

Database queries? Inline SQL with string concatenation. I was one misplaced quote away from deleting the entire database.

$query = "SELECT * FROM products WHERE id = " . $_GET['id'];
// SQL injection speedrun any%

Did it work? Yes.

Did I learn? Absolutely.

Would I show the source code in a job interview? I would rather eat glass.

The Awakening (Late 2022)

I transferred to Bulacan State University, and something clicked.

I met developers who talked about things like:

  • Separation of concerns (apparently, views and logic shouldn't be the same file?)
  • ORMs (wait, you mean I don't have to write raw SQL?)
  • Component-based architecture (one file per feature? Revolutionary!)

I discovered React. Then I discovered that React was "old news" and everyone was using Next.js.

So I learned that too.

The Transition Stages

Looking back, my journey followed a predictable pattern:

Stage 1: Denial

"PHP is fine. Laravel exists. Modern PHP is good actually. Why is everyone obsessed with hydration? I drink enough water."

Stage 2: Anger

"Why does simple form validation require 3 libraries and a schema builder? It's just a text input!"

Stage 3: Bargaining

"Maybe I'll use React but keep the PHP backend. A Frankenstein architecture. It'll be fine." (Narrator: It was not fine.)

Stage 4: Depression

"I have spent 4 hours configuring Webpack. I have written 0 lines of code. I hate computers."

Stage 5: Acceptance

"Okay. Next.js. TypeScript. Tailwind. I accept my fate. At least the autocomplete is nice."

Did You Know?

Trivia: The average developer learns 3-5 frameworks before settling on one they actually like. I went through jQuery, Vue, React, and briefly considered Svelte before committing to Next.js. The Svelte experiment lasted exactly 3 days.

The Magna Cum Laude Grind

I won't pretend the transition was easy.

During my final year at BulSU, I was:

  • Learning Next.js on YouTube at 2x speed
  • Building freelance projects with technologies I'd learned that week
  • Maintaining Dean's List grades
  • Sleeping approximately 4 hours per night

The result? Magna Cum Laude and a portfolio that proved I could build production-grade applications.

But honestly? The real education happened in the gaps between classes. In the pull request reviews. In the "why doesn't this work at 3 AM" debugging sessions.

The SOFI.AI Turning Point

My internship at SOFI AI Tech Solution Inc. changed everything.

For the first time, I was building software that mattered. AI chatbots that handled real customer queries. Systems that processed thousands of messages daily.

They gave me three certifications:

  • Developer Intern
  • QA Tester Intern
  • Full Stack Web Developer

But the real certification was confidence. I learned that I could walk into a room with senior developers and contribute.

What PHP Taught Me

Here's the thing: I don't regret the PHP days.

That spaghetti code taught me:

  1. Why abstractions exist. You don't appreciate MVC until you've lived without it.
  2. How HTTP actually works. $_GET and $_POST aren't magic—they're form submissions.
  3. The value of debugging. When there's no framework error page, you learn to read stack traces.

Every Next.js app I build is better because I remember the chaos that came before.

Where I Am Now

Today, I architect systems at Medianeth. I integrate AI. I optimize for Core Web Vitals. I write TypeScript that would make my 2022 self cry tears of joy.

But every few months, I pull up the Eye Vision repository.

Not to cringe (okay, a little to cringe).

But to remember that everyone starts somewhere. And that somewhere doesn't have to be pretty.

If you're reading this and you're still in the spaghetti phase: Keep going. The seniors around you? They have their own index.php files buried in private repos.

We all do.

PHP
Next.js
Career
Learning

More from the Blog

Limited Availability

Ready to Build Something Extraordinary?

Whether you have a fully-defined project scope or just a high-level vision, let's discuss how we can bring it to life with production-grade engineering.

Available for new projects