---
title: "Farhan Malhi"
description: "Farhan Malhi is a consulting engineer based in Leipzig, Germany, with 7+ years of production web and desktop software behind him, including tooling for Mercedes Benz at Appsfactory and the MedLucy desktop app for doctors. He helps founders and product teams turn AI prototypes and aging codebases int"
canonical: https://farhanmalhi.com
---

# Farhan Malhi

> Farhan Malhi is a consulting engineer based in Leipzig, Germany, with 7+ years of production web and desktop software behind him, including tooling for Mercedes Benz at Appsfactory and the MedLucy desktop app for doctors. He helps founders and product teams turn AI prototypes and aging codebases into reliable, production-grade software, and works as a fractional tech lead.

- Engagements are fixed-price or fixed-day-rate, scoped in writing after a free discovery call.
- Stack: TypeScript, React, Next.js, Electron, Node.js, AWS.
- Certifications: AWS Certified Security – Specialty (May 2026), AWS Certified Developer – Associate (Nov 2024).
- Clients work with Farhan directly: no account managers and no handoffs.
- Works with clients in Europe, the UK and the US (CET/CEST).
- Book a discovery call: https://calendly.com/farhan-malhi/discovery-call-with-farhan

## Track record

- Moved Mercedes Benz's design workflow from Sketch and internal tools to Figma, and built the custom Figma plugins that support it (Appsfactory).
- Built MedLucy, a cross-platform desktop app for doctors, with the founder from the idea stage, owning architecture and development (MedLucy).
- Cut PWA load time from 12 seconds to 3 seconds (Bykea).
- Introduced micro frontends, a shared component library and reusable CI/CD, holding 80% test coverage across frontend and backend (DGlobal).
- Delivered 12 client projects in 2 years, including ERP modules (Nextbridge Ltd.).

## Services

### AI-to-Production Sprint

Take your working LLM or AI prototype and ship it as a reliable product real users can depend on.

What you get:

- Auth, rate-limits, and abuse protection
- Observability, logs, and cost tracking
- CI/CD pipeline and infra-as-code
- Production deploy + on-call handoff

Recent: Mercedes Benz tooling · MedLucy desktop app

Details: https://farhanmalhi.com/services/ai-to-production-sprint

### Product Build (Idea to Launch)

I partner with founders end-to-end: turn a validated idea into a shipped product with real users.

What you get:

- Product architecture and tech selection
- Full-stack build (web, desktop, or PWA)
- On-site discovery with end users when needed
- Launch, monitoring, and post-launch iteration

Recent: MedLucy (Zürich) · Metal · Bykea PWA

Details: https://farhanmalhi.com/services/product-build

### Modernization & Tech Audit

Untangle a struggling codebase. Get a clear plan, faster app, and a team that can ship again.

What you get:

- Architecture and performance audit
- Concrete refactor / migration plan
- Hands-on perf and bundle optimization
- Hand-rolled rollout with your team

Recent: Bykea PWA (12s → 3s) · DGlobal Micro Frontends · Mercedes design tooling migration

Details: https://farhanmalhi.com/services/modernization-audit

### Fractional Tech Lead

Senior engineering leadership for teams that aren't ready to hire a full-time CTO yet.

What you get:

- Tech direction and architectural reviews
- PR reviews, mentorship, and hiring help
- Cross-team alignment with backend / product
- Roadmap support and delivery rituals

Recent: YieldWerx (Technical Lead) · MedLucy (founding engineer)

Details: https://farhanmalhi.com/services/fractional-tech-lead

## Projects

### RB Leipzig Analytics Hub

A club-wide data analytics platform that helps everyone at RB Leipzig make data-driven decisions. It features Matchday, Merchandise, and No-Show views with a dashboard catalogue, customer insights, and real-time updates, all accessible through a self-service hub integrated with Looker and Posit Connect.

- Role: Full Stack Engineer
- Company: Appsfactory
- Period: 2026
- Type: Client Project
- Stack: Svelte, Fastify, Google Cloud, Big Data, Looker, Posit Connect

Responsibilities:

- Built the RBL Analytics Hub from the ground up with Svelte and Fastify
- Developed Matchday, Merchandise, and No-Show dashboard views
- Integrated Looker and Posit Connect for detailed drill-downs and expert analyses
- Architected real-time data pipelines on Google Cloud for agile workflows
- Delivered a self-service analytics tool accessible to all club stakeholders

Details: https://farhanmalhi.com/projects/rb-leipzig-analytics-hub

### MedLucy

A cross-platform desktop application for doctors, built end-to-end from idea to launch. Partnered with the founder on architecture and product direction, with on-site discovery sessions in Luxembourg.

- Role: Founding Engineer
- Company: MedLucy
- Type: Product
- Stack: Electron.js, React.js, Redux, Tailwind CSS, TypeScript

Responsibilities:

- Partnered with the founder from idea stage through launch
- Owned architecture and technical decision-making across the product lifecycle
- Built the cross-platform desktop app end-to-end
- Ran on-site discovery sessions with end-user doctors in Luxembourg
- Contributed to product direction and engineering management beyond pure development

Details: https://farhanmalhi.com/projects/medlucy

### Metal

Frontend features for Metal's main product and Metal Academy, a learning platform built with Strapi as a headless CMS and integrated into the main app. Focused on responsive, high-performance UI with shadcn/ui.

