Showing posts with label AI. Show all posts
Showing posts with label AI. Show all posts

Monday, August 3, 2026

Cloning an app with AI

I had been using the Android app CloudPlayer to play my MP3 files on my Google Drive. The app was missing some features I wanted, and I was also curious about how easy AI makes it to clone an app, and how much this could threaten the indie-hacker ecosystem.

The features I wanted were an icon indicating downloaded songs next to each track name, the ability to remove individual tracks from the cache, and information about how much storage space was used and how much remained. So I decided to create DriveMP3 entirely with AI assistance:
I started by asking Gemini to create a specification based on CloudPlayer. I then asked Claude Code to create a version plan based on the specification. Implementing the app in versions helps me think more clearly about subsequent versions and allows the AI to use its context window more efficiently. It is similar to partitioning a system into modules. The initial version would only connect to Google Drive and display the MP3 files stored there. Then I asked Claude to implement each version. It managed to one-shot each version with only making small mistakes once or twice. After verifying that each version worked as expected, I asked Claude to implement the next one. I did not edit any of the generated Kotlin code. 

Each version took Claude about 15 minutes to implement and consumed roughly $13 worth of API tokens on average. The total API cost was $93. This is much more expensive than the cost of CloudPlayer (free with ads, $15 without ads), especially when you also count the two days I personally spent for design and testing.

Note that API tokens are the most expensive way to use Claude Code. The advantage of API credits is that they remain valid for one year. If you are using Claude for less than one app a month, API tokens are the way to go. If you are using it to create more apps, the other pricing plans will be cheaper.

AI-assisted cloning creates three potential threats for app developers: 
  1. Users who build personal alternatives.
  2. Hobbyists who clone a few apps each year for personal use and release their versions as open source (I am an example of that). 
  3. Businesses that systematically identify promising apps, reproduce their visible functionality, and compete through stronger distribution and marketing.
In this experiment, cloning the app cost more than $100 when the value of my own design and testing time was included. If your price is low enough that ordinary users will not bother searching for an open-source alternative, hobbyist clones may have little effect on your sales. Note that I am talking about a one time payment here, if you are using a subscription model, the incentives for cloning increase.

However, an app cloning business can use the $200/month plan to create an app every couple of days. Note that it also takes time to publish an app on Google Play. Let's assume the time they spent makes the total $300/app. If they market the clone effectively (which can cost an additional couple thousand dollars) and provide a comparable user experience, they may capture your potential customers. If your app is easy to clone, you might only be able to make money from it until it becomes popular and appears on the radar of cloning shops.

What can you do to make cloning harder? An AI can only clone what it can see (the client side) or what is easily predictable (standard business logic). Apps like CloudPlayer fall into this category. To build a defensible moat against AI-assisted clones, you need to shift your value proposition away from surface-level features and toward capabilities that are deeply embedded and difficult to replicate. This means you have to be an expert in a field with complex workflows and compliance requirements and have domain specific data. If your app has a social component (e.g. Slack), if you get lots of users quickly, a copycat can clone the code in a week, but they cannot clone the teams already communicating on it.

The age of casual apps that can be sold through word of mouth has come to an end for indie hackers. Defensibility comes from better marketing, backend depth, proprietary data, network effects, distribution channels, and execution speed.

11.08.2026: Added loudness normalization, cost $15.19 in API tokens.

Saturday, October 19, 2024

Using UI with AI

If your web or mobile app has multiple user interface (UI) commands, (such as log in, register, search, show products, change user settings), users might struggle to know exactly where to click. The UI would be much more user-friendly if an AI could interpret user speech and convert it into commands that can be handled by the backend. Today’s AI is robust enough to map different phrases that mean the same thing to a single command. For example, a user might say "register" or "create a new account," and both can be mapped to the command "sign_up." The AI can understand both English and Turkish, for example "bana yeni bir kullanıcı oluştur" correctly maps to "sign_up". Here is a demo in Python:
When you use an API, such as OpenAI, the main disadvantage is that you must pay for every API call. Therefore, using voice commands to control the UI should be limited to paying customers, and there should be rate limits in place to keep costs under control. You might use open-source models like LLaMA to run the AI on your own server, but that would require better computational and memory resources than you currently have.

17.02.2025: Open source AI models like DeepSeek open the door to self hosted AI. You will need a powerful server with lots of RAM and GPU. The key will be maximizing GPU VRAM, as this is the primary bottleneck for running large models. For efficient inference, the entire model (or as much of it as possible) needs to reside in VRAM. Such servers might cost more than AI API calls if you use a cloud server. One solution might be to have your own physical server to run the AI model and use the cloud server for the web app, which makes API calls to the AI on your server. You will also need to host a speech to text model.

19.06.2025Desktop AI Compared

Tuesday, April 2, 2024

How I use chatGPT in my programming

Here are some examples of my programming prompts for chatGPT:
  1. Explain a concept that I am not familiar with: "What is .htaccess"
  2. Find the location of specific functionality in existing code: "Show file name and code snippet in bitcoin code for halving"
  3. Improve existing code: "Improve the following SQL query...", "Make the following code shorter/simpler..."
  4. Write code: "Display the Turkish Lira amount idiomatically in PHP 7.3"
  5. Translate concepts I know from Java/C++: "PHP 7.3 add an element to an array"
  6. Suggest unit tests for full coverage of a method/class.
Knowing algorithms and data structures and paying attention to performance has become much more important than memorizing implementation details because tools like chatGPT make it trivially easy to translate any algorithm to any programming language. Times have become harder for code monkeys and much better for software engineers.

Friday, January 12, 2024

Software complexity

The unpredictability of users is one of the key sources of software complexity. Since a web app is exposed to the entire internet, you have to consider numerous edge cases in addition to the nominal use case. People often underestimate the required effort because they typically consider only the app's normal use.

Consider the example of adding a commenting feature to an e-commerce site. The nominal case is the user writing a comment and submitting it. After admin approval, comment should be displayed on product page. Steps:
  1. User writes comment
  2. User presses submit button
  3. A message saying "comment will be visible after admin approval" is shown to user
  4. Comment is saved to database for admin approval
  5. Admin reviews and approves comment
  6. When product page is loaded, approved comments are shown
Additional considerations:
  • If the user is not logged in, they must login. If the user has no account, they must create an account. After login / account creation, they should be redirected back to same product page with "comment will be visible after admin approval" message. Do not show that message for normal product page loads.
  • After pressing submit button, user might want to edit or delete the comment.
  • Although admin approval prevents spam, a malicious user could still:
In addition to usability, performance, low resource usage and maintainability, these details make up most of software engineering work.