📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

I Used AI To COPY This $1.2M/mo App (STEP BY STEP)

Mikey No Code37:10

Transcription

I used AI to copy this $1.2 million a month app. Now, step by step, I'll guide you on how to copy a $1.2 million a month app from scratch using only one AI tool. I'm going to show you exactly how to copy and build any app without a single line of code.

Now, this is just not any video. Besides showing you how to build the entire app, I'm also going to be showing you how to connect it to a database, create user authentication, and even connect it to Stripe so you can start right away with making some money—a lot more than just some money. I've tested many tools over the last couple of months, and this AI tool is the easiest and the fastest way to create an app if you've never done so before. This tool is essentially a ChatGPT specialized in coding. You can ask it to build anything, and if something just happens to go wrong and it isn't working, you can simply ask it to solve the error, and it will be resolved—all without you having to need any knowledge of coding.

So, in this video, you will see exactly how to build your own AI-powered calorie tracking app similar to Calii, which makes over $1.2 million every month. And what makes this app powerful? This AI-powered app simplifies calorie tracking. All you got to do is snap a photo of your meal or scan a barcode, and Cal AI instantly calculates calories and nutrients. So this app works by taking a picture of your food and then estimating its nutritional details like calories, protein, carbs, and fat in your meal. Beyond that, it helps users also to track daily macros and then visualize the data through a calendar.

So now we're going to replicate these functionalities step by step using Replit. As we all know, Replit is one of the best platforms today that gives us all the tools we need in order to not only create but also launch an app. So in this video, I'll guide you through every single part of the process. But we're not just copying their model; we're going to improve it, make it a little bit more intuitive, make it more accessible, making it just a little, a little bit better.

So let's start by going to the Replit homepage, which you'll see after purchasing a Replit subscription and giving you access here to the Replit agent. "What do you want to build today?" it asks. So here we can describe the app that we want to create. So let's say, "Let's build an AI-powered calorie tracker app that allows users to easily log their meals. The app will enable users to take a picture or upload an image of the food. This image will then be processed using ChatGPT 4, which will analyze the meal and provide a description along with key macronutrient information. Specifically, the AI will return details on the estimated calories, protein, fat, and carbohydrate content of the meal."

Now here, you can see it says, "I'll help you create an AI-powered calorie tracker that uses ChatGPT 4 Vision to analyze food images and provide additional information. The MVP will focus on core image analysis and nutritional display features." Now here, though, I notice an error, and that it's using the wrong OpenAI model. As you can see right now, it's using the ChatGPT 4 Vision preview, and that model no longer exists. So I need to update it here to the correct model, ChatGPT 4, to ensure everything runs smoothly. This updated model is multimodal, meaning it can handle both text and image inputs effectively. It is a better fit for this use case that we've got going on, providing accurate and efficient analysis of food images along with, of course, macronutrient estimations. So I'm going to type, "The ChatGPT 4 Vision preview is deprecated; use the ChatGPT 4 model instead." Then we'll hit submit. And okay. So now it says, "I've updated the plan to use the ChatGPT 4 model instead of the deprecated Vision preview model. The core functionality remains the same, and we can also add these additional features like user authentication, profiles, meal history tracking, nutritional goals and progress, and of course, enhanced analytics and trends." All we got to do is simply check the box right here, but in this case, I'm going to uncheck all of the recommendations first, and then we'll go ahead and make the changes later. So click on the button, "Approve plan," and now "Start." Now you can see here it's calling the ChatGPT 4 AI model, and if we're going here and open ai.ts, you can see that it runs with the ChatGPT 4 model.

