xgeeks Logo
Accelerating Product Delivery at Circl
Accelerating Product Delivery at Circl

Accelerating Product Delivery at Circl

Beating engineering bottlenecks by integrating a Swagger-Based API Client Generator

Challenge

Improve API integration speed and reliability across multiple services and teams by implementing an automated API client generator using Swagger.

Circl shifted their approach in order to reach a broader marketplace and xgeeks architected a new frontend to fulfill requirements and ensure maintanability and scalability on a very tight deadline.

This new approach allows companies to schedule and plan deliveries, manage vehicles, drivers and warehouse locations. In addition to this, it provides users with real time and post delivery analysis and metrics. Each company has its own isolated environment and a mobile application that drivers can use while on route.

In a short time to market and fast-paced development environment, the frontend and mobile teams had to create the API clients, type the response and request payloads and only then implement the endpoint that would lead to a new feature.

As the product scaled, teams struggled with:

  • Manual API client development: Writing and maintaining SDKs across frontend and backend teams was time-consuming and error-prone.
  • Inconsistent API usage: Frequent contract mismatches due to outdated or incorrect implementations.
  • Duplicated code in different clients: frontend and mobile teams would have to write the same code in different codebases

Below is represented the flow of the teams:

API_generator.png

Our Role

  • Improving developer experience and efficiency
  • Providing engineering capacity

Solution

Swagger/OpenAPI-based API client generator pipeline

The engineering team introduced a Swagger/OpenAPI-based API client generator pipeline.

Here's how it worked:

  • Swagger Spec as Source of Truth: The backend published its OpenAPI spec.
  • Client SDK Generation: Using tools like Swagger TypeScript API, typed client SDKs were auto-generated in TypeScript.
  • CI/CD Integration: SDK generation was integrated into the CI pipeline to keep clients updated with every API change.
  • Versioning and Backward Compatibility: Specs were versioned to support parallel development and gradual migration.

Below is the flow of the teams after the solution was implemented:

API_generator_after.png

Typescript
API Client Generator
Swagger
Versioning
Continuous Integration

Success

xgeeks provided a better development experience, streamlining workflows, reducing friction enabling developers to write high-quality code

No more duplicated code related to the API across different clients - As the code is now generated from a tool, the frontend and mobile teams don't need to worry about it.

Decrease in Contract-Related Bugs - Fewer issues due to mismatched endpoints, wrong payloads, or undocumented responses

Improved productivity - Shared types and requests made the engineers have a faster pace in developing features

Faster Onboarding of Developers - Standardized, typed clients meant new hires could integrate APIs within days

Consistency Across Clients - All platforms (web, mobile, backend) used the same SDKs, eliminating discrepancies

Faster development cycle - Going from 8h of adding the endpoint and developing the feature to 2h of developing the feature and adding tests to it

Continuous Sync - With SDKs regenerated on each CI run, clients were always aligned with latest specs

750%

Reduction in Integration Time

1000%

Decrease in Contract-Related Bugs

1000%

Consistency Across Clients