tmai — Taking Over AI-Generated Code

tmai — Taking Over AI-Generated Code

Your agency's client had their project built with a tool like Lovable, Cursor or Bolt. The prototype works; but at launch, or at the first serious bug, it landed on your desk. Before you build on this code, tmai finds where it is safe and where it is not, and turns it into code you can take over.

tmai · AI-generated code

Your agency's client had their project built with a tool like Lovable, Cursor or Bolt. The prototype works; but at launch, or at the first serious bug, it landed on your desk. Before you build on this code, tmai finds where it is safe and where it is not, and turns it into code you can take over.

When is it tmai?

  • • The client had the prototype built with an AI tool, and now it is opening to real users.
  • • There is no developer who wrote the code; there is only the project the tool generated and an account.
  • • Every new request breaks an earlier feature, and nobody knows why.
  • • Payments, sign-up or personal data are about to go live, and you are not sure they are secure.

What we check first

These six areas are where a project quickly generated with AI tools needs to be checked before anything is built on top of it.

Keys embedded in the browser

API keys and secret keys may be written into the front-end code. Anything sent to the browser can be read by a visitor.

What we check: Traces of keys in the built front-end files and in the repository; which keys must be moved server-side and rotated.

Database rules left open

In hosted database services such as Supabase or Firebase, access rules may be switched off or left open to everyone.

What we check: Who can read and write each table or collection; data reachable directly from the front end.

Authentication only in the front end

If the login check exists only in the interface, someone who skips the page and sends the request directly can reach protected data.

What we check: Whether every protected action is also authorized on the server side.

No tests

A generated project may have no automated tests; what a change breaks is only seen in production.

What we check: Whether critical flows such as sign-up, payment and ordering have tests; if not, which flows get tests first.

Duplicated logic

Code doing the same job may be repeated across files, unaware of each other; a bug fixed in one place lives on in another.

What we check: Whether rules such as pricing, permissions and stock live in one place or are scattered.

Packages that do not exist, or are outdated

AI tools can add a package name that does not exist, or an old version with a known security flaw.

What we check: That every dependency actually exists, its version, and its known vulnerabilities.

How it works

1
Pre-assessment →

In the Handover Audit, tick "The project was built with AI tools" and fill in the 12 items. Missing access shows up from the start.

2
Confidentiality →

Before we look at the code, the confidentiality and engagement agreement is signed.

3

Review

The six areas above are checked on the project's own repository and accounts; the result is shared with the agency in writing.

4
Decision →

With the Salvageability Index, we decide together whether the code is repaired and kept, or its critical parts are rewritten.

5

Intervention

Keys, database rules and permissions first; then tests and simplification. A rollback point is taken before every intervention.

Scope of intervention

The AI tool itself, the hosting service and the database service belong to their providers. tmai works on the code and configuration in your accounts. Whether you keep using the tool is your decision.

Tool names are mentioned only as examples; we have no partnership with these tools.

First, see what you are taking over

Start with the Handover Audit; if you are in a crisis, write to the crisis line directly.

Trend Master Akademi Studio & Labs

B2B White-Label Engineering Desk | Tel: +90 534 371 35 73 | Email: info@trendmasterakademi.com

Address: Akdeniz Mah. Sehit Fethibey Cad. Heris Tower No: 55 Ic Kapi No: 091 Konak / Izmir