Now, to make everything work together, what I need here is the OpenAI API key. So we're going to go to this link: platform.openai./ai-Keys, then click on the "Create a new API key" button, type the name, and then click on "Create secret key." Now copy the secret key and paste it right here. Click "Continue." Now, all right, it shows that the basic structure of the app is set up with a homepage, and as you can see, we have the "Upload image" and "Take photo" buttons here. Now, of course, let's try to check if both the "Upload image" and "Take photo" buttons actually work. I'll start by clicking on the "Upload image" button, so I can try uploading our very first meal. I'll go ahead and upload this healthy meal right here, and as you can see, it's working the way we want it to. Now, if it happens to show an error message, something like "Failed to analyze image; please try again," well, I'll show you the three different methods to fix the error. The first one is going to this link, which is the platform.open.com setting organization SL limits, and make sure to set up your limits to allow you to proactively manage your access to the OpenAI models. Now, once you set up your account, then this should fix the error. But if the problem persists, and you might still be having an issue or getting more errors, try to find the exact error code from the dev tool. Here, as you can see, you can find this code. Then I just need to copy that and create a prompt like this: "I'm getting the error 'Fail to analyze the image'; then paste the code and add 'Can you instead use the ChatGPT 4 model?'" Then submit that, and it should fix the error. Now, if there's still an error while analyzing the food, for example, say you upload an image, and then no information appears, basically the best way to fix this is by checking OpenAI's documentation and ensuring we're using the correct JSON format. Now, to do this, we're going to have to open the OpenAI docs, navigate to the API reference, and find the appropriate request structure. Now we'll go into "Chat," then navigate to "Create chat completion." Now, inside this section, you're going to see different types of inputs or requests that can be made. Right now, my prediction is that it's using the default request, which might be why the image analysis isn't working the way we wanted to. So to fix this, we need to switch to the image input request instead. We'll locate the correct image input request, copy the necessary JSON format, and then send it to Replit to update the implementation. So here we're going to write, "This is the image input request necessary for the ChatGPT 4 model," then we'll paste a code that should fix the error in analyzing the image. All right, so now let's go back here and try uploading an image and see if it can actually analyze the food. And there you go. As you can see, the analysis result states, "The image shows a plate of scrambled eggs, sausage pieces, a salad green, and possibly cheese pieces," and that's perfect. Then here you can see it also provides instant nutritional information—everything in the meal. As you can see, it identified that this food had 400 total calories, 24 g of protein, 30 g of fat, and 5 g of carbs. Pretty good meal.

