Build an AI-driven SaaS Application: FULLSTACK Tutorial with Python, React, and AWS

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ส.ค. 2024

ความคิดเห็น • 190

  • @TheJosephTodd
    @TheJosephTodd 2 ปีที่แล้ว +11

    Absolutely love this project mate - it filled in so many blanks for me. Completed the whole SaaS form start to finish, though a lot of the API protocols still a bit of a muddled gray area for me. Not sure if you do any kind of tutoring, but I'd be willing to pay you well to further engrain a few of these steps in my brain. :)

    • @pixegami
      @pixegami  2 ปีที่แล้ว +4

      Thanks! I’m so glad you managed to follow it through. I haven’t considered doing tutoring yet but I’ll let you know if that changes. What kind of tutoring would be helpful to you? Q&A style thing, or maybe working on a live project (pair programming)? If you find certain ideas unclear, then I wonder if that’s an opportunity to make a video or project focused on it so that other people will be able to learn from it too.

    • @pixegami
      @pixegami  ปีที่แล้ว +4

      Update: I'm now trialing one-on-one tutoring sessions for projects like this (and any general tech topics), so if you're interested to learn more, please check out my schedule: calendly.com/pixegami
      Sessions are done over Zoom, with screenshare. It is privately recorded, and the video and code is shared with you after. I also do a lot of prep-work beforehand to respect your time and help you get the most out of the session.

    • @adityabhattad4614
      @adityabhattad4614 ปีที่แล้ว +1

      @@pixegami hey please make more projects like this on youtube

    • @CHRLD-7
      @CHRLD-7 ปีที่แล้ว

      @@pixegami hey Jack will this be useful if I am a beginner. I have an understanding of some concepts but ultimately I’m brand new. I’d be happy to book in a 1-on-1 but want to check so I am not wasting your time

    • @pixegami
      @pixegami  ปีที่แล้ว +1

      ​@@CHRLD-7 Hey! Since I offer 1-on-1 as a paid service, it's never a waste of my time-especially if I can help you on your journey.
      But as someone who's new, I think there's a lot of great free content online and you might be able to get far on your own before having to spend any money.
      To make the most out of a 1:1 session, you should have a clear problem or goal, and it should be something that you've struggled to solve yourself.
      But whatever you choose to do, welcome to the world of coding! :)

  • @Necro-wr2tn
    @Necro-wr2tn 4 หลายเดือนก่อน +8

    Can't believe you made this 2 years ago. I hate TH-cam for not recommending you channel 2 years ago!

    • @pixegami
      @pixegami  4 หลายเดือนก่อน +1

      Glad you liked it! Shame it's a little outdated now though, I'll need to a new one soon.

    • @R0cky0
      @R0cky0 4 หลายเดือนก่อน

      ⁠​⁠@@pixegamiyes please. Nextjs + Supabase would be a plus 😅

    • @R0cky0
      @R0cky0 4 หลายเดือนก่อน

      True. He was way ahead of the time, before all these have become a mainstream. Truly wish this channel grow!
      @pixegami ​​⁠yes please. Nextjs+Supabase would be a plus 😅

    • @R0cky0
      @R0cky0 4 หลายเดือนก่อน

      @@pixegamiyes please. Nextjs+Supabase would be a plus 😅

    • @R0cky0
      @R0cky0 4 หลายเดือนก่อน

      True. He was way ahead of the time, before all these have become the mainstream.

  • @user-uo6pc8jn2f
    @user-uo6pc8jn2f ปีที่แล้ว +2

    This is a fantastic video. It's by far the best one around the SaaS on TH-cam.
    Several folks asked about additional items, e.g., the authentication, database, and subscription payment gateway. It's not a complete SaaS solution without those items.
    I eagerly anticipate your new project to cover them.

    • @pixegami
      @pixegami  ปีที่แล้ว +1

      Thanks, you're right - building a SaaS from the ground up is a massive project. I'm slowly doing videos to cover individual components, and hopefully I can pull together to make another end-to-end SaaS tutorial in the future with all the features you mentioned.

  • @acikoci
    @acikoci 2 ปีที่แล้ว +7

    This is really useful and I like the level of complexity, and the level of explaining is just right. Watching this after learning basic Python syntax last week.

  • @nafis_rk
    @nafis_rk 2 ปีที่แล้ว +5

    Thank you very much for this tutorial. This was my first time using AWS and it was a great mix between just enough information and not too long of a tutorial!

  • @eduardo_ferreira
    @eduardo_ferreira 10 หลายเดือนก่อน +2

    00:00:00 Introduction
    00:06:40 Architecture
    00:08:43 Backend API
    00:53:50 Backend Infrastructure
    01:41:35 Frontend NextJS/React
    02:34:54 Styling with TailwindCSS

  • @tonynguyen6124
    @tonynguyen6124 ปีที่แล้ว +4

    I just finished this from start to finish and this was by far one of the best tutorials I've seen! I really liked the detail and how well explained each step was. It's also great that you're still trying to help some folks in the comment section. Thanks for the tutorial!

    • @pixegami
      @pixegami  ปีที่แล้ว +1

      Awesome, thank you! And amazing job for getting through start to finish. Fun fact, less than 3% of people who watch this video manage to finish the project, so well done :)

  • @FuckBKvBalintxD
    @FuckBKvBalintxD 10 หลายเดือนก่อน +1

    This video (especially the AWS Lambda setup part) saved my life so many times! :)

    • @pixegami
      @pixegami  9 หลายเดือนก่อน

      Great to hear!

  • @zzz-oc4fe
    @zzz-oc4fe ปีที่แล้ว +2

    Beginner here, love the detail and pace of this video. Thanks for sharing!!

  • @geraldcarter5072
    @geraldcarter5072 ปีที่แล้ว +2

    Great intermediate-level tutorial...You explain things very well and enough that we could follow along and make modifications, as needed.

    • @pixegami
      @pixegami  ปีที่แล้ว

      Thanks for the feedback!

  • @sammetal92
    @sammetal92 ปีที่แล้ว +1

    Thanks for this, I used Express and Typescript to code the back-end of the application instead of Python, so that went in quite a different direction but the ideas and guidelines you gave came in very useful and I couldn't have done it without this video.

  • @user-tq1pq7rj7n
    @user-tq1pq7rj7n 7 หลายเดือนก่อน +1

    Awesome tutorial, better than anything I've seen on youtube.

    • @pixegami
      @pixegami  7 หลายเดือนก่อน

      Thank you! Glad you enjoyed it ;)

  • @nitinparihar83
    @nitinparihar83 2 ปีที่แล้ว +3

    One of the best tutorial I have seen in the while. Thank you !

  • @manishmishra1984
    @manishmishra1984 ปีที่แล้ว +1

    Absolutely amazing work!! You made the whole thing engaging and intuitive without missing a single detail. I'm definitely using this as the primary guide for my application. Thanks a lot! 🚀

    • @pixegami
      @pixegami  ปีที่แล้ว +1

      Glad you enjoyed it! I'll be doing more SaaS and AI related tutorials this year so stay tuned if you want to see more :)

  • @Mrtargi
    @Mrtargi 3 หลายเดือนก่อน +1

    Finally finished it! Thanks a lot, it was a really huge work! I had to revised all code due to I used only AWS ApiGW instead fastApi, also I deployed everything using AWS SAM and hosted website with AWS Pipeline and S3 bucket, so it took a time to readapt everything and write all backend from zero. Finally I get a really great project for my portfolio! Oh, and I heard that you don't like this kind of tutorials because it is very hard to follow for someone, but for me it is really great, they could keep all the project and very consistent. Anyway thanks again!

    • @pixegami
      @pixegami  3 หลายเดือนก่อน

      Congratulations for completing the project! Only about 3% of viewers even make it to the end of the video. Well done :) I'm also very glad to hear that you enjoyed it. Thanks for the feedback as well, it encourages me to make larger tutorial projects like these in the future.

    • @Ayusharma114
      @Ayusharma114 หลายเดือนก่อน

      please share your portfolio

    • @Mrtargi
      @Mrtargi หลายเดือนก่อน

      @@Ayusharma114 Unfortunately I could not attach any links

    • @Ayusharma114
      @Ayusharma114 หลายเดือนก่อน

      @@Mrtargi i need src code

    • @Mrtargi
      @Mrtargi หลายเดือนก่อน

      @@Ayusharma114 I've sent you link to the source code on your email

  • @YASHTOTLA
    @YASHTOTLA 2 ปีที่แล้ว +4

    This is some high-quality content. Thanks!

  • @LifeSurf123
    @LifeSurf123 ปีที่แล้ว +1

    Thanks for the amazing video. I'm looking to apply for the OpenAI residency and this project is perfect to put on my portfolio. Much appreciated!

    • @pixegami
      @pixegami  ปีที่แล้ว

      Best of luck!

  • @njorogekamau3820
    @njorogekamau3820 ปีที่แล้ว +1

    Thank you man. I've being wanting to create a project that is closely related to this one and now I have atleast found a guideline. Thanks a lot

    • @pixegami
      @pixegami  ปีที่แล้ว

      Glad to hear! Good luck with your project.

  • @badaouiahmed2538
    @badaouiahmed2538 ปีที่แล้ว +1

    Very nice Tutorial! Well done also I loved that you used Obsidian :D

    • @pixegami
      @pixegami  ปีที่แล้ว

      Haha yeah, it was the only 'smart' markdown editor I found that worked across Mac, Windows, iOS and Ubuntu.

  • @bocianb9397
    @bocianb9397 2 ปีที่แล้ว +1

    Now i try to generate NFT with your wideo!!! When i have free time i try to generate poem with ai and i will try to build ap with you! Nice content bro! Take Carey!

  • @bentoby2123
    @bentoby2123 9 หลายเดือนก่อน +2

    Love the project! Do you have a tutorial on how to create the authentication layer?

    • @pixegami
      @pixegami  8 หลายเดือนก่อน +2

      Yup! Here’s one I made about using Firebase for Auth:
      th-cam.com/video/BQrE98bP6m4/w-d-xo.html

  • @fernandocorenstein6531
    @fernandocorenstein6531 ปีที่แล้ว +2

    Absolutely amazing. Couple of issues that may help others complete this tutorial. Change the timeout of your aws lambda since it has a 3 sec limit by default and is in most cases not enough for the lambda to go live and fetch and return what you are requesting.
    I am very thankful for this extremely high quality content. You are superb.

    • @pixegami
      @pixegami  ปีที่แล้ว +1

      Thanks for bringing this up! I should have probably included that in the video.

  • @abdullahal-jauni3013
    @abdullahal-jauni3013 2 ปีที่แล้ว +1

    Really well explained on every step.
    Thank You

    • @pixegami
      @pixegami  2 ปีที่แล้ว

      Glad it was helpful!

  • @tanw89
    @tanw89 ปีที่แล้ว +3

    Hello, this is top notch stuff! In these 3 hours I learnt more than what I'd gone through in weeks with other tutorials.
    Several people have asked a few times below, so I'm going to bump up this already strong signal on what your audience is looking for! Possible to add a continuation tutorial on Stripe/PayPal integration and a user login system? This would really complete your package on SaaS creation, and if put together, would be one of the most authoritative pieces of education for many of us in SaaS creation :)

    • @pixegami
      @pixegami  ปีที่แล้ว

      Thanks! Those are encouraging words. I definitely plan to do another major-project tutorial that involves auth and payments. It will probably be a separate project because I want people to be able to jump right in. But you'll probably have to wait 2-3 months for it though because those projects usually take a bit of time to prepare, record and edit :)

    • @Louma007
      @Louma007 ปีที่แล้ว

      @@pixegami Is it still a video you will release in a near future ? I'm absolutely thrilled by the idea of this tutorial, as I don't find any like the one mentioned here. I'm a lot concerned by the security aspect of such a SaaS and would love a lot to learn more about it.

    • @pixegami
      @pixegami  ปีที่แล้ว +2

      @@Louma007 Yup, I definitely plan to do a refreshed SaaS video, and go over things like Stripe and subscriptions too.
      But currently I'm working on a beginner Python course that will probably take me 2-3 months, so I need to finish that first.
      Whilst I enjoy the 'bigger' projects more, I realised there's still a lot of people who want to learn from scratch, so I want to bridge that gap a bit first.

    • @danielemingolla
      @danielemingolla 8 หลายเดือนก่อน +1

      @@pixegami in the meantime do you've some reccomandation on tutorials to follow in order to learn how implement the auth + stripe subscription? thanks

    • @pixegami
      @pixegami  7 หลายเดือนก่อน

      @@danielemingolla I have one just on Auth + Stripe here: th-cam.com/video/xi3F2Zv91UE/w-d-xo.html
      There's a lot of ways to do it too, but that's probably how I'd start.

  • @Sranju23
    @Sranju23 ปีที่แล้ว

    What a solid tutorial! You deserve more subscribers. Can you do some tutorial for an app with event driven architecture?

  • @hemanthchowdary7150
    @hemanthchowdary7150 2 ปีที่แล้ว

    Awesome video 🤩
    Thanks for making 🥰

  • @marvinckr694
    @marvinckr694 ปีที่แล้ว +3

    Would it be possible to add paid plans and also restrict usage for the different plans with this architectur? Planning a SaaS and this is by far the most ellegant way I've seen in terms of handling the backend and only think that's missing is the payment service so does anyone know about that?

    • @pixegami
      @pixegami  11 หลายเดือนก่อน +1

      I still need to make a SaaS tutorial that combines payments and everything, but for now here's a recent video I made that shows how I'd set up auth and payments for something like this: th-cam.com/video/xi3F2Zv91UE/w-d-xo.html

  • @Reddify
    @Reddify ปีที่แล้ว +1

    Incredible video

  • @0Smile0
    @0Smile0 ปีที่แล้ว +2

    Hi! Any plans to make a part II tutorial on saas? You could do stuff like Adding the auth, pricing tiers, api tokens generations, etc

    • @pixegami
      @pixegami  ปีที่แล้ว +2

      I don't think I'll make a part 2, but I might make a separate one to cover auth and pricing specifically (since a lot of people have asked). I just don't like the idea of people having to sit through a 3 hour project as a pre-requisite.
      Thanks for the suggestion though!

    • @jaimequinoa4760
      @jaimequinoa4760 ปีที่แล้ว

      @@pixegami Hello, did you finally make the video covering auto, pricing tiers, etc?. Best regards

  • @MrTomer157
    @MrTomer157 ปีที่แล้ว +1

    AWESOME AWESOME AWESOME !!!

  • @HashtagTiluda
    @HashtagTiluda 11 หลายเดือนก่อน +2

    Hi @pixegami, would it be possible for you to create a full-stack video which would include authentication and Stripe payments? Not sure whether I have said this before but it would be extremely helpful. Thanks in advance.

    • @pixegami
      @pixegami  11 หลายเดือนก่อน +2

      Thanks! I do plan to do that sometime this year, but that's quite a big project so I haven't had time to finish it yet. Stay tuned though, it's definitely coming :)

  • @AryanChaurasia10
    @AryanChaurasia10 2 ปีที่แล้ว +1

    Hi great project if you could add and show stripe payment system it would be great.

  • @user-dg4sl4ge5g
    @user-dg4sl4ge5g 8 หลายเดือนก่อน +1

    Hello, sadly i am getting the error No module named 'pydantic_core._pydantic_core when trying to run my lambda function, seems like it is not available on the awslinux architecture, i am using arm Mac.

    • @pixegami
      @pixegami  8 หลายเดือนก่อน

      Ah sorry I think the Lambda docker image layer must be built for Intel architecture. You might have to rebuild the layer yourself using Arm Architecture on the Mac 😞

    • @user-dg4sl4ge5g
      @user-dg4sl4ge5g 8 หลายเดือนก่อน

      wow video is almost two years old but you responded immediately. Thank you so much! Indeed, i just ended up using one of lambdas preconfigured python base layers and also set the architecture to arm. Works well now! @@pixegami

    • @DhrutiDilipbhaiPatel
      @DhrutiDilipbhaiPatel 8 หลายเดือนก่อน

      Hey, @@user-dg4sl4ge5g , I am getting the same issue. Can you tell me how you resolved it?

    • @dmna3722
      @dmna3722 2 หลายเดือนก่อน

      @@user-dg4sl4ge5g could you provide some steps on how to achieve this or what you did? at this exact point and it's frustrating 😅

  • @danielemingolla
    @danielemingolla 8 หลายเดือนก่อน +1

    Hello! Great video! I've watched until 1h28m but I'm not understanding how I'm supposed to test this locally. Do I need to remove the handler created by Mangum in order to run the fastAPI server locally? What's the best way to test the APIs and the frontend on my local machine?
    Thanks

    • @pixegami
      @pixegami  8 หลายเดือนก่อน +1

      I think there's a couple of ways you can test it locally. Pick what works best for you:
      1) Like you said, you can have a `main` function (or a way to start the Python app) that uses the FastAPI app directly as a server. You don't have to remove the Mangum code, you can just choose not to use it (since the FastAPI app is still created either way). Then you can test it like you would with FastAPI.
      2) You could actually just run it as a Lambda function locally and test that: docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-using-debugging.html
      3) You could split testing into two suites: a unit tests that just tests the service logic Python files itself. I write those as a unit test, then I use FastAPI/Mangum to wrap that for deployment. I just test the Python logic and not the FastAPI/Mangum stuff with the unit tests. Then you can deploy it to a BETA stack (so like a non-prod copy of your Lambda function), and write API integration test to test the whole thing end to end. This is harder to set up, but this is how I generally test larger projects. Then you get both speed for local development, but the full end-to-end testing for the real thing.

  • @thetagang6854
    @thetagang6854 4 หลายเดือนก่อน +1

    The link for the final website is giving an error when entering the topic

    • @pixegami
      @pixegami  4 หลายเดือนก่อน

      Hmm, thanks for letting me know. The project is a bit old so I might have to go and check it.

  • @DhrutiDilipbhaiPatel
    @DhrutiDilipbhaiPatel 8 หลายเดือนก่อน +1

    Unable to import module 'brandguru_api': No module named 'pydantic_core._pydantic_core
    I am getting this error while testing the function on aws. How can i resolve it? Thanks for great tutorial.

    • @bentoby2123
      @bentoby2123 8 หลายเดือนก่อน +1

      I'm getting the same error. I've tried changing the python version from 3.12 to 3.10 on aws in case there's some compatibility issues and updated the dependencies with pip install. Not really sure what else to do.
      Edit: Try changing the python version on AWS to 3.7. This is because the Dockerfile has it install python 3.7
      Alternatively, update the Dockerfile to use an updated version of python.

  • @hi9313
    @hi9313 ปีที่แล้ว +2

    Hi Jack, great tutorial. What infrastructure would you suggest to achieve the same but with GPU capabilities for those heavy models (noting that lambda functions don't provide these). Thanks.

    • @pixegami
      @pixegami  ปีที่แล้ว +1

      Hmm, interesting. I don't have a lot of experience myself with running serverless GPU compute loads. The AI I used in this tutorial is actually just an API service call - the heavy lifting is done by OPenAI's servers.
      If you have your own model that you want to host like this, you could potentially look into AWS ECS or AWS Fargate instead for more compute options. I'm not sure if there are serverless GPU compute available. Maybe AWS SageMaker?
      But if you have enough money, you can just run an actual GPU server full-time, and have the rest of your app make service calls to it. There's a lot of GPU compute options out there (AWS, Google Cloud, Azure, PaperSpace), but they usually are quite expensive.

  • @trez6465
    @trez6465 ปีที่แล้ว +1

    Amazing video!!! Do you mind give a bit pointer where you setup the OAuth to allow user login with Google? I couldn't quite locate that in the video but did see that as a feature when I went to the site

    • @pixegami
      @pixegami  ปีที่แล้ว

      Glad you enjoyed it! I actually only found out I had to add the Auth after, so unfortunately (security requirement from OpenAI) that didn’t make it into the video.
      I also used Auth0 here, but if I had to do it again I’d probably use Firebase. I do have a Firebase Auth tutorial video here, which you could probably apply to your project:
      th-cam.com/video/BQrE98bP6m4/w-d-xo.html
      They both (Auth0 and Firebase) use JWT tokens as the underlying mechanism, which is a sensible way to solve auth for Rest API applications.

  • @grsdjjggfss3373
    @grsdjjggfss3373 2 ปีที่แล้ว +2

    Thankyou ❤️

  • @aidataverse
    @aidataverse ปีที่แล้ว +1

    Very good

  • @calebthecurious7824
    @calebthecurious7824 ปีที่แล้ว +1

    What's good my guy! Thanks so much for this tutorial. Loving the amount of detail you've put into this tutorial!
    So I've run into a 500 error trying to connect to fastAPI (46 minute mark). The terminal says the following: openai.error.AuthenticationError: No API key provided. I've previously exported my OPEN_API_KEY in the prior step but unsure as to the step I am missing! Much appreciated any support you are able to provide.
    Keep up the great work!

    • @pixegami
      @pixegami  ปีที่แล้ว

      Did you call it `OPEN_API_KEY ` or `OPENAI_API_KEY`? The library expects the latter. Otherwise in your application code, you can debug the value in Python directory by running `os.environ.get("OPENAI_API_KEY")` - and don't forget to `import os` first.
      See the docs for more info: beta.openai.com/docs/api-reference/authentication

    • @Sranju23
      @Sranju23 ปีที่แล้ว

      After i added the env variable from mac terminal, I had this issue while running from VSC but it worked fine on mac terminal. Are you seeing error from VSC terminal? When i used 'printenv' on VSC terminal it was not showing me the api key variable.

  • @jaytech120
    @jaytech120 2 ปีที่แล้ว +2

    You're just the best!!!!...Please can you mentor me

    • @pixegami
      @pixegami  2 ปีที่แล้ว +2

      I'm not doing any mentoring/training right now, but if there's subjects or topics you'd like me to make a video about then feel free to suggest it. I'm also planning to start a Discord server sometime in the future so you can talk to me and ask me questions directly there.

  • @TheAngryChoob
    @TheAngryChoob 2 ปีที่แล้ว +1

    I keep getting the error around 1:25 when testing the Lambda functions. The copykitt_api name is correct in Infrastructure-stacks, and I made an ENV file.
    "errorMessage": "Unable to import module 'copykitt_api': No module named 'dotenv'",
    "errorType": "Runtime.ImportModuleError"
    Lambda was working prior to Docker addition. Help!

    • @pixegami
      @pixegami  2 ปีที่แล้ว

      It means it can't find the dotenv package - you might need to add that into the Lambda base layer (the one we use Docker for) and repackage it for the function to use.

  • @jonathant1797
    @jonathant1797 2 ปีที่แล้ว +2

    Great tutorial. Quick question, it appears that you are very good at Python, why not build web app using Django but React?

    • @pixegami
      @pixegami  2 ปีที่แล้ว +3

      Good suggestion. I chose React because it is the leading frontend framework right now (going by metrics like adoption, number of users, community support). It's also serverless, which Django doesn't offer. I do prefer working in Python, but the advantages of using a leading framework (e.g. React) outweighs the relatively fixed cost of learning the technology (e.g. Typescript).
      That said, Django does shine when it comes to deploying full-stack apps and prototypes quickly, so I will probably explore it as well in a future project.

    • @jonathant1797
      @jonathant1797 2 ปีที่แล้ว

      @@pixegami I am looking to build a prototype and hoping to do it all with Python. But if react is better for front end I would reconsider it.

    • @youlee6475
      @youlee6475 2 ปีที่แล้ว

      @@jonathant1797 Your question about Django, for me Django is back-end and rect front-end, so it's not the same. Maybe O wrong ?? You can replace Django with node.js for example.

  • @AryanChaurasia10
    @AryanChaurasia10 2 ปีที่แล้ว +1

    can you also share how to add aws auth into this project to include user authentication and securing your api gateway

    • @pixegami
      @pixegami  2 ปีที่แล้ว

      That's a good idea. I'll put that in my list for next projects to do :)

  • @maverickshreeve6718
    @maverickshreeve6718 2 ปีที่แล้ว +1

    1:18:51 when you are the generate base layer into a zip, you use chmod which is not a command for windows. I have been looking for another way to make the file a executable but I am struggling. any solutions?

    • @pixegami
      @pixegami  2 ปีที่แล้ว +1

      Oh, I see - if that's the .sh file, then I don't think .sh files are executable on Windows. You might either have to do it in a Linux Subsystem (WSL), or just write your own script. The shell file itself doesn't do a lot of heavy lifting - it's mostly just Docker and file system commands. In my future videos I'll have to provide Window alternatives to these commands too.

  • @dmna3722
    @dmna3722 2 หลายเดือนก่อน +1

    Did you ever post or share how to add authentication? Would appreciate if you gave some guidance or pointed in the direction of adding it.
    Is it still possible to deploy without it?
    @pixegami

    • @pixegami
      @pixegami  2 หลายเดือนก่อน

      I did make two separate videos on using Firebase for Authentication: th-cam.com/video/BQrE98bP6m4/w-d-xo.html
      And with Stripe for payments: th-cam.com/video/xi3F2Zv91UE/w-d-xo.html
      But this might be a bit outdated now so I'll have to review and see if they are still practical options for SaaS today.

    • @dmna3722
      @dmna3722 2 หลายเดือนก่อน

      Thank you for your response. I still keep hitting errors for missing pydantic modules in the lambda function. Is there any way around this?

  • @yavuzoncu4752
    @yavuzoncu4752 11 หลายเดือนก่อน

    Great ttutorial.👏One question: How to add an apiKey and usage plan to the api?

    • @pixegami
      @pixegami  11 หลายเดือนก่อน

      You can sign up for an account here: platform.openai.com/overview Then click on your profile, go to "Manage Account". You should be able to get an API key from "Api Keys" and set usage limits (e.g. max spend) in "Billing".

  • @LearnWithBahman
    @LearnWithBahman ปีที่แล้ว +1

    With same stack , if we want to save prompt and response to prompt , what do you recommend to use as a data base ? any AWS services or create our own database like PostgreSQL?

    • @pixegami
      @pixegami  ปีที่แล้ว

      Depends on your access pattern. The cheapest and simplest database on AWS is DynamoDB. It's a serverless key-value store (like Firestore on Firebase), so I'd start with that-until your needs outgrow it.

  • @murilodeveloper
    @murilodeveloper 11 หลายเดือนก่อน +1

    thank you!

    • @pixegami
      @pixegami  11 หลายเดือนก่อน

      No worries!

  • @ericmungai7278
    @ericmungai7278 ปีที่แล้ว

    tried running cdk bootsrap with my account and region but I keep getting this error, Need to perform AWS calls for account but no credentials have been configured

  • @paonsgraphics9750
    @paonsgraphics9750 2 ปีที่แล้ว +1

    This is very practical. I never thought about something like this on TH-cam. But I have one complaint! CorsMiddleware failed to work, any update ?

    • @pixegami
      @pixegami  2 ปีที่แล้ว

      What failure are you seeing? It could be many different reasons, CORS is tricky.

    • @paonsgraphics9750
      @paonsgraphics9750 2 ปีที่แล้ว

      @@pixegami I think CORS is now fine, I'm now getting GET/api/ net :: ERR_NAME_NOT_RESOLVED

  • @seanthomson23
    @seanthomson23 2 ปีที่แล้ว +1

    Hi, I'm having a couple issues with the layer on my windows. When I built the layer it works and deploys successfully but when I test the GenerateSnippetProxy, I get "No module named 'numpy.core._multiarray_umath'" (numpy is up to date) and if I use the layer provided and in your git and cdk deploy I get "No API key provided from openai". I really want to get this right, not sure how to do so

    • @pixegami
      @pixegami  2 ปีที่แล้ว

      Ok, for the first problem it sounds like there's something wrong with trying to build the layer in the Windows OS. It's likely if you solve that problem, you'll run into the separate OpenAI issue layer anyway.

    • @pixegami
      @pixegami  2 ปีที่แล้ว

      Your second issue, "no API key" is actually good to see. It makes the layer and the Lambda is working properly, and able to get as far as running the OpenAI SDK.
      The SDK fails though because it can't find the API key (it's expecting an environment variable called "OPENAI_API_KEY).
      So how do we solve that? Luckily it's an easy fix.

    • @pixegami
      @pixegami  2 ปีที่แล้ว

      This is the line that sets the OpenAI environment variable on Lambda: github.com/pixegami/copykitt-tutorial/blob/main/copykitt-infra/lib/copykitt-infra-stack.ts#L24
      If you don't understand what that line is doing, I suggest to read up about .env (dot-env) files. You have to create .env file and define your OpenAI key in there. Or you can just hard-code it on that line if you want an easy option.
      But NEVER commit or expose that API key in public. That's why it doesn't show up when you clone my repo - private keys must be protected otherwise someone can access your API (and you will get billed for it).

    • @seanthomson23
      @seanthomson23 2 ปีที่แล้ว +1

      I've got it thank you!

  • @pmmohi
    @pmmohi 10 หลายเดือนก่อน

    Hi...I am stack on a point...I am getting the following error while testing the api
    Unable to import module 'readingapi': No module named 'pydantic_core._pydantic_core'
    can anyone experience the same?

    • @pixegami
      @pixegami  9 หลายเดือนก่อน

      Hmm, it sounds like you are either using the wrong Python environment to run your code - or you might have missing/outdated dependencies and need to run `pip install --upgrade`.

  • @alexduff6627
    @alexduff6627 7 หลายเดือนก่อน

    Is there any videos or turorials to directly to integrate the opwn AI asssitand chat and appointment booing bot into a CRM

    • @pixegami
      @pixegami  7 หลายเดือนก่อน

      I haven't done something like that yet - sounds like quite a specific use case. I'll be doing a more complex AI project later this year, but I think if you want something very specific like that, it's probably easier to watch separate videos that show you have to do different parts of it.

  • @selcuktekgoz2320
    @selcuktekgoz2320 หลายเดือนก่อน

    hi whats your vscode theme?

  • @zameerahmed1775
    @zameerahmed1775 ปีที่แล้ว +1

    The project is good to get a feel of Open AI API's.
    Can I deploy the above project using a FREE AWS account ??

    • @pixegami
      @pixegami  ปีที่แล้ว

      Yes. But there's a caveat. There's no such thing as "FREE" or "PAID" AWS accounts - All AWS accounts are the same, and have the same billing plans.
      But the technology that I used for this project (like AWS Lambda) have generous free tiers - which if used wisely, are enough for projects like this. See here for all the free tiers (look for "always free"): aws.amazon.com/free

  • @HaoyangLu
    @HaoyangLu ปีที่แล้ว +1

    Nice video. Well done!
    I started to add more functionalities using your template. However, I encountered a problem that the zip file exceeds the 250 MB limits. So I believe I have to create the lambda function from docker image, which has a 10GB limit. I find the process is very painful, even for those with a tech background like me. Any chances that you can add a git branch for this use case? Using this template would let folks, like me, to focus on the API dev instead of going deep on docker and other stuff. Thanks!

    • @pixegami
      @pixegami  ปีที่แล้ว +1

      Wow, thank you so much for the "Super Thanks"! I really appreciate it. You're right that Docker is definitely the way to go. I'm happy to do a tutorial/branch on it, but it's going to take a while to deliver because I have several months of content planned and recording already.
      Here is the AWS documentation for deploying a Docker Lambda container: docs.aws.amazon.com/lambda/latest/dg/images-create.html
      I've deployed this with Docker before. The AWS configuration isn't hard - but where I find it challenging is the packaging.
      This folder has an old project and an example file for deploying a Docker based Lambda: github.com/pixegami/saas-starter/tree/master/saas-infrastructure/compute/base_layer
      It's a bit outdated though, so you might have to adapt it. The key important thing I wanna warn you about is that the Docker image must be generated with the EXACT same base OS arch and same Python version that runs in Lambda. That's because some Python libraries will only download a pre-built binary for specific OS Archs or Python versions.

  • @spielville5087
    @spielville5087 2 ปีที่แล้ว +1

    I was wondering if this can be done without Docker? I think its important to mention that Docker might not work with Win Home Edition properly.

    • @pixegami
      @pixegami  2 ปีที่แล้ว

      Ah good call out. Yes, you can work-around the Docker part. It's only just used to prepare the Lambda function with the dependencies.
      Of the top of my head, there's definately ways to basically just build out all the Python dependencies into a local folder, and just include that with the entire Lambda zip. I didn't like that because it's not managed by code (rather it relies on a script to update the function everytime you want to change it).
      Another way is to just use a cloud computer (e.g. hire an AWS EC2 micro instance for a few hours) and run Docker in there instead, just to prepare the `layer.zip` file. You just need that file once, and you can do the rest without it.

  • @joudidibsi
    @joudidibsi 2 ปีที่แล้ว +1

    Hi @Pixegami, Thanks for this great tutorial!
    I've finished almost half of your video, and now I am stuck in what seems at a new error (500 internal server error), as it seems AWS Lambda requires an API Key from Authorization Bearer in the header or password, not only from the environment file. Can you please tell me what is the best approach for this and solve it?
    Thanking you in advance

    • @pixegami
      @pixegami  2 ปีที่แล้ว

      Well done for making it halfway! That depends on the error - it's hard for me to tell what the problem or the solution is. The quesiton I'd ask here is, which API call is throwing this Authorization error? Also, that error should be a 4XX, not a 500 (I guess Lambda gets hit with the 4XX and is the one to throw the 500).
      So you need to figure out which API call inside that Lambda function is throwing the error. It should be a 4XX error. Then see what you can do to give it the correct authentication token.
      Here's some good reading on HTTP authentication in general: developer.mozilla.org/en-US/docs/Web/HTTP/Authentication

  • @TheTroyGuardian
    @TheTroyGuardian 2 ปีที่แล้ว +1

    Hi, thanks for the great tutorial.
    Can you help me why I got statuscode 404 response when testing at 1:24:12? I tried both edited and unedited template test and got statuscode 404
    Thank you in advance

    • @pixegami
      @pixegami  2 ปีที่แล้ว

      404 status code means it tried to reach something that doesn't exist: en.wikipedia.org/wiki/HTTP_404
      To figure out what the problem is, you need to look at the stack trace and figure out which line failed, and see what resource you are trying to use that is raising the 404. It might be a mistyped API key or endpoint.

  • @gerardom894
    @gerardom894 2 ปีที่แล้ว +1

    Video was amazing.
    I've a problem though. The zip works totally fine when I use the own downloaded from your GitHub. However when I create my own with Docker there seems to be an error with some numpy imports (No module named 'numpy.core._multiarray_umath').
    DO YOU HAVE ANY IDEA HOW TO WORK THROUGH VERSION/COMPATIBILITY ISSUES??

    • @alayshah1995
      @alayshah1995 2 ปีที่แล้ว +2

      Change all the Runtimes to PYTHON_3_7 in infra.ts file

    • @pixegami
      @pixegami  2 ปีที่แล้ว +1

      The version of Python in your Lambda, and the version that is built in Docker needs to be the same. Also the CPU architecture needs to be the same as in Lambda. It's quite a tricky problem that I've run into myself as well, which is why I prepared a zipped Docker layer for you already.
      We can get into debugging Docker/Python compatibility issues, but it's a pretty deep subject so I'll probably address that in a separate video.

    • @HaoyangLu
      @HaoyangLu ปีที่แล้ว

      @@pixegami > Also the CPU architecture needs to be the same as in Lambda
      I ran into this problem with my Macbook Pro M1 (arm64). The platform for the service is x86. This causes mismatch and some weird package not found issue during pip install. The solution would be to specify the platform in Docker, something like: "FROM --platform=linux/amd64 python:3.9.9-slim-bullseye"

  • @evgenipogoster1940
    @evgenipogoster1940 2 ปีที่แล้ว +1

    Hi, Thank you for this great tutorial.
    I got stuck while deploying my project to the aws cloud, I got the following error while testing:
    errorMessage": "Unable to import module 'copykitt_api'
    Do you have any idea what should I do in order to resolve it?

    • @pixegami
      @pixegami  2 ปีที่แล้ว

      The error means the function on Lambda can’t find the Python file that has the module `copykitt_api`. It could be a simple pathing or naming error, or something more complex. For debugging it, I recommend opening up the Lambda code in the AWS editor and see what files are there, and if you can make modifications there to import it.

    • @evgenipogoster1940
      @evgenipogoster1940 2 ปีที่แล้ว

      @@pixegami As far as I understood it, the error is probably related to the Python and numpy version which I am using. What Python version you are using?

    • @minhkhaitran1447
      @minhkhaitran1447 2 ปีที่แล้ว

      @@evgenipogoster1940 Yeah I got the same error, probably the version of openai and numpy are not compatible. So what I did is just clone his layer.zip from the github and continue from there

    • @joudidibsi
      @joudidibsi 2 ปีที่แล้ว

      I solved that by changing Python version to 3.7 in AWS, and downgrading Numpy in my terminal.

  • @rajmane3632
    @rajmane3632 ปีที่แล้ว +1

    nice terminal prompt can you share it?

    • @pixegami
      @pixegami  ปีที่แล้ว +1

      I talk about my Ubuntu terminal prompt here: th-cam.com/video/UvY5aFHNoEw/w-d-xo.html

  • @prithvi3980
    @prithvi3980 11 หลายเดือนก่อน

    I wanted to do code along with tutorial, so please someone tell me, it is still supported all API's ?

    • @pixegami
      @pixegami  11 หลายเดือนก่อน

      The things I've used in this tutorial should still be supported, but they might be older versions of the API. I plan to update my channel with a newer version of a SaaS stack soon too so stay tuned if you are interested in this type of project.

    • @prithvi3980
      @prithvi3980 11 หลายเดือนก่อน

      Thank you so much@@pixegami

  • @shivamkumar-qp1jm
    @shivamkumar-qp1jm ปีที่แล้ว +1

    Sorry to say but this is not a complete SaaS App subscription payment gateway must be there

    • @pixegami
      @pixegami  ปีที่แล้ว

      You're right. I will make a new project tutorial that will include those things.

  • @austinschrader4602
    @austinschrader4602 ปีที่แล้ว

    Can you show authentication?

  • @cocoarecords
    @cocoarecords ปีที่แล้ว +1

    can this be done on Ruby on Rails? please answer me :3

    • @pixegami
      @pixegami  ปีที่แล้ว

      Sure, Rails is a full featured framework so I'm sure it's possible.
      But if you are starting a new project and have a choice of frameworks/language, I think it's better to choose something that's widely used and gaining (rather than losing) popularity and adoption.
      It's important for the long term maintainability of the project.

  • @elonbasee7935
    @elonbasee7935 ปีที่แล้ว

    i really appericiate this but can you tell me some alternative free methods of aws and more

    • @pixegami
      @pixegami  ปีที่แล้ว

      AWS (and Azure and Google Cloud as well) already have pretty extensive free tier that lets you do quite a lot of development already: aws.amazon.com/free/
      Firebase also lets you do a lot of stuff for free: firebase.google.com/

  • @theprosociety
    @theprosociety ปีที่แล้ว

    Hey What about the Database? What you recommend: PostgreSQL or MySQL or MongoDB

    • @pixegami
      @pixegami  ปีที่แล้ว

      I'd go with DynamoDB (or a similar key-value store) if the use case is simple. PostgresSQL is excellent too but you'll have to work a little harder to scale it out.

  • @el3ctrickitty
    @el3ctrickitty 6 หลายเดือนก่อน

    Is there a way I can build this without AWS? I don't have a credit card xD

    • @pixegami
      @pixegami  6 หลายเดือนก่อน

      Most cloud providers will probably ask you for a credit card to get started with hosting any kind of service (even if they are free). But some other popular free options to look at include Vercel and Firebase, but the code will be different to host the project on those platforms.

  • @nitinparihar83
    @nitinparihar83 2 ปีที่แล้ว +1

    what terminal app you are using?

    • @pixegami
      @pixegami  2 ปีที่แล้ว +2

      This is just the regular out of the box terminal program in Ubuntu Linux. If you are using Mac OS, then iTerm will be similar. I don't know what the equivalent is for Windows.
      As for the terminal plugins, color and style itself, I use the zsh (zshell), with Oh-My-Zsh add-on. For the color theme, I use a custom theme, which I based off the in-built "Agnoster" theme. I then have two additional plugins: one that highlights valid/invalid commands, and one that adds auto-complete based on my history.

  • @MartiZenith
    @MartiZenith 2 ปีที่แล้ว +1

    Docker just won't generate a zip file no matter what

    • @pixegami
      @pixegami  2 ปีที่แล้ว

      What error do you see? Docker learning curve can be pretty steep.

  • @jesusperdomo8388
    @jesusperdomo8388 ปีที่แล้ว

    Hello and thank you for this wonderful work. I am doing everything inside a python virtual environment. When I try to do docker --version it tells me that the command is not recognized. Please how can I solve this. Thank you. I have tried to install it by npm and by pip but neither works

    • @jesusperdomo8388
      @jesusperdomo8388 ปีที่แล้ว +1

      I solved this by installing the full Docker software!!!

    • @pixegami
      @pixegami  ปีที่แล้ว +1

      Glad you found the solution! Yup, Docker is its own separate piece of software - it's not an NPM or PIP package.

  • @MrCamdere
    @MrCamdere 2 ปีที่แล้ว +1

    geil

  • @gerardom894
    @gerardom894 2 ปีที่แล้ว

    Hey man. Great video.
    I've a problem though. The zip works totally fine when I use the own downloaded from your GitHub. However when I create my own with Docker there seems to be an error with some numpy imports (No module named 'numpy.core._multiarray_umath'). Any idea what could be wrong??

    • @pixegami
      @pixegami  2 ปีที่แล้ว

      (see response to the similar question also in this video)

    • @kshitijroodkee8151
      @kshitijroodkee8151 ปีที่แล้ว

      The way I solved the error was changing the lambda runtime to python3.7 as well ( this was the version we used in docker file )

  • @faizs1130
    @faizs1130 ปีที่แล้ว

    1;21;59

  • @payday_1150
    @payday_1150 ปีที่แล้ว +1

    how can i fix this error I get when I try to do cdk deploy?? --app is required either in command-line, in cdk.json or in ~/.cdk.json

    • @pixegami
      @pixegami  ปีที่แล้ว

      It probably means you're running `cdk deploy` from the wrong directory: docs.aws.amazon.com/cdk/v2/guide/troubleshooting.html#troubleshooting_app_required
      You need to run it from the CDK project root.

  • @jesusperdomo8388
    @jesusperdomo8388 ปีที่แล้ว +2

    best regard. I would appreciate if someone can help me with this error * The Python version is: Python3.9 from "/var/lang/bin/python3.9"
    * The NumPy version is: "1.21.6"
    I've searched everywhere but I can't find the solution

    • @pixegami
      @pixegami  ปีที่แล้ว +1

      I don't think that's the full error message. But at a glance, it sounds like a Python runtime mismatch. My guess is that you need to change the Lambda Python runtime version to something that matches the Docker image version (I think I built it with 3.7?). Check the Dockerfile to confirm the Python version there.
      If that really is the problem, then here's the explanation: libraries like Numpy actually aren't pure Python - they contain a lot of compiled binary code (like written in C). But that code is usually platform and runtime specific. So when you install numpy in your Docker container using a Python 3.7 runtime, you only get the 3.7 versions of numpy.
      When you try to run that in a Python 3.9 environment, it can't find the equivalent 3.9 runtime binaries, so it will fail. I don't know if that's the real problem you're seeing, but that's my guess.

    • @jesusperdomo8388
      @jesusperdomo8388 ปีที่แล้ว +1

      @@pixegami Thank you, you are doing an excellent job. What I did was in the requirements.txt file I added numpy==1.21.5 to downgrade it because I was installing 1.21.6. Then in the copykitt-infra-stack.ts file I put everything to python 3_7 and in the lambda I also put the Run times to python 3.7 in the end it worked. Thank you very much.

    • @vannent
      @vannent ปีที่แล้ว +1

      @@jesusperdomo8388 THANK YOU SO MUCH! I spent three hours trying to figure this out, and by the end of it I decided to actually check the comments, and it works now! 😭

  • @MartiZenith
    @MartiZenith 2 ปีที่แล้ว +1

    Any idea why I would get "openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details." the first time running this? I definitely have not exceeded my usage limits. I haven't even used it yet.

    • @MartiZenith
      @MartiZenith 2 ปีที่แล้ว

      Lame. There's no kind of 'base plan' offered free of charge. You have to start paying for it after the free trial period is up to use it at all!

    • @pixegami
      @pixegami  2 ปีที่แล้ว

      Ah yeah, that's right. But it's pretty cheap if you set limits on your tokens. I think they also recently just reduced the price by 60%.
      When I build apps for testing, I usually use "Curie" engine because it's 10% the cost of Da Vinci. Usually even with quite a lot of testing, my bill still comes out to something like 1-2$ for the month.

    • @tonynguyen6124
      @tonynguyen6124 ปีที่แล้ว

      that's weird, they gave me a grant of $18.00 when I made my account and I barely used $0.33 throughout the entire tutorial + my own testing.

  • @archonized2027
    @archonized2027 ปีที่แล้ว +1

    @pixegami
    I've been following this tutorial slowly over the past couple days and have loved every little part of it!. This is my first tutorial project and I really want to get it done, however I am runing into an error!
    I've made it to the 2 hour mark in the video, however when I type in "coffee" for example and submit, I will receive an error in my console.
    [my api link] from origin 'localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
    and
    get [my api link] net::ERR_FAILED 502.
    The weird thing that I am finding though, if I keep clicking submit it will eventually work as intended, usually after 3-4 submits.
    I'd greatly appreciate it if there was some way you could help! I really want to finish this!

    • @pixegami
      @pixegami  ปีที่แล้ว

      CORS is a safety feature between a server and a browser (so it could be something special with your browser, or maybe the API server middleware not handling CORS properly). It's hard to see what is the exact cause without really deep diving in your situation but I recommend looking up some CORS-related guides on what the problem is and how to fix it: developer.mozilla.org/en-US/docs/Web/HTTP/CORS
      Usually to 'fix' CORS you need to make it so that the HTTP response sent back to the caller has a header attached that allows CORS from cross-origin sources: developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin

    • @archonized2027
      @archonized2027 ปีที่แล้ว

      @@pixegami Okay thank you! I’ll take a look at it right now. I appreciate it greatly.

  • @aewfan4360
    @aewfan4360 2 ปีที่แล้ว +1

    Very Great tutorial. I have one question from the business perspective, If i have an idea which OpenAI can solve and if I wrap a SAAS around it and sell the feature, what will be my USP?

    • @pixegami
      @pixegami  2 ปีที่แล้ว +1

      If your business *only* wraps OpenAI without adding new value, it will be hard to have a USP.
      If you want a USP, your business would have to add value on top of the OpenAI technology somehow - for instance putting together queries in a specific way, or using the responses from OpenAI to do something unique on your server.

    • @aewfan4360
      @aewfan4360 2 ปีที่แล้ว +1

      Yes, I got it. We can pre-process queries as you're saying, and process the result to solve a specific problem. Thanks a lot @Pixegami.