 Hello everyone, welcome to a brand new playlist on PocketBase. PocketBase is basically an alternative to something like SuperBase or even FireBase in that it's an entire backend infrastructure that has databases, authentication, file uploads, anything you ever need and it's all bundled into one pre-built executable file and that's what makes it different from something like SuperBase because although SuperBase is built entirely from open source apps and stuff like Postgres, that's what SuperBase runs under the hood right and although Docker makes it really easy to self-host SuperBase, the SuperBase stack it's still kind of a hassle to set up when you compare it to PocketBase which is basically just a single executable file and not to mention FireBase, that's by Google there's vendor lock-in when you start using FireBase because obviously there is no self-hosting FireBase, it's a Google service Alright back to PocketBase, let me just really quickly go through the general direction and goal of the entire playlist so basically what we'll be doing for the first few videos of the playlist is we'll be going through the basic functionalities of PocketBase and how we can use the JavaScript SDK to interact with the PocketBase API backend so the emphasis will be on PocketBase's functionality and less on the styling and the front-end graphical interfaces and then towards the end of the playlist I will be eventually making a full-stack social media app with PocketBase and if we manage to get to that point PocketBase also has a real-time API that we can use to subscribe to real-time changes and this would be really useful to create chat applications because chat applications really require real-time API so we'll see if we can get to that towards the end of the playlist The very first thing we're going to do to get PocketBase up and running is to go to PocketBase's documentation website at pocketbase.io-docs and download the right file for an appropriate operating system and for me it's going to be Linux so in just a moment you'll see how easy it is to set PocketBase up and that's kind of their main selling point here it's just all in one single executable file so just click that, we'll download a zip archive which you can just go and extract and I'm going to rename the directory to PB so it's easier for us and go inside of the folder and what you'll see here is you can ignore the two marathon files it's not important for our purposes but there's a single executable file there called PocketBase so what you want to do is open up the terminal if you're in Windows just use command prompt tell Mac users use terminal so you can do dot slash pocketbase space serve now that command is actually right here so if you want to use ios documentation website you can just enter that and that will serve our pocketbase server in two different websites so it gives you the API link which is the endpoint to the rest API which we usually, you can directly interface with the rest API that PocketBase automatically generates but we won't be doing that because we have our client-side SDK which is the SDK for JavaScript and then there's the admin UI this is the cool thing about PocketBase is that it offers you an admin UI that you can use to graphically manage all of the backend-based stuff and here we can just create anything just test user jim.com and just create and log in and then this will bring you to our really amazing PocketBase graphical interface now I know that this PocketBase UI's graphical interface is awesome and all and we'll be spending a lot of time here in this web interface but before I dive too deep into the web interface I just want to quickly hop back to our PocketBase file structure and just briefly explain to you the system that PocketBase uses in the backend if you're trying to build just an app a fully functional, full stack app and you just want to push that app to GitHub or GitLab just push the PocketBase executable file as well as the pbmigrations folder but if you want the data to come along as well if you want all of your user data all of your tables and your rows and all of your contents in the database the data itself to come along as well just include that folder if you don't then just don't include that folder and a third folder that you can make here and that you have to manually make is called pb-public and this folder is basically the public folder that will be hosted by the PocketBase executable file when you go to the URL the URL's root so right now it's not found because there's nothing here in this pbm-public folder if we made a new file, we can call it index.html and just say hello world and here that's our file right there and if I went and refreshed my page you can see hello world I can make a new directory we can call it test so there's test in there we can make nano index.html this is the test route and just save that and we went to index.html if we went to slash test this is the test route so that's basically just a static web server that you can use and that comes along with PocketBase I've made a blank react application using yarn yarn create react app and basically what this command did was it generated this pocketbase pb-app directory and in this directory there's package.json we have this build script here and basically at the end of the day when we're done building our react app our frontend app we will run yarn build and they'll give us an output folder it's gonna be a build folder that we can just take and just dump it into this pb-public folder and what they'll do is pocketbase will automatically help us host our frontend react application as well inside of this pb-public folder now if you so choose you can always host your react application or some external server and you can still use pocketbase the same but I'm just gonna host everything in just one place in one single environment and just chuck my react app in pb-public and let pocketbase deal with it as well because that's just more convenient and that's what you'll be doing in this playlist but before I end this video I'm just gonna give you a quick demonstration so go to your browser and go to localhostport8090 slash underscore that's the path to the web admin interface we don't remember what the email and password was so we could always just go and reset the database so I'm gonna stop the server just get rid of all of the folders here just delete that and basically what I did was just reset our pocketbase server we can just serve again and this should give us a brand new instance if I just go to the address here and we can just make an email alright and once we're in this is the default environment so we can make a new collection here called test collection and we can add a field field1 and let's add another field let's make this like a number field and field2 create that so now we have our structure with id field1 field2 if I go back to our file manager we should see that pocketbase automatically generated the directories that we just deleted this is brand new and if I make new records here we can call this hello and then this should be a number right so one two three so now this will be stored in our pocketbase server and if we were to just stop the server and just get rid we can just get rid of pbnscoredata delete that let's re-run the server just went back to localhost and underscore it's gonna ask us to create our first admin account again remember we deleted the data folder and although it still remembers it still keeps the structure of the database it will treat this installation as a fresh instance so we have to set up our admin account again so you can set up a different admin diff admin alright and you can see that it regenerates our database structure remade the test collection as the id field1 field2 but we're missing all of our data and that marks the end of this video in the following videos we'll be building our react front end application and we'll be looking at how we can interface with our pocketbase backend from react.js if all goes as planned I'll be releasing the videos on like a kind of rolling release schedule type thing what it means is that if you have any questions when you're falling along with my tutorials and you put comments down fast enough and I read the comments before I record the next video I might be able to sneak in the answers to some of your questions in the next videos so yeah that's one thing to keep in mind and see you guys in the next video