- Role: Frontend Engineer
- Company: Metal
- Type: Product
- Stack: Next.js, React.js, Strapi, shadcn/ui, NestJS

Responsibilities:

- Built and maintained frontend features for Metal's main product
- Developed Metal Academy on Strapi as a headless CMS
- Integrated the learning platform into the main application
- Delivered responsive, high-performance UI with shadcn/ui
- Collaborated with NestJS backend teams for clean API integration

Details: https://farhanmalhi.com/projects/metal

### Mercedes-Benz Management Consulting

A bespoke website tailored for Mercedes-Benz's management-related news and insights. Built at Appsfactory.

- Role: Frontend Engineer
- Company: Appsfactory
- Period: Mar 2024 – Present
- Type: Client Project
- Stack: Nuxt.js, Tailwind CSS

Responsibilities:

- Built a bespoke marketing site for Mercedes-Benz Management Consulting
- Implemented news and insights modules with Nuxt.js
- Translated brand and design requirements into production UI
- Coordinated directly with Mercedes-Benz stakeholders

Details: https://farhanmalhi.com/projects/mercedes-benz-management-consulting

### Mercedes Meta Suit

A Figma plugin that streamlines user authentication with backend services and Figma. Seamlessly manage data transfer between Figma and the backend, generate code for Figma components, and create components using library variables for consistency and efficiency.

- Role: Frontend Engineer · Figma Plugin Developer
- Company: Appsfactory
- Period: Nov 2023 – 2026
- Type: Figma Plugin
- Stack: Figma API, React.js, Vite, Material-UI

Responsibilities:

- Built a Figma plugin streamlining user authentication with backend services
- Designed bidirectional data transfer between Figma and backend
- Generated production code from Figma components
- Built component generation using library variables for design consistency

Details: https://farhanmalhi.com/projects/mercedes-meta-suit

### Vonovia Internal Portal

An internal portal for management employees at Vonovia, a leading residential real estate company in Germany, built to streamline their operational processes.

- Role: Frontend Engineer
- Company: Appsfactory
- Period: Aug 2023 – Present
- Type: Client Project
- Stack: Vue.js, Tailwind CSS

Responsibilities:

- Built an internal portal for Vonovia's management staff
- Streamlined day-to-day operational workflows
- Implemented Vue.js components against an existing design system
- Worked with client stakeholders to refine requirements

Details: https://farhanmalhi.com/projects/vonovia-internal-portal

### Customer Management Portal

A centralized banking portal for managing customer information, personal details, transactions, and accounts. Built as a full stack developer, also refining product requirements.

- Role: Full Stack Developer
- Company: DGlobal
- Period: Aug 2022 – Aug 2023
- Type: Client Project
- Stack: NestJS, React.js, Ant Design v5, Playwright, Jest, SQL, AWS, Keycloak

Responsibilities:

- Built a centralized banking portal end-to-end
- Implemented customer, transaction, and account management flows
- Integrated Keycloak for auth and AWS for hosting
- Wrote E2E coverage with Playwright and unit tests with Jest
- Refined product requirements with stakeholders

Details: https://farhanmalhi.com/projects/customer-management-portal

### User Management Portal

A secure web-based application for banks to manage employee access to sensitive data and systems. Create, edit, and delete user accounts, assign roles and permissions.

- Role: Full Stack Developer
- Company: DGlobal
- Period: Aug 2022 – Aug 2023
- Type: Client Project
- Stack: NestJS, Ant Design, React.js, SQL

Responsibilities:

- Built secure user management for banking employees
- Implemented CRUD flows for accounts and access control
- Designed role and permission assignment workflows
- Worked across NestJS backend and React frontend

Details: https://farhanmalhi.com/projects/user-management-portal

### Bykea App

A ride-hailing service with multiple modules: food delivery, groceries, and bike taxi. Led development of the food module, reviewed PRs, optimized code, and handled direct client communication.

- Role: Frontend Engineer · Module Lead
- Company: Bykea
- Period: Aug 2021 – Aug 2022
- Type: Client Project
- Stack: Fastify.js, Tailwind CSS, React.js, PWA, TypeScript, Redux Toolkit

Responsibilities:

- Led development of the food delivery module
- Reviewed PRs and improved code quality across the team
- Optimized PWA performance from 12s to 3s load time
- Handled direct client communication with the CEO and product
- Integrated Redux Toolkit for global state management

Details: https://farhanmalhi.com/projects/bykea-app

### Hessels (ERP)

Enterprise resource planning system for managing day-to-day business activities: accounting, procurement, project management, risk management, and supply chain operations.

- Role: Frontend Engineer
- Company: Nextbridge Ltd.
- Period: Jun 2021 – Oct 2021
- Type: Client Project
- Stack: Vue.js, Framework Design, Requirements Analysis

Responsibilities:

- Built ERP modules for accounting and procurement
- Implemented project management, risk, and supply chain flows
- Contributed to framework design across the application
- Translated client requirements into engineering tasks

Details: https://farhanmalhi.com/projects/hessels-erp

### Phonepay

An invoice generating platform where businesses register, add accounts for payments, manage expenses, attach PDF invoices or create custom ones, with ability to pay invoices by phone.