So now let's try to add a graphic or add a pie chart that visually represents the macronutrients consumed over a 24-hour period. All right, let's see what happens. Okay, so let's upload another image. Now we just got an update on our app. It shows the pie chart right here, and as you can see, it's located in the "History" tab, and we can still see the detailed information. So great. Here we have the macros, and the pie chart shows the information. Now we're going to make this a little bit more fine-tuned to the process by giving users clearer instructions on how to take their pictures of their food for the best analysis results. So let's ask Replit agent to do that for us. So we're going to say, "Please add an instruction under the 'Take photo' button that tells users to position their camera about one foot away from the plate." So here, as you can see, it says, "I've added an instruction text under the 'Take photo' button that says to position the camera 1ft or 30 cm from the plate." Then now I can see at the bottom, "Position the camera 1ft (30 cm) from the plate." Pretty nice. So if I'm going to try to click on "Take photo" now, it opens my real-time camera, and it's good for taking a picture of your meals at that moment, so you can check first the nutrients that you could get from it. Now let's try to upload another type of food, then let this app analyze the image. Here's the result, and we got another response. This time it identifies a hamburger with a beef patty, some lettuce, tomato, onion, mozzarella cheese, and basil inside a bread bun. It's pretty good—amazing, actually. And now it shows us 450 calories, 20% fat, 25% protein, and 40% carbs. This time, I want to show up the previous meal to keep track of all the meals we've had so far. So I'm going to send a message to the Replit agent: "I need you to create another tab that has the daily macros that a user needs to hit in order to achieve their goals. Also, save all food entries within a 24-hour period so users can track their meals throughout the day. This will help them monitor their intake and stay aligned with their nutritional goals." All right, good. Now starting to generate the text, and as you can see here, "I'll help you add user goals and a 24-hour meal tracking functionality. First, we need to set up a database to persistently store the information. Let me create the database and update our schema." So let's just wait for a moment, and here it is back again: "Add goals feature: Allow users to set daily caloric, protein, fat, and carb goals and view the progress." So now we have two sections: We have "Set your goals" and "Today's progress," and here I can manage my daily macro goals. So, for example, I'm going to set this to 1,000g daily calories, then protein will be like 50, daily fat is 20, and then the daily carbs is also 20. Now I'm going to write down, "Create a daily macro goals form with four selectable options: calories, fat, protein, and carbs. The form should be simple and user-friendly, allowing users to set their daily nutritional targets easily." Okay, so I'm going to test this out. For example, I'm going to write 2,000 calories, 170 g of protein, 70 g of fat, and 120 g of carbs. Now, to save this daily macro goal, let's go back to the Replit agent. Let's type another prompt: "Keeping the persistence functionality, so goals are saved between sessions." All right, that's perfect to me. Now let's try uploading another image. All right, there you go. It analyzed it pretty good. Then the "History" page is also good. Now we're going to the "Goals" tab from the navigation bar. I'm going to write again, 2,000 calories, 170 g of protein, 70 g of fat, and 120 g of carbs, then I'll click on "Save nutritional goals." "Goals updated." All right, pretty good, perfect. So now when the user adds food to the app, it can now track it and compare it to their daily macro goals. We can update whether or not they achieve their goals on any given day. And to make tracking easier, I'm going to add a calendar to the dashboard. So I'm going to write here, "Create a daily macro goals tracking system. Once a user submits their goals, track the food they upload and display their progress using a progression bar. Add a calendar page and include it as a directory in the navbar. If a user meets their daily macro goals, mark that day on the calendar in green; if they miss their goals, mark the day in red." Now let's see what happens. Ah, an error shows up here. So let's try to fix the issue. All right, so it's updated now. We have your calendar page. So we're going to open that up, and we can see that we can change the month. We highlighted the current day, and it also tells us whether the goals were met on a day or we missed on a day. Again, as we mentioned earlier, green indicates that we met the goal, and red indicates that we failed. Let's add a legend to explain the color coding in the calendar so users can better understand what green and red signify. All right, that looks perfect to me. As you can see, green means good—means daily goals met—and red means uh, daily goals missed. Now let's try to upload an image and let's see what happens in terms of comparing these macros to the total daily macros that we have achieved. So now we're going to upload a photo of this one and let the AI analyze it again. And now it gives us the information here: "The image shows a traditional South Indian meal served on a Banana Leaf, featuring white rice, papadam, and an assortment of side dishes including lentils, vegetables, and gravies." Now it shows here that this food contains 700 calories, 15 g of protein, 20 g of fat, and 110 g of carbs. Now I want to add more functionalities here, so I'm going to write on the "Track food" page, "Display the current date so that all user-inputed information is recorded for that specific day, for example, February 4th for today's entries. Include a countdown timer on the page to show how much time remains before a new day of food tracking begins." So now I have the date displayed on the homepage and the time until the next tracking day. Pretty good stuff. Now I'm going to upload an image, start to analyze our food, and now we have the pie chart back with the results here. So now we're looking at the calendar, and this is a red calendar block because it still hasn't met the goals of the day. So for us to meet the goals of the day, let's see what happens if we just upload all of the food that we need to hit those macro goals for. I'm going to upload more images, and then let's go ahead and see what happens. Now here we are, over the daily macro goals. Now let's check the calendar page. So now that the goals have been met, this should turn green. So we're going to update it. Now we can also add here for additional info, if it doesn't apply to your app: "If a user surpasses their daily macro goals on a given day, mark that day on the calendar in green to indicate successful goal completion." Now, as you can see, the goals have now surpassed on this day. Now these macros obviously are not necessarily the ideal targets; your results may vary, but these are just an example, but at least now we can see that the functionality actually works, and this countdown timer will continue running too. And now we can observe how the system tracks progress in real time, and this gives us a clear understanding of how everything functions. And now here we can say, "Store all food entries from February 4th and begin tracking new meals for February 5th." Pretty interesting. Now the system allows users to manually change the date and log meals on different days. All right, pretty interesting. Now the system allows users to manually change the date and log meals on different days. So today is February 4th; all of our meal data is stored correctly. Now if I move to February 5th, which is in the future, I can start adding new information. Additionally, I can go back in time and review historical data, allowing users to track their past performance. This means that over time, users will be able to analyze their progress, identifying the days they stayed on track with their macros and the days they didn't.

