How I built my first AI startup

Startups
·
October 2, 2024
·
8 MIN READ
Artem Shelamanov
·
Chief Technology Officer, Yazero

First, a few words about me: I am a Data Scientist with 2+ years of commercial experience and 5+ years in coding with Python. I mostly work with backend and AI. I never built whole projects by myself, but instead I was usually given tasks.

But after some time I started feeling like I had enough knowledge to try to build something of my own. And then I built it. In contrast to my expectations, it wasn’t extremely hard. Even more, with my co-founder we built it in just 1 month, and it already reached some profit and 1000+ visits without any paid ads.

Now — why would you want to build a startup (if you don’t already)?

There isn’t a single course or project that taught me that much. When you complete a course, you learn some particular skill. But when you work on the product as a whole, you start to understand the whole development cycle — from design to building to deployment. I polished my existing skills, I learned new ones, and I started to understand how the frontend and the backend actually interact (and how you as a Python developer can write better APIs that are easier to use for your Frontend colleague).

Another reason is a great addition to your resume. Not only the time you worked on your startup counts as commercial working experience (contrary to pet projects), but it also looks great in portfolio (especially if it’s a website that can be visited by some HR).

Finally, the last and the main reason — money. If your startup is a SaaS (Software as a Service), you can technically think of it as a passive income source. And when you built multiple small SaaS websites, you gain more speed, professionalism and experience — meaning, it takes very little time to build a new product that will make more money.

In this article, I’ll describe my experience building my startup and share some actionable tips and advices.

Finding ideas

Different published ideas that our users came up with.

You may have an idea of your product. You may not. Or you may have hundreds of ideas. Brainstorming is a creative process, so there isn’t really a standardized process on generating new ideas.

There is, however, such a process for validating your ideas:

  • Check related markets. Do you want to build a website for renting books? Check market sizes for books, renting services, find amount of books sold last year, and so on. If you see that some of those markets are declining lately, this may be a problem. The books, for example, are getting less and less popular with appearance of e-books, book apps and so on.
  • Check your competitors. If there are many competitors, you have to make sure your solution is at least 5x-10x times better. If there are few competitors, it’s still a good sign — it means you can learn on these products, see if they are profitable, see if there is a market fit. However, if there are no competitors — situation is complicated. It may be because your idea is so novel, nobody thought of it yet. OR, it may be that your idea is so-called “tarpit” idea — many people tried to build it, but no one succeeded. In this case, you have to run away from this idea as far as possible.
  • Analyze your customers and problem you are solving. What’s your target audience? How much are they willing to pay? How often does this problem occur? Can it be avoided?

And now is the perfect moment to introduce my startup — Yazero. We help with the validation process by using AI, web scraping, multiple different APIs and quantifiable feedback.

One more advice when looking for ideas — try to use your “personal advantage”. Do you have a degree in some specific field like Physics? Try to use your knowledge from there. Do you have a friend in the law firm? Try to ask him what problems he has, how can you help/optimize some process, and so on.

Finding Co-Founder

Photo of me (right) and my co-founder (left)

Do you have some part of the startup that you don’t want to do (like marketing, or frontend, or sales)? The best solution is finding a co-founder — not only they will be more experienced in this field, but they also will be willing to work on it. Building your own product should be interesting and fun for you personally, so if there is a part you don’t like, try to delegate it.

Another reason to find a co-founder is additional validation. They will always help you to not get too deep in love with your ideas that may not be that good, they will always provide the feedback for the product, and finally — they are as interested in building as you are. This means that you can get your startup running 2x faster and better, and sometimes even more.

For example, if you don’t have experience in frontend, learning a new framework may be really daunting. Not only it will take you a lot of time, but also it will take your most precious resource — motivation. But then, if you delegate it to your co-founder who has more experience, they will finish it in no time, deliver a higher-quality result, and you would be able to focus on stuff that is interesting for you.

You can find your first co-founder on the platforms like YCombinator co-founder matching platform. I found my co-founder there, and I’m very happy about that decision.

Also, some collaboration tools — in our workflow, we use Todoist for assigning tasks and tracking progress, Github for versioning and automated deployment, and Figma for design and concept brainstorming.