- Role: Full Stack Developer
- Period: Apr 2021 – Jun 2021
- Type: Full Stack
- Stack: Angular, Node.js, DB Design, API Architecture

Responsibilities:

- Designed the database schema and API architecture
- Built invoice generation and expense management features
- Integrated phone-based invoice payment workflow
- Built the Angular frontend and Node.js backend

Details: https://farhanmalhi.com/projects/phonepay

### Weesvardig

An employee management system for multiple companies with features including social media, blogs, knowledge base, library, and employee training modules.

- Role: Frontend Engineer
- Company: Nextbridge Ltd.
- Period: Jan 2021 – May 2021
- Type: Client Project
- Stack: Angular, Framework Design, Requirements Analysis

Responsibilities:

- Built employee management for multi-company tenants
- Implemented social, blog, knowledge base, and library modules
- Designed framework architecture for shared features
- Translated client requirements into product features

Details: https://farhanmalhi.com/projects/weesvardig

### DPG

An ad publishing website for newspapers in the Netherlands. Each slot has its own dimensions, and ads were published according to available slot sizes.

- Role: Frontend Engineer
- Company: Nextbridge Ltd.
- Period: Dec 2020 – Feb 2021
- Type: Client Project
- Stack: Angular, Requirements Analysis

Responsibilities:

- Built the ad publishing site for Dutch newspapers
- Implemented dynamic slot dimensions and ad placement
- Translated client requirements into Angular components

Details: https://farhanmalhi.com/projects/dpg

### Ttwenty4

A centralized hospital management system in Vue and Sylius for the Netherlands. Used by emergency services to check hospital bed occupancy. Maintained data for all hospitals nationwide.

- Role: Frontend Engineer
- Company: Nextbridge Ltd.
- Period: Apr 2020 – Dec 2020
- Type: Client Project
- Stack: Vue.js, Sylius, Requirements Analysis

Responsibilities:

- Built a hospital management system used by emergency services
- Implemented bed occupancy tracking nationwide
- Built the Vue frontend on top of Sylius
- Translated client requirements into product features

Details: https://farhanmalhi.com/projects/ttwenty4

### KYN (Know Your Neighbor)

A society management system for maintaining records: bills, complaints, and notifications. Web and mobile app. Designed database, built backend in Django and frontend in React.

- Role: Full Stack Developer
- Company: University of Central Punjab
- Period: Nov 2018 – Jul 2019
- Type: University
- Stack: React.js, Django, Database Design, Mobile

Responsibilities:

- Designed the database schema
- Built the Django backend
- Built the React web frontend and mobile app
- Implemented bills, complaints, and notification flows

Details: https://farhanmalhi.com/projects/kyn

### Book a Hotel Room

A web application for booking hotel rooms. Identified domain classes and developed the frontend in React.

- Role: Frontend Developer
- Company: University of Central Punjab
- Type: University
- Stack: React.js

Responsibilities:

- Identified domain classes for the booking flow
- Built the React frontend for hotel room booking

Details: https://farhanmalhi.com/projects/book-a-hotel-room

### Content Management System

A complete web application in HTML and PHP for the university. Designed and normalized the database to 3NF, wrote PHP queries for data retrieval.

- Role: Full Stack Developer · DBA
- Company: University of Central Punjab
- Type: University
- Stack: PHP, HTML, MySQL, Database Design

Responsibilities:

- Designed and normalized the database to 3NF
- Wrote PHP queries for data retrieval
- Built the HTML/PHP web application end-to-end

Details: https://farhanmalhi.com/projects/content-management-system

## Products

### hiruzen

Your terminal assistant. As you type a command, hiruzen shows what the next word can be: subcommands, options, branches, files, and scripts. It learns which ones you use in each project and puts them first, and nothing runs until you press Enter. A single Rust binary with completion specs for more than 700 command-line tools embedded. It has no servers and needs no account: its only network requests are registry searches and a daily check for a new version, and a setting turns each off. It works with zsh, bash, fish, and PowerShell on macOS and Linux, and with Windows PowerShell 5.1 and cmd on Windows. Open source under MIT.

- Status: Live
- Link: https://hiruzen.farhanmalhi.com
- Source: https://github.com/farhanmalhi/hiruzen-cli

### Finance Tracker

Personal finance, reconciled across every currency. A login-gated personal finance tracker. Record income, expenses, investments, and debts in any currency and see them reconciled into one base currency on a single dashboard. Every row snapshots its FX rate at insert time, so the math always balances. Built multi-user on Postgres Row-Level Security, so each user only ever sees their own data.

- Status: Archived
- Link: https://finance-tracker.farhanmalhi.com/

## Experience

### Appsfactory

Agency. https://www.appsfactory.de/en

- Role: Software Engineer, Full-time, Aug 2023 - Present, Leipzig, Saxony, Germany · On-site

- Successfully transitioned Mercedes Benz's design workflow from Sketch and internal tools to Figma
- Developed custom Figma plugins for Mercedes Benz, enhancing design efficiency and collaboration
- Developed the Mercedes Management Consulting website
- Created a QR code solution for Mercedes Benz infotainment systems, supporting seamless integration with car displays
- Managed direct client interactions, gathering requirements and translating them into actionable tasks
- Participated in architecture design of a Training platform, contributing to front-end and back-end solutions
- Enabled communication layer between Electron and React, developed multi-window feature with synced Redux states
- Completed SAFE environment training

