Going from Zero to One with Cursor
Five half-hour videos of coding an MVP from scratch with Cursor AI.
Welcome to the Deep Medicine Digest! My name is Dr. Robert Toth and I run Theta Tech AI, a healthcare AI consulting firm. Click here to contact us about our professional consulting and AI services.
Has someone forwarded this article to you? Click here to subscribe to this newsletter for free and get AI content sent directly to your inbox:
Overview
In this article, we go on a video tour of coding with Cursor in the form of half hour narrated coding sessions by yours truly. The goal is to showcase how, in a half hour or less, you can go from a completely empty project with zero lines of coding to a fully functional piece of software purely using the AI tools in Cursor.
In this modern age of coding with AI, it helps to see real, live examples of ways they can be used. That’s the goal of these videos. These LLM’s contain immense intellectual leverage if used properly, and you should practice using them as much as possible to hone your skills. The engineer of tomorrow will code in English.
So without further ado, here are some videos of random projects built from scratch with Cursor.
(Click on each video below the screenshot image to load in YouTube.)
Video #1: (8 min)
Facial Detection Webcam Algorithm
In this video, I walk you through how to build a simple web app using Cursor that performs facial detection and tracking on a live webcam stream. I'll show you my coding process step-by-step, from setting up the app to debugging common issues like missing libraries and incorporating facial recognition using the Face API.
By the end of the 8 minutes, we end up with a web server running locally that turns on your webcam, shows the live video stream in a web page, automatically tracks all the faces, and shows an overlay of your facial feature vertices on the video stream.
Video #2: (33 min)
Market Research App
In this video, I use Cursor AI to build, from scratch, a python script that uses the OpenAI API and Perplexity API's to do live market research on a company. By the end of this video, I end up with a standalone script that takes in a company name and uses both Perplexity and OpenAI API’s to create an up-to-date market research report of that company.
Uses cases include:
Getting live alerts, with detailed summaries, when new information hits about a company, for investment purposes.
Staying up-to-date on corporate competitors.
Study and learn how a given industry works as an educational tool.
Automatically send Slack messages or emails summarizing information about other companies.
(One note: I was not using Perplexity’s proper “online” model, and so the information shown in the example output during the video is not actually live data. The model name must include the word “online” for Perplexity’s API to do an online search.)
Video #3: (26 min)
Deep Style Transfer Webapp
In this half hour video, I build, from scratch, a web app that takes in a picture and uses a neural network to transform that image in the style of famous artists. We allow the user to open a web browser tab, upload an image, and see that image as if painted by various artists. We use a GPU in the cloud and a deep learning model to perform the style transfer, and the results are generated in just a few seconds.
Video #4/5: (38 min)
Political News Aggregator with Perplexity & ChatGPT
In this video, I create a website that pulls in live political news topics (via Perplexity), parses them through conservative and liberal viewpoints (generating questions on the fly using GPT-4), performs further research on those topics from various perspectives, and spits out an aggregated summary of the day’s politics.
Imagine this could be used to automatically create a more objective, unbiased automatic political news newsletter or dashboard. Let people contribute various perspectives beyond stereotypical conservative and liberal, perhaps crowdsourcing new perspectives to feed into the LLM’s. Weaving ChatGPT’s API with Perplexity’s API unlocks many possibilities for SAAS apps.
(Video was pre-recorded in October 2024)
Video #5/5: (34 min)
Writing Improver AI
In this 30 minute video, I use Cursor and the OpenAI API to build a webapp that inputs some long text such as paper or blog post or article, and then runs it through a various different prompts to both improve and critique the text. This time, I take the approach of writing out my code generation prompts in a file that I keep adding to as I build. This allows Cursor to have a running context of how the app has been built, layer by layer.
The final result is an automatic tool for writers to help them restructure and improve their writing. The only limits to a tool like this is the imagination of the prompt engineer! These panels didn’t necessarily have to be “condense”, or “reorganize”, or “critique” the input text. Rather, individual writers could craft their own customized prompts that they automatically feed all their writing drafts though. Endless possibilities.
(Aside: Click here for the ChatGPT prompt I devised for the critique perspective. Run your own writings through it and see what it says! You might as well get the AI to give you the unfiltered truth before your readers do…)
Closing Remarks
I hope this was helpful! These videos were recorded before the new “agent” feature in Compose came out, so future videos will include new techniques for coding with modern AI tools.
I will post more coding videos on my YouTube channel:
Here is the code for the above five videos (Apache 2.0 License):
Happy coding!
Thank you for reading this article from The Deep Medicine Digest by Robert Toth, Ph.D.! Please forward this email to your friends and colleagues that may enjoy the content, or click the share button below!