Our Figma early concept designs

Frontend

Finally, we start with the technical part.

Main advice for frontend (if you decided to implement it by yourself) is using the framework you know. Even if it’s outdated, or all the other developers hate it, if you know it, use it. What matters is getting your solution to the end user. If it works for them, it works for you.

There is an often-ocurring problem amongst the novice frontend developers — they always try to follow the latest trend, use the “best” frameworks some popular youtuber recommends, and in the end they re-learn everything on every new project.

It’s a lot better to keep using the framework you know and polish your skills in using it. This way you will know how to fix your bugs, you will develop faster, and you will have some templates to start next time.

Some examples of websites created with Solara — a Python frontend library

For deployment, there are two ways:

  • Using some existing solutions like Vercel, Netlify and AWS Amplify. This is the easiest option, especially if you use some popular frameworks like NextJS and React. The downside is, however, that most of these solutions don’t offer you a free deployment for commercial use — for example in Vercel you would have to pay 20$. AWS Amplify has a free commercial plan, but it also has a cold start (if your website isn’t visited by users often enough, it will take ~4 seconds to load at the next visit).
  • Using your self-hosted solution with providers like Hetzner, AWS, Google Cloud, etc. From one side, there are often no free tiers. From the other side, the cheapest solution is often very cheap. For example, on Hetzner you can get a 2-VCPU 4GB RAM private server for just 5€ (and this is usually enough for any Backend/Frontend hosting with less than 100 concurrent users/not computationally extensive websites). Using self-hosted solutions also gives you a lot more control and transparency over your app. Another advantage of self-hosted solution is that you learn how to set up DNS, SSL, Docker and other things, which is a huge boost to your resume and skillset.

Backend

I will be more detailed in this part, as I mostly work on the backend part in our startup.

Sometimes, a question arises — why do you need backend at all? Why can’t you do everything on the user side?

The answer is better security, observability, more control over your pipelines, better logging and ability to use bigger computational powers. If you are hosting a big ML model, sending it to the user and doing the computations on their side is often a bad idea. A better solution would be your private server with GPUs and an API for the Frontend to use.

Main tools I used for my startups backend are FastAPI with Pydantic, Gunicorn, Docker, Docker Compose and Nginx. I like Docker because it gives you an always-working solution, no matter the OS, environment and so on. It’s also really nice when you have multiple components of your app that have to be ran simultaneously — for example a database in parallel to your backend.

One important thing that you need in your backend is monitoring. I found two separate solutions for this goal — prometheus and FastAPI-analytics. They both give you a nice dashboard that you can use to see whether your API handles the requests successfully, what are the response times, what are most-used endpoints and so on.

FastAPI Analytics dashboard. Don’t mind the 88% success rate — I don’t have the icon on the backend, and on every visit it tries to get that icon using GET /static/favicon.ico, which results in failed request :D

Advantage of monitoring your backend is knowing if there is a problem/bug somewhere, or for example an indicator that you need to get a better server with more RAM/CPU power.

I usually deploy my solutions on VPS from Hetzner, as it’s the cheapest option.

Finally, there are many people that say that “Python is too slow/heavy to be used in production”, or something among those lines. This is not true in 99% of the times.

First of all, if your request takes 5 milliseconds to process instead of 1 millisecond, there is absolutely no difference for the user. But when you finish developing your solution in days instead of weeks, that is a huge advantage.

Second, most of the libraries are optimized well enough/use languages like Fortran/C/Rust under the hood, so in the end you get the same speed.

Finally, if you are building an AI app, and especially if you use LLMs, your response generations may take dozens of seconds (which is not dependent on the programming language, but on the computational power/APIs/other stuff). So, if your request takes 20 seconds, does it matter if some Python calculation takes 0.1 seconds?

Summary

In this article, we covered some main parts of building your own startup — why do you need it, how to find that one perfect idea, how to build Frontend and Backend, and how to put them into production.

Thank you for reading, and happy coding!

Originally published on Medium

Get essential startup news and insights — subscribe to the Tribume newsletter