Now let's try to change the UI design and make it a bit more beautiful, but also maintaining that professional look. So we'll type, "Can you change the UI to make it more beautiful?" So as you can see, we've just changed up the design, the background, and changed a bit the color of the app. So if I need something to change, I simply send a message to Replit agent, and it will basically apply the changes to the app—easy peasy. So, for example, I want to change the design of the calendar, so I just need to type, "Please change the calendar design; make it bigger and more modern, but also maintain that professional look." Let's see what happens. Okay. Now let's add some other features like, "At the bottom of the homepage, create a weekly progress tracking and visualize the calorie intake with graphs." Okay, as you can see, we now have graphs where it can show the progress. Now, for me, this feature is essential for users; it helps us to stay motivated and be accountable for our goals. And by regularly reviewing our achievements, we can make necessary adjustments to our strategies, ensuring steady progress. It also provides valuable insights with the graphs, helping us to identify what works best.

Now another feature to implement here is adding customizable goals in the app. So let's say, basically, I want to set personalized calorie targets based on my weight loss or maintenance goals. So let's try to tell Replit agent to set a personalized calorie target based on my weight loss or maintenance goals and make it customizable. Let's see what happens here. Oh, okay, pretty good. Now on the "Goals" tab, we have a customizable feature where I can enter my current weight, target weight, weekly goal, and activity level. Let's give an example, and if an error shows up, then we're going to ask Replit to fix this issue. Type, "Fix error: 'Fail to set user goals'," and then let's say again, my target weight will be 120 lb. Now it automatically adjusts the daily macro goals. Perfect. Now it's saved. Now it allows users to set personalized calorie targets based on their specific weight loss goals. Yes, of course, everyone's body and fitness journey is different, so having the flexibility to adjust calorie targets ensures a more tailored and effective approach. And this feature also empowers us users to track our progress accurately, stay motivated, and of course, make informed decisions about our diets and exercise. And also by giving users control over their goals, the app enhances user engagement and increases the chances of long-term success in achieving a healthier lifestyle.

And there you have it. Congrats. As you can see, we can now upload an image to track calories, protein, fat, and carbs and compare that data to our daily macro goals tracker, which we can update whenever needed. The system also integrates with a calendar, allowing us to track consistency month after month. But there are so many more other features I could add. So, for example, I could also integrate a workout plan, include a notification system to remind users to log their meals, or even send push notifications via text or email if they forget to update their data. These enhancements would make the app even more powerful and user-friendly.

Now, one of the things I love about what we've already accomplished here today is the countdown timer and the beautiful pie chart that helps us to visually represent our macronutrient intake, but this is just the beginning; we're only really scratching the surface of what's possible with this vision multimodal tool. I could take these 10 steps further by expanding its capabilities. For example, I could have the AI track individual ingredients, identify potentially harmful chemicals, or detect seed oils in meals. And with the help of Replit, the possibilities are really endless. And beyond the functionality, this tool has real business potential. I could even market it to influencers, making it part of a fitness automation agency's business model. The fact that I already have a working version of this app just goes to show how much I can expand on it and turn it into something even bigger.