Stack: React.js, Next.js, Nest.js, Node.js, Vue.js, Nuxt.js, Electron.js, JavaScript, TypeScript, Figma, Figma API, AWS, AWS Lambda, Framework Design, Project Management, Requirements Analysis, Web Engineering

### DGlobal

Product · Startup. https://www.linkedin.com/company/dcoreofficial/posts/?feedView=all

- Role: Software Engineer, Full-time, Aug 2022 - Aug 2023, Lahore, Punjab, Pakistan · Hybrid

- Developed a custom component library on top of Ant Design, published internally on AWS and used across all projects
- Established reusable CI/CD workflows linked to all projects, streamlining deployment processes
- Enabled Micro Frontend architecture using Webpack Module Federation for modular, scalable development
- Established backend service communication with gRPC to enhance inter-service connectivity
- Developed a token exchange mechanism to ensure persistent user information across services
- Integrated OWASP checks in CI/CD pipelines for vulnerability scanning and security compliance
- Optimized bundle size by configuring chunk splits in Webpack, reducing load times
- Integrated GraphQL Codegen with Tanstack React Query for efficient data management
- Implemented WebSocket for real-time data updates in the application
- Maintained 80% test coverage across both frontend and backend projects

Stack: React.js, Next.js, Nest.js, Express.js, TypeScript, GraphQL, Apollo GraphQL, gRPC, Microservices, Webpack, Vite, Rollup, Tailwind CSS, Ant Design, MySQL, AWS, CI/CD, Keycloak, Jest, Playwright, k6 Load Testing, Redux

### MedLucy

Product · Startup. https://www.medlucy.com/en-lu

- Role: Software Engineer, Contract, 3 yrs, Remote · Zürich, Switzerland

- Partnered with the founder from idea stage to build MedLucy, a cross-platform desktop application for doctors
- Owned architecture, development, and technical decision-making across the product lifecycle
- Built the desktop app end-to-end with Electron, React, Redux, and Tailwind CSS
- Contributed to product direction, project structure, and engineering management beyond pure development
- Traveled to Luxembourg to meet end-user doctors on-site for discovery and validation sessions
- Helped position the product for an integration with one of Luxembourg's major healthcare software providers

Stack: Electron.js, React.js, Redux, Tailwind CSS, TypeScript, Desktop Application Development, Product Architecture, Client Communication

### Metal

Product · Startup. https://www.metal.so/

- Role: Software Engineer, Contract, 3 mos, Remote

- Built and maintained frontend features using Next.js and React, delivering responsive and high-performance UI experiences
- Developed Metal Academy with Strapi as a headless CMS and integrated it into the main Metal application
- Utilized shadcn/ui components for modern, accessible UI design and faster component development
- Collaborated with backend teams working in NestJS to ensure seamless API integration and data flow
- Followed scalable architecture principles and best practices for maintainable frontend codebases

Stack: React.js, Next.js, JavaScript, Strapi, shadcn/ui, NestJS, Front-End Design, Web Application Development

### YieldWerx

Product. https://yieldwerx.com/

- Role: Technical Lead, Full-time, 1 yr+, Remote

- Leading frontend and full stack development for semiconductor yield analytics platform
- Collaborating with .NET backend teams to ensure seamless integration across the stack
- Building data-rich dashboards and visualizations for semiconductor test data analytics
- Driving technical decisions on architecture, tooling, and development best practices
- Working with predictive AI analytics features to help customers optimize product yields

Stack: React.js, Next.js, TypeScript, JavaScript, Node.js, .NET, Technical Leadership, Architecture Design, REST APIs, Data Visualization, CI/CD, AWS

### Bykea

Product. https://bykea.com/

- Role: Software Engineer, Full-time, Nov 2021 - Aug 2022, Lahore, Punjab, Pakistan · On-site

- Led frontend development for admin portals and Bykea app PWA
- Optimized PWA load time from 12 seconds to 3 seconds, enhancing user experience
- Communicated directly with the CEO and Product teams to gather and clarify requirements
- Improved code quality by integrating TypeScript and minimizing the use of any types
- Added skeleton loading for a smoother user experience during load times
- Integrated an Event Bus for communication between PWA, iOS and Android apps
- Integrated Redux Toolkit for global state management

Stack: React.js, Next.js, TypeScript, Angular, Nest.js, Express.js, Fastify.js, PWA, Ant Design, MySQL, Redux Toolkit

### Nextbridge Ltd.

Agency. https://nextbridge.com/

- Role: Software Engineer, Full-time, Jun 2021 - Nov 2021, On-site
- Role: Associate Software Engineer, Full-time, Dec 2019 - Jun 2021, Lahore, Punjab, Pakistan
- Role: Trainee Software Engineer, Full-time, Oct 2019 - Dec 2019, Lahore, Punjab, Pakistan

- Delivered 12 projects successfully in the span of 2 years
- Developed multiple ERP modules including Inventory, Purchase, Sales, and Scheduling
- Led frontend development across multiple projects, overseeing code quality and PR reviews
- Engaged in direct client communication for requirements gathering and project updates
- Designed scalable systems and application architecture

