08.04.2026

Technical Blogs

How tpay Built an AI Compliant Codebase with Cursor

Share

How tpay Transformed Its Codebase to Become AI Compliant

We’re all witnessing how AI is reshaping the landscape of software construction. At tpay we were determined to get AI into the very fabric of our engineering culture. Here is how we’ve been approaching that transition.

Instead of simply introducing AI assistants to our developers, we re-architected our development environment so AI can understand, navigate, and contribute to our codebase with precision.

The result: an AI-compliant engineering ecosystem built in partnership with Cursor.

The Challenge: AI Tools Without Context

Many deployments of AI coding tools expect immediate productivity gains, which is a reality today. However, these tools often under-perform because they lack deep context about:

• Codebase architecture

• Engineering standards

• Internal documentation

• Development workflows

• System dependencies

Without this structure, AI becomes a suggestion engine rather than a powerful collaborator.

For a company like tpay, operating across complex payment ecosystems in the META region, this limitation was not efficient.

We needed AI to operate with architectural awareness.

The Strategy: Building an AI-Ready Codebase

Within just one week, our engineering teams transformed more than 40 repositories and millions of lines of code into an AI-compliant environment.

This transformation involved three key pillars:

1. Structured Engineering Knowledge

We embedded deep documentation into our repositories so AI systems can understand:

• service boundaries

• architectural decisions

• dependency structures

• engineering standards

This allows AI agents to operate with context rather than guesswork.

2. Custom AI Rules and Agents

Using Cursor, our teams implemented custom AI agents and rule sets designed specifically for tpay’s engineering environment.

These rules guide AI interactions across:

• code generation

• debugging workflows

• refactoring processes

• documentation creation

Instead of generic AI assistance, engineers now interact with context-aware AI collaborators.

3. AI Literacy Across the Engineering Team

Technology alone does not create transformation.

Our engineers invested in AI literacy, ensuring they understand how to design prompts, validate outputs, and integrate AI into development cycles responsibly.

This human expertise turns AI into what we call an engineering force multiplier.

The Impact: Engineering-Led ROI

The result of this initiative goes far beyond faster coding.

We are now seeing measurable improvements in:

• development velocity

• code consistency

• documentation quality

• knowledge sharing across teams

AI is now embedded across our entire development lifecycle, from initial design through deployment and maintenance.

The Current Phase: AI in Production Infrastructure

Our next deployments are expanding AI beyond development environments into production infrastructure.

We are testing our systems with integrated AI to contribute with:

• monitoring systems

• automated issue detection

• intelligent debugging

• infrastructure optimization

All while maintaining human-in-the-loop validation to ensure reliability and security.

Leadership Driving the Transformation

This transformation was made possible through the strategic direction and support of tpay’s leadership and engineering teams.

Article by: Samuel Toma, Head of Software Engineering & Data at tpay

We extend our thanks to:

Freddy Mounir, Ahmed Maamoun, Fadi Matta, Mohamed Abdelkafy, Alaa Diab, Karim Abouhalaka, Manal Aldaher, Ebrahim Salah

Their vision ensured that AI remains embedded across the entire development lifecycle, from code creation to production support.

Leading the AI-Driven Future of Payments

AI will not replace engineers.

But engineers who effectively leverage AI will redefine how software is built.

At tpay, we are committed to being at the forefront of this transformation as we continue to innovate across digital payments and connectivity in the META region.