Now I want this run and connected to Stripe where I can start receiving payments. Now first, I'm going to open my dashboard and switch to test mode. This allows us to experiment with the Stripe API without making actual payments. Now, if you look at the bottom left-hand corner, you'll see the "Developers" tab. Just click on that, and it will send us to this page here on API Keys. We have both the publishable key and the secret key that we're going to save and then add to our notes on our computer. Next, make a test product. So click on "Add a product" and fill in all the details here. Now we have a sample product that costs $88.99 per month, and once you set this up, click on the three dots beside the price, and you're set and good to go. Then we'll copy the price ID and put it back to our notes. Now go back to the Replit agent, and we're going to write this: "We will use Stripe to add payments of $8.99 per month, and when a user first signs up, they will be able to do three free image analyses, and after that, they will need to upgrade. Use Shad CN UI for the app and build out the user logic in the database. Make the unique ID for each user the email that they used when signing up. When the user upgrades to the Pro Plan, we need to upgrade their status in the database from 'free' to 'pro,' which gives them unlimited image analysis generation access for the next 30 days." Okay, so let's see what happens here. Now that the prompt is complete, it's asking me for the Stripe secret key that we previously saved already. Secrets are always accessible, allowing us to securely store and retrieve them whenever needed. But for now, we'll add this key to our account secrets. Then by opening another tab in the right panel and then searching for "secrets," we can find here all the saved secrets from various applications we've built using Replit agent. So the sensitive credentials remain secure while still being easily accessible for future use in different projects that we might try to pull off. Now, learning this process is actually essential for us who are developing an app because once you learn how to use Replit agent to set up a Stripe integration, you can easily repeat the process over again for future projects. And this is why it's better to learn how to build an AI app yourself along with me rather than hiring someone to do it for you. When you have the skills to create your own app, one idea doesn't work; you can refine it or build a completely new version. It basically just gives you more control and allows you to continuously improve your app and your skills. Okay, now so it has finally finished with all of the different code that it needed to add, but an error shows up here. We need to copy that and tell Replit agent to fix the error. As you can see here on my screen, the login system is set up with a login button and a register button. Now we need to add a registration system where users sign up with their email. The email will act as a unique ID. The email will act as a unique ID, making sure each user has a separate account. So this will help keep our accounts organized; it'll prevent duplicates and make the login process just more, more secure. Adding this feature will also improve the app and make it easier for users to sign in. So I'm going to tell Replit agent, "When a user is registering, they need to submit their email. This email is used as the primary field, which helps us identify each user separately. Add this to the register and the login page." And now that we have set up the email, let's go ahead and register a test account to make sure everything is working as it should. Since an error appeared when trying to register an email account, we need to debug it by retrieving the error code and then reporting it to Replit agent. I'll type the following message: "An error shows up when trying to register an email account; please do fix the error code." Paste the code right here. Now another error shows up, so I need to report again to Replit agent: "Please fix registration failed error," and then now we'll just wait for Replit agent to analyze the issue and then provide a solution. Click on "Approve plan" and "Start." "Registration successful; please log in with your account." Okay, so now we are on the application, and let's see if it can actually analyze even more images. Ah

Now, an error appears with a message: "Analysis failed" when trying to analyze an image using the free plan. Now we need to report this issue to the Repet agent for debugging. I'll type the following message: "When I try to analyze the image using the free plan, an error shows up: 'Analysis failed'. Please fix the error so the user will use the three image analysis credits."

Now we're going to test the system again by using all the remaining free analysis credits. Now, while on the free plan, the app correctly now displays the number of free analyses remaining. Once all the credits are used up, the "Analyze" button becomes disabled, preventing further use. To improve the user experience, we want the "Upgrade to Pro" button to automatically appear when all of the free credits are used up. This will help encourage users to upgrade for unlimited access. This will ensure a smooth transition from free to paid users, making it easier for users to continue using the app without confusion. Now it shows a button here.