Stack: JavaScript, React.js, Angular, Vue.js, Node.js, Express, RxJS, Redux, SCSS, Requirements Analysis, Software Design, Software Infrastructure

## Certifications

- AWS Certified Security – Specialty, Amazon Web Services (AWS). Issued May 2026, expires May 2029.
- AWS Certified Developer – Associate, Amazon Web Services (AWS). Issued Nov 2024, expires Nov 2027.

## Recommendations

> I worked with Farhan on my product, and honestly, he became a core part of the team very quickly.
>
> He helped a lot not just with development, but also with thinking through the project, structure, and management. He has very strong analytical skills and is very good at solving problems in a practical way.
>
> What I appreciated most is that he is always available. Really, 24/7. He never missed a call, and whenever something came up, doesn't matter if it was in his stack or not, he always gave a solid opinion. He became my go-to person for basically everything.
>
> I came to him with just an idea, to build a desktop application for doctors called MedLucy. Now we are working with one of the major software providers in Luxembourg, which says a lot.
>
> He even traveled to Luxembourg to meet me and the doctors in person. That was really impressive and showed his dedication.
>
> Farhan thinks long-term and doesn't just do quick fixes. He wants things to work properly and grow.
>
> Overall, very reliable guy, easy to work with, and someone you can trust with your product. I can definitely recommend him.

Gjergj Subashi, Founder @MedLucy | Zürich, Switzerland. Worked with Farhan on MedLucy, July 2025.

> I've had the pleasure of working with Farhan for almost two years, and during this time, I've seen firsthand the value he brings to the team. As the Technical Product Owner on our project, I work closely with him not only on the technical side but also in planning and aligning sprint goals.
>
> Farhan's technical expertise truly stands out; his attention to detail in implementation and the thoughtfulness of his suggestions make a real difference in the quality of our product. He's reliable, professional, and consistently shows up for the team.
>
> In a short time, he became an expert in Figma plugin development, leading our Mercedes-Benz project with confidence and becoming a go-to person for similar initiatives across the company.
>
> What sets Farhan apart even further is his strong communication and emotional intelligence, skills that are invaluable in any team environment today.
>
> Highly recommended!

Enxhi Leba, Technical PO | Azure Cloud Architect | Founder | DevOps. Managed Farhan directly, November 2025.

> Farhan is super proactive and creative! He always tries to find the best solution for any given problem and has a great feel for UX and Usability. It's a pleasure working with Farhan and I will miss it a lot when the project is over.

Evelyn Junker, Product Owner for UI Tooling. Worked with Farhan at a different company, August 2025.

> Farhan is a very valuable member of the project. He always provides valuable input and he does a very good job when it comes to frontend technologies. Always responsible and delivering at high pace.

Radu Aramă, Software Engineer | Java. Worked with Farhan on the same team, July 2025.

## Frequently asked questions

### How long does a typical engagement take?

It depends on the package. An AI-to-Production Sprint usually runs 6 to 8 weeks. A Product Build from idea to launch is 3 to 6 months. Modernization audits deliver a plan in 2 weeks, with hands-on work scoped separately. Fractional Tech Lead is ongoing, typically 1 to 2 days per week.

### Do you charge fixed-price or hourly?

I prefer fixed-price or fixed-day-rate per sprint so there's no clock-watching on either side. After a free discovery call I send a written scope with the price, deliverables, and timeline. You know exactly what you're getting before you commit.

### Can we start with a small piece of work?

Absolutely. A short technical audit or a two-week architecture review is a common way to work together before committing to a longer engagement. It's also how I get comfortable with your codebase.

### What timezones do you work in?

I'm based in Leipzig, Germany (CET/CEST). I have overlap with European, UK, and East Coast US hours. For Asia-Pacific, we can usually find 2–3 hours of overlap per day. Fully async work is fine too.

### Not just you, right? Can this scale?

Correct, it's not just me. Small projects I ship solo with no handoffs. For bigger scopes I plug into a global network of senior engineers and vetted software houses (frontend, backend, mobile, design, QA) I've worked with across Europe, the UK, Canada, and Pakistan. If your project outgrows one person, I connect you directly to the right team. No agency markup, no reselling. You always know who's on your project and why. See the Network section below for the kind of partners I can bring in.

### What if my project isn't AI-related?

AI-to-production is the featured engagement, but most of my work is classic web and desktop product building. React, Next.js, Electron, Node. If your project is any of those, the process is the same.

## Writing

### What breaks when you take an AI prototype to production

Published 2026-04-13. https://farhanmalhi.com/blog/what-breaks-taking-ai-to-production

Most AI prototypes work beautifully in a demo and break spectacularly the moment real users touch them. The gap between "it works on the founder's laptop" and "it works for 10,000 customers on a Tuesday morning" is wider than teams expect and the bugs that live in that gap are almost never about the model.

After shipping LLM-backed products for Mercedes Benz, MedLucy, and several founders you haven't heard of yet, I keep seeing the same five failure modes.

#### 1. The model is deterministic in demos, non-deterministic in prod

Your demo ran the same prompt ten times and got ten believable answers. In production, that same prompt hits a rate-limited upstream at 3am and returns an HTTP 429, an empty completion, a refusal, or a partial JSON blob the parser can't handle. The "agent" collapses.

