Ugur Codes
Ugur Codes
  • Видео 20
  • Просмотров 42 217
I applied for TikTok's New Graduate Software Engineer role and failed!
This is my first talk only video if it's not well organized sorry about it!
If I were someone who only studied for necessary things in Uni and have 20 + 20 days necessary internships, I would study leetcode & hackkerrank but having lots of experience and still needing to solve these algorithm questions didn't make sense to me.
I forget to tell you but I made 11/15 and 14/15 in test cases. I know there are probably some secret test cases as well.
My first question was something like this:
there is a binary array, consists of 0 and 1 randomly ordered. Write a function that makes minimum swaps between numbers so that the array has minimum transition between 0s and 1s.
second one was like
give...
Просмотров: 253

Видео

I fixed Next Auth!!! Credentials Login with Database Strategy - Next Auth - Auth Js - Next Js
Просмотров 1,3 тыс.Месяц назад
Hey! With this small trick, you'll be able to use credentials login with database strategy. You probably faced with this issue where you can't use credentials login with database strategy, where you also want to use credentials along with social media logins. Here you go, I fixed it for you :) Repository: github.com/ugurkellecioglu/another-next-template see you in the next videos! bye!
Next js Best pattern to making API calls - Service Layer Pattern - Next 14
Просмотров 2,7 тыс.Месяц назад
Hey! In this video I talk about how do i make api calls in my next js app. I follow service layer pattern approach for a while and I'm in love with it. If you have any feedbacks regarding the flow please let me know. I'd like to improve this flow to make it even better! I really believe this approach will improve your project structure and will make your project more maintainable :D See you in ...
Is Next Auth Better Now? Quick Implementation of Credentials Login - Next 14, PostgreSQL, Drizzle
Просмотров 1,3 тыс.2 месяца назад
Credentials login was pain in the a as people said who used next-auth earlier. Let's see if next-auth has been actually improved. I found it quite easy. Get full code: github.com/ugurkellecioglu/another-next-template Feel free to contribute to this template. I'm planning to make regular contributions to this repository. Thanks! Ugur.
Do not render your component thousands of times - Real life Usage of React Memo
Просмотров 1 тыс.4 месяца назад
NOTE: IF YOU ARE WATCHING THIS VIDEO AFTER THE END OF 2024 THIS MAY BE OBSOLETE. NOTE 2: React team said by the end of 2024, memo will be removed. More info: acdlite/status/1758229889595977824 react.dev/blog/2024/02/15/react-labs-what-we-have-been-working-on-february-2024 In this video I have talked about Plate js which is an open source rich text editor that I have added into my cl...
Magic Link Authentication w Lucia Auth Next JS
Просмотров 1,7 тыс.5 месяцев назад
source code: github.com/ugurkellecioglu/next-14-lucia-auth-postgresql-drizzle-typescript-example/tree/magic-link see you in the next videos, Ugur
Facebook Oauth Authentication Lucia Auth Next JS Full Tutorial, PostgreSQL, Drizzle ORM, Typescript
Просмотров 1,1 тыс.5 месяцев назад
Sign in & Sign up users with facebook social login you can find the source code in: github.com/ugurkellecioglu/next-14-lucia-auth-postgresql-drizzle-typescript-example
Getting User Information with Relations Lucia Auth PostgreSQL
Просмотров 6675 месяцев назад
It turns out getting extra relations data we need to create our own adapter, which was easy to be honest.
Reset Password with Logging Out From Other Devices Lucia Auth Next 14 Full Tutorial
Просмотров 7785 месяцев назад
In this video we have implemented Reset Password feature with logging out from all devices. you can grab the code from github.com/ugurkellecioglu/next-14-lucia-auth-postgresql-drizzle-typescript-example/tree/update-password-with-logout-from-other-devices see you in the next videos! bye, Ugur.
Secure Login with SMS OTP Using Next.js 14, Lucia Auth & AWS SNS: A Complete Tutorial
Просмотров 1,5 тыс.5 месяцев назад
How we can authenticate users with an OTP code? What should be the next video about? If you find this video helpful, you can like it, thanks, Ugur 06:52 - Create local postgresql instance 07:11 - Define our database schema 09:30 - Push our changes into db 10:00 - UI changes 12:00 - otp actions file and server functions 25:04 - input oto UI 28:56 - prevent spam 29:10 - frontend spam protection 3...
Prevent DDOS, Add Rate Limiting into Next 14 app, Dragonfly Redis Alternative Full Tutorial
Просмотров 7975 месяцев назад
2 function, it's all it takes to add rate limiting into your web app. here is the source code: take a look at the actions.ts github.com/ugurkellecioglu/next-14-rate-limiting-redis-dragonfly-example
Lucia Auth Role Based Protected Route - Lucia auth Next js, PostgreSQL, Typescript, Drizzle ORM
Просмотров 3,5 тыс.6 месяцев назад
In this video I have implemented a protected route for only specific role. It was pretty easy. Source code available on: github.com/ugurkellecioglu/next-14-lucia-auth-postgresql-drizzle-typescript-example/tree/role-based-protected-route
Use Lucia Auth in Client Side - Next 14, Lucia Auth, Typescript
Просмотров 2,2 тыс.6 месяцев назад
In this video I've showed how we can use Lucia Auth in the client side. It's very easy to setup. You can give it a like and subscribe to channel if you found this helpful. You can find the source code inside this repository, lucia-client-side branch. github.com/ugurkellecioglu/next-14-lucia-auth-postgresql-drizzle-typescript-example
Get additional user info tutorial - Lucia Auth Next 14, Typescript
Просмотров 8246 месяцев назад
It's possible you may want to get additional data of the user and use it throughout your app. I showed how you can do it if you are using lucia auth package.
Add Github Oauth in just 10 minutes tutorial - Lucia Auth Next 14, PostgreSQL, DrizzleORM
Просмотров 9026 месяцев назад
Learn how to add Github Sign in & Sign up to your project in just 10 minutes. see source code in "oauth" branch here: github.com/ugurkellecioglu/next-14-lucia-auth-postgresql-drizzle-typescript-example
Add Google Sign in into Your Web App w/ Lucia Auth Next 14 - Google Sign in OAuth 2.0 Tutorial
Просмотров 4,3 тыс.6 месяцев назад
Add Google Sign in into Your Web App w/ Lucia Auth Next 14 - Google Sign in OAuth 2.0 Tutorial
Email Password Authentication w Email Verification / Next 14 & Lucia Auth
Просмотров 3,5 тыс.6 месяцев назад
Email Password Authentication w Email Verification / Next 14 & Lucia Auth
Email Password Authentication with Email Verification System Design Tutorial
Просмотров 5017 месяцев назад
Email Password Authentication with Email Verification System Design Tutorial
Use Lucia instead of Next Auth - Lucia Auth Next 14 Username Password Authentication Full Tutorial
Просмотров 14 тыс.7 месяцев назад
Use Lucia instead of Next Auth - Lucia Auth Next 14 Username Password Authentication Full Tutorial