Next up, we need to go back to Stripe and add a few important settings. First, we have the URL that displays our test environment. Open the link in a new app and then copy the URL. Next, go back to Stripe, navigate to the webhook section, and click on "Add endpoint". Here, in the box, paste the copied URL and add "/api/webhook" at the end. Then, click on "Select events," choose "Checkout," and select "checkout.session.completed". Now this ensures that whenever a user successfully makes a payment, we can detect the event and update their plan from free to paid. This step is crucial for automating subscription upgrades and ensuring users get access to premium features immediately after payment. Now click on "Add endpoint" to save the webhook.

Next, we need to add the signing secret to our project, so follow these steps: Click "Reveal" in Stripe to display the signing secret; copy the signing secret; and then go back to Repet. In Repet, open the secret section. Now you'll see two different secrets already saved, but we only need to focus on app secrets, so click on "Add new secret". In the "key" field, enter "Stripe Webhook Secret"; in the "value" field, paste the signing secret copied from Stripe; click "Add new secret". Now we have both "Stripe Webhook Secret" and "Stripe Secret Key" properly set up. This ensures that our app can securely verify Stripe's webhook events and process payments correctly. Now click on "Add endpoint" to finalize the webhook setup.

Next, add the Stripe Price ID by navigating to account secrets and pasting the Price ID copied earlier from the sample product. Add a new secret, enter "Stripe Price ID" as the key, and paste the Price ID as the value before saving. Finally, set up the Stripe Public Key by returning to app secrets; add a new secret; enter "Stripe Publishable Key" as the key; and paste the publishable key as the value before saving. And with these steps completed, the integration is now fully set up, ensuring that Stripe can securely handle payments, upgrade user plans, and process transactions seamlessly, all within our app.

Now we have everything we need. We need to stop the application and then run it again to apply the changes. Now let's try it again after restarting. Log in with the same account to test the Stripe integration. Once logged in, click on "Upgrade to Pro," which will display an option to upgrade. It shows here: "Upgrade to Pro: Get unlimited AI-powered food analysis for just $8.99 per month. Pro features include unlimited food analysis, detailed nutrition insights, progress tracking, and priority support." Now let's click on the "Upgrade Now" button.

Since the subscription field error has appeared yet again, we need to go back to Repet, analyze the error message, and troubleshoot the issue by making the necessary adjustments in the code. Now this step is crucial to ensuring that the payment process works correctly without interruption. So I'm going to type here: "When trying to upgrade to Pro, it shows an error: 'Subscription failed'. Please fix this." Once Repet processes the issue and then applies a fix, we will retry the upgrade process to confirm that everything is working smoothly. Now it shows me where I need to enter the public key, so I'll go back to Stripe, copy the publishable key, and then paste it here. Then click "Add to Account Secrets". As you can see, it says "Stripe subscription flow and error handling in upgrade model includes better error images and improved user feedback".

So now let's try it again. Again, the error shows up here, which is the "Subscription failed" error again. Get the error code from the dev tool and I'm going to paste it to the Repet agent and then type: "When I try to upgrade to Pro and click the 'Upgrade Now' button, I got this error message," and then paste the code. Now we just need to wait for the Repet agent to process it and then resolve the issue. All right, that's perfect. The issue is now finally fixed, and the subscription has successfully started: "Subscription started. Welcome to CalChe Pro!" And now I have unlimited food analysis, unlocking all premium features for a seamless experience.

And right now, the subscription process is missing the step where users complete their payment on Stripe before being redirected back to the app with Pro access. To ensure the app properly redirects users to the Stripe checkout page before granting the Pro Plan, we need to update the logic to fix this. I'll go back to the Repet agent and type: "After the user clicks the 'Subscribe Now' button, you need to show the checkout page to check out. Then, once approved, redirect it back to the main app with Pro features, which is unlimited image analysis for 30 days." This adjustment ensures that users go through the correct Stripe payment flow, avoiding any issues where they receive the Pro plan without actually completing the payment.