The fix is not retries. The fix is treating every model call as a flaky RPC: structured output schemas, explicit fallbacks, typed error boundaries, and a circuit breaker so a blip in OpenAI doesn't cascade into a site-wide outage.

#### 2. Nobody tracks cost until the bill arrives

A single power user sending ten thousand tokens a day is rounding error in testing and a serious margin problem at scale. Without per-request cost tracking logged alongside the request, you can't tell whether your feature is profitable, whether a new prompt regressed unit economics, or whether a specific customer needs a rate limit.

Log `input_tokens`, `output_tokens`, and `model` on every call. Aggregate by user and by route. You'll find at least one surprise within a week.

#### 3. Prompts ship with the code, but nobody can version them

Someone tweaks a system prompt. Quality drops across the whole product. There's no rollback, no A/B, no way to see what the prompt looked like yesterday. The prompt is a config value disguised as a string literal.

Store prompts in a dedicated module, git-history them like code, and add a logging hook that emits the prompt hash alongside each completion. Now when quality regresses, you can diff the two hashes.

#### 4. Observability stops at the HTTP boundary

Traditional APM tells you a request took 4.2 seconds. It does not tell you that 3.9 of those seconds were spent waiting on a re-rank call that could have been cached, or that the model picked the wrong tool and silently looped twice before giving up.

You need traces that follow the request *inside* the agent: each model call, each tool invocation, each retrieval, each retry. OpenTelemetry works fine for this wire it up before you ship, not after your first production fire.

#### 5. Evals are a launch blocker, not a release gate

Teams sink weeks into a golden-dataset eval suite before launch, then never run it again. Six months later the product has drifted badly and nobody can say by how much.

Evals should run in CI on every PR that touches a prompt, a model, or a pipeline step. Even a 50-case suite that takes two minutes in CI catches the worst regressions before they ship.

#### What to do this week

If you're in the middle of this transition, the highest-leverage work is usually:

- **Wrap your model calls in a typed client** with schemas, fallbacks, and cost logging. One afternoon.
- **Add OpenTelemetry traces** to your agent loop. One day.
- **Write ten eval cases** that capture your product's core promise, and run them in CI. One week.

None of this is exotic. It's the same discipline we apply to any third-party API it just hasn't caught up culturally to how LLM features are built.

If you're stuck turning a working prototype into something your team can actually operate, this is the exact engagement I help founders and product teams run. You can see how I work in my [AI-to-Production Sprint](/services/ai-to-production-sprint), or [reach out](/#contact) and we'll talk specifics.

### Fractional tech lead vs full-time CTO: the break-even math

Published 2026-04-10. https://farhanmalhi.com/blog/fractional-tech-lead-vs-full-time-cto

Every founder I've worked with asks the same question at some point: "At what stage do I stop paying a fractional engineer and hire a full-time CTO?"

It's almost always framed as a seniority question "am I big enough to warrant one?" when it's really a **utilization** question. You're not asking whether you *need* a CTO. You're asking whether you need one *full-time*, which is an entirely different conversation.

Here's the framework I actually use when founders ask me this.

#### The two things a CTO does

Strip away the job title and the work splits cleanly in two:

**Async work.** Architecture decisions. Code review. Hiring engineers. Vendor selection. Long-term roadmap. These are high-leverage activities but they don't require same-day turnaround, and the person doing them doesn't need to be in every standup.

**Synchronous work.** Pairing with engineers on hard problems. Representing the team in board meetings. Investor diligence calls. Firefighting production. Recruiting top-of-funnel founder-style. These *do* require same-day presence, relationships built over time, and contextual memory.

A full-time CTO does both. A fractional tech lead does only the first. Once you know that, the "which one do I need" question becomes "how much synchronous work is on your plate?"

#### The break-even math

For most seed-stage companies I see, the async work fills roughly **one to two days per week**. That's architecture + review + hiring help + vendor conversations. If you're spending more than that on the synchronous side pairing, firefighting, investor meetings you're past the break-even.

Concretely, a rough rule of thumb:

| Engineering team size | Synchronous hours/week | What you actually need |
|-----------------------|------------------------|------------------------|
| 0–2 engineers | Under 8h | Fractional tech lead |
| 3–5 engineers | 8–20h | Fractional going wide, or full-time junior VPE |
| 6+ engineers | 20h or more | Full-time CTO or VPE |

The single strongest signal that you've outgrown a fractional arrangement isn't team size it's **how often you wish your tech lead was in the room**. If the answer is "weekly," you're fine. If it's "daily," start the CTO search.

#### What you're actually buying

Hiring a CTO too early is one of the most common mistakes I watch founders make, and it's expensive in a way they don't realize until six months in. Here's what the decision looks like when you write it out:

**Full-time CTO:** 250k–400k total comp (cash + equity), 9–12 weeks to hire at minimum, 2–3 months to fully ramp, and you've just committed ~20% of your remaining runway to one person. If they're wrong, you've lost 6–9 months.