Комментарии

  • @furzykkk
    @furzykkk 3 дня назад

    Next Auth tutor - 8,5 hours ... Your tutorial - less than 1 hour. You're freaky awesome!!! Thx!

  • @fluFFPfizschi
    @fluFFPfizschi 9 дней назад

    Great video, it was really helpful! It would be awesome to see a series on OAuth implementation with Lucia, using different providers. For the next video, it would be better if there were fewer cuts and if you were more prepared. ☺

  • @larrymcfarlane6202
    @larrymcfarlane6202 14 дней назад

    It's been awhile...Welcome back!

  • @Mrbrandon804500
    @Mrbrandon804500 16 дней назад

    Be aware because you send the password in the data when using useSession in the frontend , juste handle in the session callback if(session.user.password){ delete session.user.password), I know it send the encrypted password but it's important

  • @inotopia
    @inotopia 16 дней назад

    I wonder, how does someone use this way to do RBAC and is it possible to use with middleware?

  • @hoseinrajabi8373
    @hoseinrajabi8373 20 дней назад

    how handle error from auth? try and catch can not handle error and i got CallBackError or CredentialsError in my server log

  • @r.in.shibuya
    @r.in.shibuya 21 день назад

    My Startup is backed by NVIDIA we are based in Tokyo. Let me know the best way to reach you.

    • @ugurcodes
      @ugurcodes 20 дней назад

      @@r.in.shibuya you can email me: ugur.kellecioglu@outlook.com

  • @bhanusupraja9940
    @bhanusupraja9940 21 день назад

    New subscriber, I'm having OA is 2 days can you pls suggest any tips

  • @engesin
    @engesin 26 дней назад

    Very good ✌️

  • @mehmethanifierenler3612
    @mehmethanifierenler3612 27 дней назад

    Be careful! The redirect_uri is not associated with this application. Hatasının sebebi ne olabilir. credentional da normal çalışıyor github ta hataveriyor

    • @ugurcodes
      @ugurcodes 27 дней назад

      export async function loginWithGithub() { await signIn("github", { redirect: true, redirectTo: process.env.NEXT_PUBLIC_BASE_URL, }) } eğer bu kod parçasını kullanıyorsan, .env dosyanda NEXT_PUBLIC_BASE_URL 'ın tanımlı olmasına dikkat et. Ayrıca bu adres github'da oluşturduğun appdeki Homepage URL ve Callback URL ile eşleşmeli. örnek olarak: .env: NEXT_PUBLIC_BASE_URL = localhost:3000 homepage: localhost:3000 callback url: localhost:3000/api/auth/callback/github

    • @mehmethanifierenler3612
      @mehmethanifierenler3612 27 дней назад

      @@ugurcodes Teşekkür ederim. https kullanmışım http yapınca düzeldi

    • @ugurcodes
      @ugurcodes 27 дней назад

      @@mehmethanifierenler3612 rica ederim 😇

  • @howtocode2296
    @howtocode2296 27 дней назад

    if you read the next auth documentation, there is a session strategy jwt ....

    • @ugurcodes
      @ugurcodes 27 дней назад

      @@howtocode2296 can it be used with social providers though?

    • @howtocode2296
      @howtocode2296 27 дней назад

      @@ugurcodes i still not yet trying for the social providers. perhaps separate the auth config too

  • @mehmethanifierenler3612
    @mehmethanifierenler3612 27 дней назад

    son versiyon güncellemeler de "dotenv" den bahsediliyor onun kullanımına baktınız mı ? bütün sorunların sebebi o gibi

  • @mehmethanifierenler3612
    @mehmethanifierenler3612 27 дней назад

    DB_URL=postgresql://usersami:passwordd@0.0.0.0:5432/sami_db diye docker postgresql url bağlantısı yazdım " Error Either connection "url" or "host", "database" are required for database connection hatası veriyor, tırnakta koydum fayda vermedi

  • @justinoconnell7307
    @justinoconnell7307 27 дней назад

    It is frustrating that you need to practice a lot of leetcode when you won't often use them that frequently in the day to day but its how the interview process is unfortunately

  • @avitussweetbert9174
    @avitussweetbert9174 28 дней назад

    You are one of my favorite RUclips instructors. Your videos about Lucia auth really helped. I would love to know more about your journey as a freelancer. Some tips about how you started would be really helpful

    • @ugurcodes
      @ugurcodes 28 дней назад

      Thank you! Yes that's a good idea. I'll take a look at it

  • @Henrique01010
    @Henrique01010 28 дней назад

    Yeah, freelancing videos about how did you manage to find and get clients would be super cool.

    • @ugurcodes
      @ugurcodes 28 дней назад

      Thanks for the idea! I can surely look into it

  • @abdullahdoganay6980
    @abdullahdoganay6980 28 дней назад

    Data structures and algorithms are indeed a very fundamental and necessary area. I believe it's a great topic to test people's skills at a certain point. I'm sorry you didn't make it through, but I hope your next applications go better. Good luck

    • @ugurcodes
      @ugurcodes 28 дней назад

      Thx Akın, I hope you can get in the company you want as well :) start doing leetcode :D

  • @wildanmaulana1882
    @wildanmaulana1882 Месяц назад

    why you not using middleware instead of check session in pages?

  • @kakun7238
    @kakun7238 Месяц назад

    please make a full stack app tutorial with the best practices and handling the edge cases as well most of the tutorials dont do that

  • @ismailhossain964
    @ismailhossain964 Месяц назад

    I used to do like this when using flutter with php backend. For me very easy to understand the data flow

  • @samidebayroune3478
    @samidebayroune3478 Месяц назад

    can you work with rest API endpoint for login ?

  • @eliassmith7949
    @eliassmith7949 Месяц назад

    why do you store in db access_token and refresh_token?

  • @neerajuikey2396
    @neerajuikey2396 Месяц назад

    @ugurcodes please make a video on forgot password

  • @AvyIbra
    @AvyIbra Месяц назад

    You are a truly explorer sir, and your channel is underrated.

  • @kineto7899
    @kineto7899 Месяц назад

    Why use status instead of loading?

  • @jamesbotwina8744
    @jamesbotwina8744 Месяц назад

    Nice pattern, but why not just access your db directly in the server components to get users?

    • @ugurcodes
      @ugurcodes Месяц назад

      We can definitely can do it but I don't think next js is suitable for large saas apps. That's why I use an external backend server generally which is why I query my db inside my backend.

    • @jamesbotwina8744
      @jamesbotwina8744 Месяц назад

      @@ugurcodes Why dont you think Nextjs is suitable to large SAAS apps?

    • @jamesbotwina8744
      @jamesbotwina8744 Месяц назад

      @@ugurcodes I don't see an issue fetching user basic data from the built in API server. For more long lasting processes, sure, I can see why you would want a separate server-but otherwise, I think fetching data that already exists is fine.

  • @alper3943
    @alper3943 Месяц назад

    Hocam adına bakmasam türk olduğunu anlayamayacaktım, anlatımın çok açık. Kullandığın yönteme benzer bir class servis yapısını bende kullanıyordum ama sonrasında trpc (t3 stack) kullanmayı denedim ve çok daha iyi verim aldığımı düşünüyorum kesinlikle denemeni tavsiye ederim.

    • @ugurcodes
      @ugurcodes Месяц назад

      Selam çok teşekkür ederim yorumun için. T3 stack denemiştim bi ara fakat büyük bir uygulamada kullanma fırsatım olmadı hiç. Nest js için adapter baktığımda ise yoktu. Official olarak desteklemeyi de düşünmüyorlarmış. Kaldı yani öyle :) Sen back-end de ne kullanıyorsun?

  • @youssefbaaziz
    @youssefbaaziz Месяц назад

    Thanks a Lot

  • @inderjotsingh5868
    @inderjotsingh5868 Месяц назад

    00:53 , didn't know tanstack/query also provides optimistic updates

    • @ugurcodes
      @ugurcodes Месяц назад

      it's very powerful and easy to implement. I love it, you should definitely check that out. They have great docs

  • @rugucloud
    @rugucloud Месяц назад

    Never clerk

  • @alexdin1565
    @alexdin1565 Месяц назад

    also if you want to use facebook its not work

  • @prashlovessamosa
    @prashlovessamosa Месяц назад

    can you please make a series of Next Auth as you created for lucia

    • @ugurcodes
      @ugurcodes Месяц назад

      yes I can! what should be the next video then :)

  • @rxnniiee
    @rxnniiee Месяц назад

    glad to see you tackled the issue I brought up in one of your videos about next-auth, though I will still be using lucia for the control it gives me, plus there's seemingly no way to disable the built in login / signup pages provided by next-auth, which I find very annoying

  • @mehmethanifierenler3612
    @mehmethanifierenler3612 Месяц назад

    Teşekkür ederiz. Next.js 15 Drizzle Postgresql NextAuth bunlar çok gözde konular. 1,5 yılda epey beğeni toplar. Bir seri olarak düşünürmüsün mesala bu konuları ?

    • @ugurcodes
      @ugurcodes Месяц назад

      Rica ederim. Olur isterim, 15 çıktığında böyle bi seri yapabilirim aslında

  • @siddhantota2224
    @siddhantota2224 Месяц назад

    Thanks mate

  • @ogbillity
    @ogbillity Месяц назад

    Thank you so much. Can you add role based authorization

  • @abdullahdoganay6980
    @abdullahdoganay6980 Месяц назад

    Your work is incredibly valuable. I'm not sure what more I can do for you than liking this video.

    • @ugurcodes
      @ugurcodes Месяц назад

      thanks! don't make it a big deal just one cup of coffee/tea would be fine at Paper..

  • @vitoandareasmanik9449
    @vitoandareasmanik9449 Месяц назад

    I was just thinking about making a class to manage services, and your video came up which made this a great idea.😁

  • @iritesh
    @iritesh Месяц назад

    What if we use server actions?

  • @anuj7286
    @anuj7286 Месяц назад

    How to do same wthing with react and express?

  • @gavinland8486
    @gavinland8486 Месяц назад

    Interesting approach - I like it. I have typically just created individual files for each query/mutation - so getUsers.ts, addUser.ts, etc. Is the main benefit of creating a class w/ methods just organization and readability?

    • @ugurcodes
      @ugurcodes Месяц назад

      @@gavinland8486 exactly I was doing the same thing but I found myself a place that I have dozens of files, it was hard to manage

  • @chrisder1814
    @chrisder1814 Месяц назад

    hello could I name some APIs for you and explain to me what I could do if I use them in custom gpt

  • @arsyaputra5606
    @arsyaputra5606 Месяц назад

    i love the way you implement it!, but i have a question, do you have any specific reason not using server actions?

    • @ugurcodes
      @ugurcodes Месяц назад

      @@arsyaputra5606 thanks! I find next js not enough for big saas applications. That’s why I mostly build a separate back end server using nest js. So I don’t to any db interaction in my next js app. But I can still do serverside fetching, all i need to do is call service function inside a server component

    • @neb2777
      @neb2777 Месяц назад

      @@ugurcodes what language do you usually buiild you backend with for big saas applications?

    • @ugurcodes
      @ugurcodes Месяц назад

      @@neb2777 I use Nest js, quite easy to learn. I didn't want to switch into c#, java, python or any other language just for building back-end. I wonder how good is GoLan though

  • @Ss-zg3yj
    @Ss-zg3yj Месяц назад

    why you need both React Query and axios?

    • @ugurcodes
      @ugurcodes Месяц назад

      @@Ss-zg3yj I find them useful. Axios feels more natural to me. I also use baseUrl, interceptors, default headers and lot. I love react query, it’s dx is top notch. It makes caching, optimistic updates easy. But both packages are not necessary for service layer pattern, it’s just the way I like

  • @esraylmaz5645
    @esraylmaz5645 Месяц назад

    I like the way you implement!

    • @ugurcodes
      @ugurcodes Месяц назад

      you'll need it one day :) <3

    • @esraylmaz5645
      @esraylmaz5645 Месяц назад

      @@ugurcodes you’re right:)

  • @esraylmaz5645
    @esraylmaz5645 Месяц назад

    🤩

  • @mehmethanifierenler3612
    @mehmethanifierenler3612 Месяц назад

    teşekkür ederiz. bir de türkçe yapsan çay filan ısmarlarız.

  • @Ss-zg3yj
    @Ss-zg3yj Месяц назад

    Railway is cheap? Are you mental? Did you even read their pricing? 😁

  • @Ss-zg3yj
    @Ss-zg3yj Месяц назад

    this is not to prevent ddos, this is more like for preventing your 3rd party bill overcharge. like someone requesting thousand emails from your service. someone still could ddos you by requesting any static asset

  • @felipemachucaarredondo8037
    @felipemachucaarredondo8037 Месяц назад

    ty so much man