class ReservationService {

  public function calculateTotal()
  {
      return $this->pricingService
          ->applySeasonModifier()
          ->applyDiscountRules()
          ->applyChannelCommission()
          ->applyTaxes()
          ->buildInvoice();
  }

}

// Domain rules evolve
// architecture decisions matter
// complexity grows over time

Back to projects

2023 — Technical Test

RandomUser API Technical Test

This project represents the technical test I completed during the selection process for my first professional role as a web developer.

External API Integration

Consuming third-party APIs using PHP and cURL.

Backend–Frontend Communication

AJAX requests retrieving JSON data from a PHP endpoint.

First Technical Assessment

Project completed during the hiring process for my first developer role.

The goal of the exercise was to build a small web application capable of retrieving user data from the RandomUser API and displaying it dynamically in the browser. RandomUser API

Although the problem itself was relatively simple, the challenge was designed to evaluate several fundamental skills expected from a junior developer entering a professional environment.

🎯 Technical Objectives

  • Consume an external REST API using PHP
  • Implement HTTP requests using cURL
  • Return structured JSON responses
  • Perform AJAX requests from the frontend
  • Render dynamic data in the browser

🏗️ Architecture of the Solution

The solution was intentionally simple but structured around clear responsibilities between backend and frontend.

  • A dedicated PHP class responsible for performing the HTTP request to the RandomUser API using cURL.
  • An endpoint exposing the data in JSON format.
  • A frontend implementation using JavaScript and AJAX requests to retrieve the data asynchronously.
  • Rendering of the returned user data inside a simple HTML interface.

⚙️ Backend Implementation

The backend layer was implemented using PHP and focused on interacting with the external API.

A PHP class was created to encapsulate the HTTP request logic using cURL, handling the communication with the RandomUser API and returning a JSON response to the frontend.

This separation helped keep the API communication logic isolated from the presentation layer.

🖥️ Frontend Interaction

On the frontend, JavaScript was used to perform an asynchronous request to the PHP endpoint.

The returned JSON payload was parsed and rendered dynamically in the HTML page, displaying the user information retrieved from the API.

🎓 Learning Experience

This technical challenge marked my first real exposure to a professional software selection process.

It required applying several concepts I had recently learned, such as working with APIs, performing HTTP requests in PHP and structuring a small web application with clear separation between frontend and backend.

Completing this test successfully allowed me to secure my first position as a developer, making this project a significant milestone in my professional journey.