- 40
- 39 458
Early Morning Dev
Australia
เข้าร่วมเมื่อ 1 ม.ค. 2024
This is my youtube channel where I talk about and discuss a variety of tech topics from my day to day development. If you are interested in connecting with me and working on cool projects check out the below link
newsletter.earlymorning.coffee/
newsletter.earlymorning.coffee/
How To Setup Your Next SaaS Checkout In 10 Minutes
Hey guys,
If you are wanting to setup a SaaS fast. Payments should be the last thing on your mind. Instead you should be focussed on doing what you know to do best - Building your product. That's why last year I made an extension to Pocketbase to help makers build. This year I have extended it with hooks to make it the definitive way of building payments with Pocketbase.
In this video I discuss:
- How To Build Apps With Stripe and Pocketbase
- How To Make A SaaS With Pocketbase
- How To Integrate Payments With Pocketbase
- How Fast It Is To Setup Pocketbase
TIMESTAMPS
0:00 Intro
0:22 Setup Your Restricted Key
2:14 Checkout Setup
3:24 The Code
4:36 Webhooks
8:16 FTP Setup
10:03 Modifying Our Code
11:35 Testing Our Code with a 1 time payment
18:39 Testing Our Code with a subscription
22:28 Conclusion
ABOUT OUR CHANNEL
My channel is about new developer trends & all things self-hosted. We cover lots of cool stuff such as Tauri, Pocketbase and LLAMA.cpp
CHECK OUT OUR OTHER VIDEOS
Getting Started With Pocketbase - th-cam.com/video/rcm0pZCRAQ4/w-d-xo.html
What's Different With Pocketbase 0.23 - th-cam.com/video/_huBgVLqpV4/w-d-xo.html
Awesome developer resources, check them out here:
1 Dev Tool To Give You 5% More Productivity, 1 Top Piece Of Weekly Dev News, 1 Simple Tutorial - newsletter.earlymorning.coffee
Next.js Frontend For Your Pocketbase - fastpocket.dev
GET IN TOUCH
Reach out for a collab at sam@biz365.com.au
FOLLOW Me ON SOCIAL
Get updates or reach out to me on:
X: x.com/@meinbiz
If you are wanting to setup a SaaS fast. Payments should be the last thing on your mind. Instead you should be focussed on doing what you know to do best - Building your product. That's why last year I made an extension to Pocketbase to help makers build. This year I have extended it with hooks to make it the definitive way of building payments with Pocketbase.
In this video I discuss:
- How To Build Apps With Stripe and Pocketbase
- How To Make A SaaS With Pocketbase
- How To Integrate Payments With Pocketbase
- How Fast It Is To Setup Pocketbase
TIMESTAMPS
0:00 Intro
0:22 Setup Your Restricted Key
2:14 Checkout Setup
3:24 The Code
4:36 Webhooks
8:16 FTP Setup
10:03 Modifying Our Code
11:35 Testing Our Code with a 1 time payment
18:39 Testing Our Code with a subscription
22:28 Conclusion
ABOUT OUR CHANNEL
My channel is about new developer trends & all things self-hosted. We cover lots of cool stuff such as Tauri, Pocketbase and LLAMA.cpp
CHECK OUT OUR OTHER VIDEOS
Getting Started With Pocketbase - th-cam.com/video/rcm0pZCRAQ4/w-d-xo.html
What's Different With Pocketbase 0.23 - th-cam.com/video/_huBgVLqpV4/w-d-xo.html
Awesome developer resources, check them out here:
1 Dev Tool To Give You 5% More Productivity, 1 Top Piece Of Weekly Dev News, 1 Simple Tutorial - newsletter.earlymorning.coffee
Next.js Frontend For Your Pocketbase - fastpocket.dev
GET IN TOUCH
Reach out for a collab at sam@biz365.com.au
FOLLOW Me ON SOCIAL
Get updates or reach out to me on:
X: x.com/@meinbiz
มุมมอง: 274
วีดีโอ
How A Developer Saved Christmas
มุมมอง 18621 วันที่ผ่านมา
To all my subs and people who have supported me over this year. Thank you so much. Was an absolute pleasure start my channel and to grow. Even if some of my videos were lame - for those of you who kept watching thanks a bunch. See you in the next year for some more awesome content. Also React doesn't suck THAT much. In this video I discuss: - Alpine JS - Bundlesize - React Complexity / Size TIM...
Pocketbase Just Got An SQL Upgrade
มุมมอง 3.4K28 วันที่ผ่านมา
Hey guys, Your life is about to get better if you are a fan of SQL and Pocketbase. Pocketbase now has a shot at horizontal scalability with the ability to swap in Turso as the database driver. I was incredibly surprised how easy it was to do. In this video I discuss: - How To Build Apps With Turso and Pocketbase - How To Make SQL Queries In Pocketbase - How To Make Pocketbase More Scalable Usin...
What's Next For PocketBase With The Founder Of PocketHost
มุมมอง 2.2Kหลายเดือนก่อน
Hey guys thanks for checking out this interview. Was an absolute pleasure to hang out with such an awesome developer as Ben. If you haven't already I strongly recommend. Going and checking out the deal he has got running over at pockethost.io before it sells out. In this video Ben and I discuss: - How PocketHost started and its purpose. - Overview of PocketBase features and its advantages over ...
Building A Custom Wordpress Theme As A Developer In 2025
มุมมอง 208หลายเดือนก่อน
Hey guys, This is a bit of a weird one. I decided to learn PHP and build a site for a client and thought that if you were looking to make your own landing pages. This might be an easy guide for you to go and do the same. As always if this video is something that was valuable consider subscribing to my newsletter: newsletter.earlymorning.coffee for more tutorials, tools to make your life as a de...
Simple Google Logon With Pocketbase
มุมมอง 342หลายเดือนก่อน
Hey all, A bit all over the shop with this weeks video but I hope it is helpful. I forgot to mention that the code for the Oauth function is provided directly in the user collection API definitions so have a look at your Pocketbase instance and then link that function to a button. Setup Your Google Client ID: developers.google.com/identity/oauth2/web/guides/get-google-api-clientid Add Redirect ...
Upgrading to Pocketbase 0.23 Simplified
มุมมอง 512หลายเดือนก่อน
Hey guys, I thought I would do a video showing how easy it is to migrate existing collections and data to the next version of Pocketbase. There is really only a few steps if you don't have custom migrations setup. Some thing to note that I got wrong in the video. I migrated twice. This is not required you only need to copy the data from the old version to the new version and then migrate. Hope ...
Speedy SaaS Payments With Pocketbase
มุมมอง 1.4K2 หลายเดือนก่อน
Hey guys, This week I built an easy lemonsqueezy integration using managed portal links and checkout links. This is probably the easiest way to get started with payments on Pocketbase. If you haven't already I would recommend checking out my newsletter for more tools like this so that I can help you build faster - newsletter.earlymorning.coffee/ Tech used in the vid: Lemonsqueezy - www.lemonsqu...
Trying Tauri For The 3rd Time
มุมมอง 2.7K2 หลายเดือนก่อน
Hey guys, I’ve been diving into Tauri, and I must say-it’s an incredible framework for building cross-platform apps. I first discovered it while working on a project for a client, and I’m now convinced it’s a strong contender against React Native. I’d love to hear your thoughts! If you found this video valuable, don’t forget to check out my weekly newsletter, where I share the top JavaScript an...
How To Self Host Like A Pro
มุมมอง 1.8K2 หลายเดือนก่อน
Hey guys, This week I wanted to introduce the framework I have been using to self host my production apps. After some experience with Fly.io and some unfortunate cost blow outs. Whilst I love the ecosystem I wanted to see what I could do with a classic VPS. That's where Coolify came in. Hope you guys enjoyed the video. If you found this video valuable consider subscribing to my newsletter to ge...
What PocketBase 0.23 Means For Developers
มุมมอง 5K2 หลายเดือนก่อน
Hey guys, This next PocketBase update is crazy a big shoutout to Gani who has spent a bunch of time making the update crazy good. A quick breakdown of everything. Also I messed up with my camera settings in OBS so thats why I am a little down :( 00:00 - 02:40 - Introduction (Me yapping) 02:40 - 12:53 - Pocketbase 0.23.0 Update Breakdown 12:53 - 28:00 - OTP with Astro If you are interested in Po...
How To PocketBase Like A Pro
มุมมอง 3.3K3 หลายเดือนก่อน
This is a video to break down the more complex aspects of building in Pocketbase. If you have built a crud app but are still confused a little bit on how things work or how far you can push things with PocketBase this video is for you. These are the things I wish I knew when I was first building in PocketBase. If you need any help building feel free to reach out to me on x at x.com/@meinbiz Als...
How To Setup Google AdMob In Expo in 2024
มุมมอง 2.7K4 หลายเดือนก่อน
How To Setup Google AdMob In Expo in 2024
Step-by-Step Guide to SSR with App Router in Next.js 14
มุมมอง 4654 หลายเดือนก่อน
Step-by-Step Guide to SSR with App Router in Next.js 14
How To Setup Custom Models With Ollama
มุมมอง 3375 หลายเดือนก่อน
How To Setup Custom Models With Ollama
3 Stupid Things People Have Said About AI
มุมมอง 4566 หลายเดือนก่อน
3 Stupid Things People Have Said About AI
I Chose The Best React State Management
มุมมอง 1806 หลายเดือนก่อน
I Chose The Best React State Management
Let's Build: An AI App From Scratch In JavaScript
มุมมอง 1927 หลายเดือนก่อน
Let's Build: An AI App From Scratch In JavaScript
Let's Build: Authenticated API's with PocketBase
มุมมอง 1.7K8 หลายเดือนก่อน
Let's Build: Authenticated API's with PocketBase
AI Realtime Sales Is Closer Than You Think
มุมมอง 669 หลายเดือนก่อน
AI Realtime Sales Is Closer Than You Think
@Early Morning Dev From what i understood, JSVM doesn't support async. I think all the 'await' keywords are pointless. If you add "/// <reference path="../pb_data/types.d.ts" />" at the top of the pb.js file, it also gives you a warning for those awaits.
I remember reading that. Nice tip. I'll investigate
Great tutorial 😀 I also added cases for deleting records to my project. If you think it’s necessary, I can create a PR for your repo.
Would you mind sharing?
Feel free to add a PR on the project
There seems to be a step I'm missing here, how does the pocketbase webhook know what my user ID is?
Let me explain the webhook knows your user Id by the token. When you authenticate with pocketbase a token is returned which contains Meta data that includes your userid. Does that make sense?
@@earlymorningdev Yes, I store it in local storage when the user logs in, how does stripe then learn about it? Does it get sent up with the request to stripe for a new order?
Why have you cut your screen, can't see any commands you give, just lots of debug information.
Problem with my recording software. Sorry about that
What happens if I remove use client from a page and instead create a separate component to include the use client thing? How would this change affect the behavior of the page?
Great question. Think of it like this. Adding use client to a component makes that component run using js on the browser. Use client on a page makes the whole page run in js. Use client on individual components mean that only these components load client side. Here's the steps in this case: 1. page loads from the server 2. Use client components load using js on the browser. Does that make sense?
ha! lovely :) thank you!
Dude you're covering all the best stuff, PocketBase, AlpineJS ❤. Keep it up man, the world needs more of this content!
Thanks for the support 🙏 🙌
Can you have multiple db per tenant along side pocketbase with this setup ?
Yes you can but there are some caveats that would need to be worked through like validation rules and hooks
i have been using it for long with laravel
Good talk, I really enjoyed it. I'm hoping that Pocketbase will see a good future, it got a lot of potential to be a well thought backend solution. I havn't build anything serious thing with it, I'm waiting for v1, but I'm happy to see the the creator takes it seriously.
That's cool! will look into tauri
Let me know what you think
Less lost now, thanks :)
Glad I could help
no no all the city pic should be rounded, unless no one wants to go lol
😅
wow these derived collections feature is amazing, just brilliant. Pocketbase is so based
Yeah when I discovered that it was a game changer
@earlymorningdev we are currently moving our internal company chat and project management app to pocketbase that is gonna run on a computer in the office over the same network. Not sure how it will go but i have high hopes.
you seems to fan of pocketbase nice work
Of course it is the best 👌
Great video!! Is there a way to use pocketbase with PostgreSQL?
There is a fork that I know of but it really shouldn't be used. For now libsql is all there is
At 25:04 you show accessing Turso from the Turso web client. I would advise caution as this is making a database access key public. Anyone can obtain the key and use it to query the database directly, bypassing PocketBase's robust security entirely.
Good point Ben! I think a certain degree of caution is required with this
Turso with pocketbase is just amazing!
It would be cool to see if people build a library that infers your pocketbase collections and builds the correct ORM for it. So I have all the typed queries i need based on my collections.
I think that would be awesome 👌
hope we can integrate nodejs/deno 2 or bun directly with Pocketbase.
Yep would be good to replace the goja with a real js engine
May I ask? What for do you want to do that? This will slow down your response time and make you pay a larger bill... I remember we had something for regular backups. Also how about encryption and authed users?
Good considerations. How exactly will it slow response time? Yeah encryption and authentication is something I still have to explore. Will probably do a follow-up to this one
@@earlymorningdev Eh (if you're not going to use turso directly, which you probably won't because of auth verification)... you'll have to go to your pocketbase instance first and pb will req a res to send you back that response.
Bro, do another lemonsqeezy vid but with all transaction types
I will soon
Yeah, I was wondering what this custom db connection of 0.23 would allow. Thanks for your attempt to explain the benefits, but I think more videos with further explanations are needed
Glad I could help. There is going to be many more video's as I find more use cases - I think the biggest one I am looking at is Pocketbase as a vector DB and Pocketbase + GEOJSON which now appears to be a possibility
great news
I think this is step forward but the DX is not as good as PB. Maybe in the future the integration can be done through a cli or something when setting up pb instead of having to do all the custom go code since maybe PB user probably to work a lot with go compared to JS. Does this mean you have to reimplement API rules on top of turso to get what you currently get from PB for free ?
That's a good point. I didn't test the api rules for turso
Hi! Liked the rounded brests! I also dont really understand what is the point of pocketbase here ? Why dont just just create a turso db and then use the turso sdk via your front end app?
They are good aren't they! Yeah I think it's just a case of being able to get the hooks and auth of Pokcetbase while getting the benefits of Turso up time and syntax simplicity with SQL. For me and my projects this doesn't make a difference as if I need sql I will just use a custom hook function. But I know this addresses peoples requests for this feature and it also opens the realm of offline first pocketbase and also vector dB's within pocketbase
@@earlymorningdev not sure I understand how does libsql help with offline first case, what did you mean? The biggest benefit I see in turso is easy db per user pattern which as far as I understand won’t work with pocketbase, so we’re left with read replicas, backup, and vector search; which is still great vs litestream
Well if you hook up sqllite cr you can sort of get offline first. I am still looking into how to do it but my point was there are a lot of options now for working with all sorts of data we couldn't before. Like there is sqllite geo libs as well which is awesome for some of my projects
Never heard of cr-sqlite before, looks interesting, thanks!
@@earlymorningdevCan you please link to the user requests you're referencing here? As you say, you can already use raw SQL via a PocketBase hook. Any db writes done outside of PocketBases's Model/Record API will bypass all PocketBase security and events and should be done with extreme caution.
Looks like the Pocketbase owner is getting a bit overwhelmed by the community’s requests! 😅 I guess everyone just wants their app to run perfectly, but a little patience goes a long way! Hang in there, we all appreciate the hard work! 🙌
base on the way he respond (i respect his work)
Yeah Gani is doing a great job. This change in particular is going to be huge for building better SQL Lite integrations with PocketBase
Can we talk about this concurrency issue? What's going on there?
Which issue?
Great conversation! Very cool work with Pocket Pages and Pocodex, didn't know about these, glad to have them on my radar! I disagree with your assessment at 1:14:40 about Gani not wanting to extend the PB admin. He's said several times that he'd like extendable UI components, but the build process for Svelte makes this hard. In some of his recent posts, he's vaguely mentioned working on his own templating language.
That's super cool. I wonder what exactly those limitations were in the build process for svelte
@earlymorningdev I can't link to the discussion because it will get flagged as spam, but in his recent post about SSR he said: "I'll add various helpers for Go SSR apps because I personally have a need for that and I'm planning creating a new simple Go template engine (and eventually "pb_pages" files based router as a PocketBase plugin)"
@@earlymorningdev I think the challenge with Svelte is mainly that there's a build process with bundling etc. Then there's considerations like loading the JS/CSS that's produced, hooking it into the SPA router, and converting all his existing scaffolding into reusable components. Issue 898 discusses this a bit more
It's crazy to me how far JS engineers will go to make sure they can write JS 😆I must say I wish the golang API for interacting with some of the internals of pocketbase was better. It's not straight forward to reach into the DAO layer. I can't remember if that was part of the refactor of 0.23 or not. Edit: the DAO layer was removed in v0.23 Also about the hooks scalability I remember seeing an old github issue about it, so it's definitely a known issue but also the hooks in general are written in a way thats not scalable. This was talked about in one of the github threads and hopefully will be refactored and sorted in the future :D
This is a good insight. I would love a link to that thread. The issue is that there is that hooks should be like edge functions but they aren't really
@@earlymorningdev I dont think youtube will allow me to post a link but from memory the main topic of the thread was talking about using different databases for pocketbase and I believe marmot was also thrown into the convo. Hope that helps and thanks for the great interview. Really makes me want to spin up a micro SaaS with pocketbase. Although I'll probably not choose to go down the JS VM road 😬
I read this as I’ve been programming golang for the past 48 hours 😂 Scalability is a hoax. Write your unscalable app and profit 🤙 But in all seriousness, the JSVM scalability discussion is very misunderstood, I feel. PocketBase is extremely performant and there are workarounds for most every scenario/objection someone has.
@@BenAllfree-z6c I agree with the scalability part. And pocketbase on a single VPS will scale enough for you to figure out whether your idea has legs or not :)
I'm using Expo 52.0.17 and it doesn't work, I've been trying for 10 hours and it hasn't worked, how can I do it?
I hope I can help what is the issue you are facing?
watching this I found myself thinking "There's a frood who really knows where his towel is" I dont often go for such long vids but this one is well worth the time to listen through, I'm fascinated to hear how pocketbase and an ecosystem is come into being around it I currenlty use Laravel as it ticks a lot of boxes for me but pocketbase was and is on my list of very cool tools Ben's work is nothing less than inspiring
Yeah Ben is based. I think there is a lot to love in the PB space at the moment. Really want to see where the laravel space goes as well. Seems to be the popular alternative for nextjs
I'm the dude whose app went viral my app now has 271K sign ups in just about 25 days! But everything is super snappy and fast and I couldn't be happier with PocketBase and PocketHost. And props to Ben for being the nicest person I've met online! He's truly a genius.
Great video, I understood the whole operation but I couldn't understand the utility, what would create this api_key, and why I would use this approach, it's a sincere doubt, I don't have that much knowledge, if someone can give a real example of this use so I can understand better I thank you
Hey thanks for that, Yeah it depends on what you are creating my use was to create a developer tool that allows other developers to connect to my PB instance to do AI generation. Does that answer your question?
I personally don't like ejs because of its syntax, I think JSX is the good spot, there's large community around it and pepople are comfortable with it, even honojs supports server side rendering with jsx. So it would be cool if it appears around pocketbase ecosystem.Also tools like HTMX and alpine are great options too.
The only issue I have potentially seen with Alpine.js and HTMX is that you have to have both to do CSR and SSR which I think is not the all in one magic that some people are after. I think that's why next exists tbh
There might be a way to put a jsx transpiler into PocketPages
Thanks for the interview. I'm a "Flounder member" of PocketHost and I'm excited to start working with it. I see the value of PocketBase in the following place: I make websites for small to medium businesses and I see it as a very cheap to run CMS alternative with a backend that I wouldn't mind sharing with clients. Up until now my go to for this was a Wordpress instance, which I run as a REST API for static rendered sites (using Astro / Next / Gatsby). Wordpress always feels a bit hacky and overengineered for just a few simple content types (using ACF) and I am paying £10+ per month to keep each instance running. Now I can just use a PocketBase instance instead. In this talk Ben talks about how he feels like if given enough money the priority would be to find a way for PocketBase to scale. Personally I disagree. I think there are already good solutions for apps of that scale but (I'm guessing) the vast majority of people don't need anything that can handle more requests than PocketBase can provide.
We really need some more video on pocketbase hooks and JSVM, again awesome chat with Ben!
On it! Hooks are the lifeblood of Pocketbase and are probably the most important part of Pocketbase for me
Love it! Thank you Both! Happy Flounder here! PocketHost saved my life!
Yeah the flounder deal is probably the best value ever for me
I come from the stoneage of development but I prefer developing locally and extending with Go. Just feels cleaner.
I extended with go and respect it but I think that there are a lot of JS purists that don't want to deal with it. In the payment extensions I have developed most of the issues people have is that their go knowledge isn't there - using just js is really helpful for that particular audience I think
Love the conversation. It mindboggling, how much one main person can achieve, love it. :D True for pockethost and pocketbase.
It's awesome that more people are getting evolved as well. I think that Pocketbase as a community is evolving
Haha! Great podcast!
Thanks for listening! Might have to do it again
@@earlymorningdev cool please be the owner of pocketbase and please ask him why he is refusing my help i have ask in work to do he always reject 🤣🤣😂🥲
Hi is there a way to import my data from google sheet to pocketbase automatically sort of bulk upload in pocketbase. thanks
Hey there, That's a really great idea. I'd love to know more about the use case then I might be able to help more. I would look into hooks for something like that if I was going to tackle it
Oh, my. PocketPages. I was starting to learn Go for a hobby project, but now I don't need to! And designing with HTMX in mind too. I love that style of programming.
Definitely feels simpler. We need to get back to that way of doing things
Great chat, thank you so much for the invite! I'm stoked for the future of the PocketBase community 🤙🤙
Absolute please to have you on Ben! You da man!
i read the blog for v2 and it mentioned the ability to use kotlin/swift does that mean instead of rust kotlin and swift can be used to fully replace rust? (except for native api's)
No I think it means that you can use those in conjunction with rust if you like. There is a strong chance you will need to go and do that anyways at some point. My hope is that enough support is given for the project to where you never have to break away from rust just like expo
@@earlymorningdev my hope too ill be honest and say rust is a big turn off for me personally im sure there are others who aren't familiar with or outright scared other option is wails with go lang but its not as mature
@@ayoubkrt5018 I want to see it happen. Out of curiousity why not rust?
interesting, but it doesn't explain how to install it correctly on iOS and configure it
I will be making a video on this at some point. Trying to build some apps to do this at the moment
good
Nice video! Hope you are going to make an Laravel video as well in the future. Cheers!
Thanks a bunch, I hope to it really depends on what people are watching. I feel like I was a snob to wordpress (mainly cause I didn't consider using PHP to custom code) but yeah it's really good. Would love an excuse to code in Laravel
have you tried payload boss?
I have what's your experience of it?
I still feel limited with Pocketbase but it is super cool. Some limitations for me so far: TypeScript typegen should be built-in I think. `pb_schema.json` is there. There are good npm tools but get outdated fairly quickly. Casting is fine. I wish DB transactions were also there, but I guess I could just make hooks and interact with SQLite directly?