Now, if the issue persists and Repet is unable to resolve it, we can provide the entire webhook link as it contains the necessary HTTPS endpoint required for debugging. Now to do this, go to "Update Details," copy the webhook endpoint URL, and then send it to the Repet agent for a more in-depth investigation into the error. This will help identify the exact problem and ensure the Stripe integration is working correctly. We're going to say the valid Stripe webhook URL is this, then paste it here. Okay, now here it shows that we need to enter the webhook link, so get the link again from Stripe and paste it right here. Then click on "Replace Account Secret". Now it says "Secret updated and linked". Okay, let's try it again and register another account.

Now we received another error, so I need to report it back to the Repet agent for troubleshooting. I will send the following message: "When I try to click the 'Upgrade Now' button, it shows a 'Subscription failed' error: 'Failed to set a named property 'href' on location'. Please fix this." Okay, finally, I found the error. It says here that the URL bar is not supported when navigating to external pages. You can open a new tab to use your browser instead. So we're going to open a new tab and follow the same process. All right, perfect. Now it successfully redirects us to the Stripe checkout page where we will fill in the necessary payment information. After submitting the payment, Stripe confirms that the transaction was successful. However, when it tries to redirect back to the page, we encounter a blue screen error. To verify if the payment was processed, we'll go back to the Stripe homepage and check the payment section. Now we can see that the payments are being received, confirming that the Stripe integration is successfully handling transactions. So the next step is to troubleshoot the redirection issue to ensure that users are properly sent back to the app after a successful payment.

Now we need to inform Repet that the Stripe payment works but the redirect back to the application is not functioning properly. So we'll send a message like this, saying: "The Stripe payment worked, but the redirect back to the application did not work." Next, let's open the link in a new tab and register a new account again to test the process all over again. After registration, proceed with the "Upgrade to Pro" option; click the "Subscribe Now" button; and check if it correctly redirects us back to the app while granting limited access. After the successful checkout payment, redirect the page to the CalChe main app; their plan will be updated in the database; and get Pro access. Okay, so the problem here is it can redirect back to the main page. If the error persists and the redirect keeps failing, so I guess the best approach is to sign in with the account that successfully paid for the plan.

All right, great. However, we notice that the user's plan did not change from free to Pro after payment. This means we need to ensure that the user subscription status updates in the database upon successful payment. The final message to send to the Repet agent should be something along the lines of this: "The Stripe payment worked and it successfully redirected me back to the login page. However, after the user completed the payment and returned to the application, their plan was still set to free instead of Pro." Now we need to set up the logic so that when a user pays for the Pro subscription, their plan is updated in the database. This way they can gain access to premium features, which in this case allows them to analyze unlimited images. And so by implementing this logic, we can ensure that page users receive the correct privileges and have full access to premium features without limitations. So let's try one more time by opening the link in a new tab and repeating the process.

Now finally, it shows the Pro status right here, and it says "Pro until March 7th, 2025". So if I go to "Upload Image," then "Analyze," as you can see, I have unlimited access. Yes, if I'm going to sign out and then sign back in, as you can see, it always shows the Pro status now. And there you have it. Now I have a fully functional application with all the essential logic in place. It includes Stripe integration for handling payments, user authentication for secure access, and an efficient system for storing email as a primary key, ensuring that each user is uniquely identified. Everything is working seamlessly, allowing users to register, upgrade to Pro, and then access premium features without any more issues. And that's it. You and I together have built a powerful AI-driven calorie tracking app from scratch, complete with food recognition, nutritional analysis, goal tracking, and Stripe integration for monetization. Users can easily log their meals, track their progress, and then upgrade to Pro for unlimited access. And actually, honestly, there's so much more potential to expand on and refine in this app, and with Repet, we can actually do those things. The possibilities are endless. And with all these features successfully integrated, the application will be well-structured and ready to deploy. Thank you for watching this entire journey from step zero to finish. I'll see you next time, and thanks for watching.