**Fractional tech lead:** a known day-rate for a known engagement window, typically 1–2 days per week. No ramp (they've seen your stack before), no equity, and the relationship ends when you've grown past it. If they're wrong, you've lost a month.

The math almost always favors fractional until one of two things happens:
1. Your synchronous workload consistently exceeds half-time
2. You're raising a round where investor diligence explicitly requires a full-time technical cofounder

#### The failure mode that's actually dangerous

The failure mode isn't hiring a CTO too early. It's hiring one who matches *where you were* instead of *where you're going*.

Founders interview for the person who would have fixed last quarter's problems "we need someone senior because we made a bad architecture call" and end up with a CTO who's allergic to the shipping velocity that got them there. Six months later the founder is frustrated, the CTO is frustrated, and everyone's hiring consultants to mediate.

A fractional engagement is a cheap way to *test* what kind of full-time leader you actually need before you commit. I've had several engagements end with me helping the founder write the CTO job spec, because by that point we both know exactly what shape of human the team needs next.

#### What this looks like in practice

I run fractional tech lead engagements for early-stage companies roughly the way a principal engineer runs their week a day or two of focused technical work, a standing hour with the founder, async reviews of everything material, on-call for the genuinely urgent stuff.

If you're trying to figure out whether you're past the break-even point, or whether a fractional arrangement would buy you time before committing to a full-time hire, [book a discovery call](/#contact). Half the people I talk to end up in a fractional engagement; the other half leave with a sharper picture of the CTO they actually need to go find.

### How I'd untangle a brittle codebase in 30 days

Published 2026-04-07. https://farhanmalhi.com/blog/untangle-a-brittle-codebase-in-30-days

Every company I've modernized has the same story: "the original team moved fast, we shipped the thing, and now every change takes three times longer than it used to." By the time I'm brought in, the team has usually been asking for a rewrite for six months and leadership has been refusing for six months, and both sides are right.

A rewrite is almost always the wrong answer. What you actually need is **a plan sequenced by risk**, where the most painful parts of the codebase become the most decoupled parts in that order, not the other way around.

Here's the plan I follow. Times quoted are for a team of 3–5 engineers on a codebase that's been around 2–4 years.

#### Week one measure, don't guess

The first mistake everyone makes is refactoring the parts of the codebase the engineers *complain* about, rather than the parts that are actually slowing things down. These overlap surprisingly little.

Spend the first week instrumenting:

- **Change failure rate per directory.** `git log --name-only` + deploy failure data. The directories that appear in the most post-mortems are your real hotspots.
- **Build + test timing.** Split the test suite into groups and measure each. Almost always, 10% of the tests take 80% of the time, and they cluster around one subsystem usually the one nobody wants to touch.
- **Lead time to change.** From PR opened to PR merged. A single heatmap grouped by file path tells you where review gets stuck.

You're looking for overlap. The directory that's in the most post-mortems AND has the slowest tests AND the longest PR cycle times is the one you fix first. Not the one the loudest engineer keeps filing bugs against.

#### Week two stop the bleeding

Before refactoring anything, you cap the damage. This means:

- **A linting + formatting baseline enforced in CI.** Not what the team *should* use what they *actually* use today, codified so new commits can't drift further.
- **A "boy scout" rule for the hotspot directory.** Every PR that touches it must leave it a notch cleaner. Add a test. Rename a variable. Extract one helper. The only firm rule is: no PR increases complexity.
- **One integration test covering the critical path.** Not unit tests, not a full suite just one end-to-end test that exercises the happy path of whatever business flow the company lives on. This test is your safety net for everything that follows.

Week two is boring. It's also the week that determines whether the refactor succeeds, because from here on you're making structural changes and you need a way to know they haven't broken anything.

#### Week three extract the hotspot

Now the technical work. The goal isn't to rewrite the hotspot. The goal is to **put a boundary around it** so the rest of the codebase stops touching its internals.

Practical moves:

- Move the hotspot behind an interface. If it's a class, introduce a factory. If it's a service, introduce a facade. Anywhere the rest of the code reaches into its internals, redirect through the boundary.
- Once the boundary is in place, the internals can be refactored freely. Nothing outside knows.
- Delete dead code. Every mature codebase has 15–30% dead code; the subsystem you just put a boundary around is the easiest place to find it, because callers are now explicit.

This week usually produces a 20–30% reduction in the hotspot's cyclomatic complexity without changing any observable behavior. It's not a rewrite it's a dam.

#### Week four ship a user-visible win

The last week is the most important, and it's the one technical leaders most often skip. **Turn the refactor into a product win.**

Pick one thing a page load time, an API latency, a flaky feature, a slow background job and make it measurably better as a direct consequence of the refactor. Announce it internally. Show the graph.

Two things happen:

1. The business stops seeing refactoring as a cost center. They now have evidence that this work produces customer-visible outcomes.
2. The team stops seeing refactoring as risky. They now have a template instrument, boundary, extract, ship that they can apply to the next hotspot on their own.

By day 30 you don't have a rewritten codebase. You have a codebase with one meaningfully better subsystem, a working safety net, a measurement baseline, and a team that believes change is possible. That's worth more than any rewrite you could have started.

#### The next 60 days

Most engagements like this run past the first month, but they run differently. Weeks 5–12 look like a series of repeats of the same playbook on the next-worst hotspot, the next-worst, the next-worst each one costing less than the last because the boundaries from previous rounds compound.

By month three, the codebase hasn't been rewritten. It's just become a codebase where change is cheap again. Which is what leadership actually wanted all along.

If this sounds like the codebase you're currently stuck in, my [Modernization & Tech Audit](/services/modernization-audit) engagement is the packaged version of the above. Or [start a conversation](/#contact) if you'd rather talk through the specifics first.

### From idea to shipped product: what founders get wrong in month one

Published 2026-04-04. https://farhanmalhi.com/blog/founders-first-month-product-build-mistakes

Every product I've built with a founder has had the same inflection point: somewhere around week four, you discover which of the decisions you made in week one were load-bearing and which ones weren't. The load-bearing ones if wrong cost you months. The ones that weren't are the ones the founder usually agonized over.

After about a dozen of these engagements, the pattern is depressingly consistent. Four decisions matter, and founders tend to treat each of them the opposite of how they should.

#### 1. Over-investing in architecture, under-investing in distribution

Founders, especially technical ones, spend the first two weeks making decisions about frameworks, database choice, microservices vs monolith, serverless vs not. They spend the same two weeks making zero decisions about how anyone will ever find this product.

The asymmetry is brutal. The architecture choice affects engineering velocity for maybe six months. The distribution choice affects the *existence of the company* for the next two years. And architecture is a genuinely reversible decision a monolith can be broken up, a database can be migrated while distribution is almost pure path dependence. The first 100 customers determine the shape of the next 10,000.

What to actually do in week one: decide how the first 10 customers will hear about this product. Not *vaguely* concretely, with a list of names. If you can't list them, you don't have a product yet, you have an engineering project.

#### 2. Hiring the team before the product shape is stable

The second common mistake: founders hire a second engineer, then a designer, then another engineer, before the product has its first 20 real users. The cost isn't just cash it's that every person added to the team in this phase becomes an opinion-holder on design decisions that should be purely discovery-driven.

In the first month, the product shape changes weekly. A solo builder (or a founder + one consultant) can pivot in a day. A three-person team needs a meeting. A five-person team needs a *retro*. You have compressed the one thing you need to be doing fast into something you can only do slowly.

What to actually do: stay as small as you can for as long as you can. My founders usually run at one engineer + one founder-as-PM for at least the first two months of actual user-facing iteration. Hire the second engineer once the product shape has stopped changing weekly.

#### 3. Treating "MVP" as a destination

"MVP" is the most abused acronym in software. Founders use it to mean "the smallest version of my complete vision" when it actually means "the minimum experiment that tells me whether my hypothesis is correct."

In practice this means the MVP you should build is often *ugly*, *narrow*, and *partially manual*. It does one workflow end-to-end for one kind of user. It breaks in predictable ways that you hand-fix. It's meant to produce a signal, not to be shipped to the whole market.

What to actually do: define the MVP by the question it answers, not the feature list it contains. "Can we get a doctor to import a patient record, generate a referral letter, and send it in under two minutes?" is a better MVP spec than "build a patient management system." The first answers a question; the second runs for 18 months.

#### 4. Ignoring the handoff from day one

Technical founders frequently build the MVP themselves, hand it to a contractor, and then wonder why the contractor takes three months to be productive. The reason is almost never the contractor it's that the founder shipped a codebase with no tests, no docs, no deployment story, and implicit conventions that only exist in the founder's head.

The moment the product leaves one person's hands is the single biggest compounding risk in a first-month build. And it's entirely preventable.

What to actually do: from day one, write code as if the next person to touch it starts next week. That means a README that a stranger can run, a CI that makes broken builds visible, and a deploy process that requires one command. Not because you need it yet because six weeks from now, you *will* need it, and if it doesn't exist, you'll spend two weeks pretending not to notice and then three weeks building it in a panic.

#### The compounding effect

None of these decisions are individually fatal. A founder who gets three out of four right and the fourth wrong usually recovers the cost is measured in weeks, not death.

The problem is that the four mistakes *compound*. The founder who over-invests in architecture, hires too early, treats MVP as a destination, AND doesn't plan for handoff is the founder whose "three-month launch" becomes the nine-month launch that everyone is too polite to call a failed project.

Which is why the first month matters so much. Not because the work you do in month one is the most important work it isn't but because the decisions you make in month one shape every decision that comes after.

#### What this looks like when it goes right

The founders I've shipped with fastest had one thing in common: they treated the first month as discovery, not construction. The product got built, of course, but it got built in the margins around decisions about users, positioning, and distribution. The architecture was whatever would hold together for six months. The team was whoever could be fired Friday and the company would still exist Monday. The MVP was a question, not a feature list.

That's the shape of a good first month. Not perfect, not impressive, but *cheap to be wrong about*.

If you're at the start of a build and trying to figure out which decisions are load-bearing, my [Product Build engagement](/services/product-build) is the packaged version of running through this together. Or [send me a note](/#contact) and we'll talk through where you are.

## Sitemap

- [Home](https://farhanmalhi.com/index.md)
- [Services](https://farhanmalhi.com/services.md)
- [Projects](https://farhanmalhi.com/projects.md)
- [Experience](https://farhanmalhi.com/experience.md)
- [Writing](https://farhanmalhi.com/blog.md)
- [About](https://farhanmalhi.com/about)
- [Contact](https://farhanmalhi.com/contact)
- [All pages](https://farhanmalhi.com/sitemap.md)
- [Site index for LLMs](https://farhanmalhi.com/llms.txt)
