5 STAR AI.IO

TOOLS

FOR YOUR BUSINESS

HELLO & WELCOME TO THE

5 STAR AI.IO

TOOLS

FOR YOUR BUSINESS

bubble Io


Generate  Your First Professional 

AI bubble Io PROJECT & Get Your

BUSINESS 2 Another  Level.

Welcome to Bubble: Introduction [1/10]


Welcome to Bubble: Introduction [1/10]


What You Can Build With No Code - Bubble Fundamentals: Lesson 1



Getting Started

Getting Started With Bubble - Key Concepts



Bubble.io Tutorial: How to Build an App on Bubble in 2023



Building A Marketplace 

Bubble Crash Course for Beginners (2022)


361,870 views 17 Mar 2022

🎓 My complete Bubble course (45+ hours of lessons) 👉 https://thinkitbuildit.co IN THIS VIDEO Learn the fundamentals of Bubble by building a simple second-hand goods marketplace from scratch. 🔥 Mega tutorial on Responsive Design:    • Bubble Responsive...  


⌚ TABLE OF CONTENTS Introduction - 00:00 The Bubbling mindset - 00:45 Creating a new app - 04:48 Setting up our first page - 05:36 Adding visual elements - 09:50 Collecting user input - 13:01 Your Bubble database - 19:40 Improving the UX of our form - 37:30 The debugger - 39:00 Retrieving data from the database - 42:26 Groups - 48:58 Repeating groups - 56:02 Pushing data between containers - 1:01:20 Editing data things - 1:09:46 Combining our edit and create forms - 1:19:05 Only when rules - 1:23:43 Yes/no statements formatted as text - 1:29:23 Pages - 1:31:28 Inter-page navigation - 1:35:53 Reusable elements - 1:38:54 Users - 1:46:22 User sign up - 1:47:22 Conditional statements - 1:59:25 Custom states and forking logic - 2:05:22 Creating our login/signup form - 2:29:48 Data relationships - 2:41:03 Privacy rules - 2:49:49 Creating a ‘favorite products’ list - 2:56:20 Closing remarks - 3:04:49 

TRANSCRIPT

PART - 1 

0:00

hey guys so this is the tutorial that i wish i had when i was starting out my

0:05

bubble journey what we're going to be doing today is building a marketplace at from scratch in a way that just teaches

0:11

you the fundamentals of bubble so this is really geared towards people who are completely new to bubble non-technical

0:18

people maybe you've got an app idea that you want to get off the ground that's how i started that's how many people in

0:24

this community started so that's what we're going to focus on today so if you want to jump straight into building jump

0:29

to the next chapter you can find the timestamp in the description otherwise i just want to have a quick word on sort

0:36

of bubble in general and the right mindset that you should have going in to

0:42

bubble so bubble of course as you know already

The Bubbling mindset

0:47

is a visual programming language what that really means ultimately is that it's giving you this visual interface

0:54

which is manipulating the code base so to speak of your app underneath so in

1:00

the same way as you're familiar with a program like photoshop right where you're using a

1:05

visual interface with your mouse to sort of change the look and feel of an image what's actually happening there

1:11

underneath is that there is code that's being manipulated every time that you're

1:16

making changes in photoshop the code of the image file itself is being

1:22

manipulated and you could of course just go straight into that image file and just change the code right just change a

1:28

few letters here and there but that's going to be a really tedious and non-intuitive way of editing a photo so

1:36

photoshop gives you this layer of abstraction above that and bubble is exactly the same thing just for web

1:42

applications so giving you this layer of abstraction that's way more intuitive

1:47

for people especially non-technical people to interact with but in saying that what bubble still forces you to do

1:56

is program so i want to talk a little bit about the distinction between coding and programming because even though yeah

2:03

you're not writing lines of code right that's syntax based code that we're all familiar with even though you're not

2:09

coding what you are doing is programming whether you're writing code in javascript or you're bubbling you're

2:16

still programming and what i mean by programming is that you're giving commands to a machine right you're writing a

2:23

program that is going to tell a machine in this case your bubble application

2:28

what to do so the bubble application rather is the program and it's running on a machine or rather multiple machines

2:35

and what you have to do is tell it exactly what to do okay you can't take

2:40

anything for granted you can't assume that the application is just going to do

2:45

something in a particular way because you find that intuitive and just to show you what i mean for a second i've got

2:51

this button here on a page that i created okay all that's going to happen is it's going to create an object create

2:57

an object in my database and we'll of course talk about databases in in just a little bit so i'm going to click this button right and we'll create the object

3:04

well i just clicked the button and it doesn't really look like anything happened but of course it did there there was an object that was just

3:10

created it's just that as the user of this site just doesn't seem like anything was created like you'd expect

3:16

that you'd see some kind of indicator right the button would change color or there'd be an alert or something but

3:22

that kind of stuff wasn't programmed so if we just jump into the bubble editor for a second i can show you here's the

3:28

command right this is what bubble would call a workflow and we'll get into all the details of how this works but i

3:33

basically got a command here that says when this button is clicked okay create a new object but i don't have any other

3:40

commands after that i'm not saying show an alert to the user or change the color of the button or anything that would

3:46

give the user a visual cue that there has in fact just been an object created so that's what i mean by don't take

3:52

anything for granted every little step every little bit of behavior that you want your application to follow more or

3:59

less there is some built-in kind of commands around users but more or less um you have to create everything so just

4:06

getting into that programming mindset is really the most important thing when you're starting out bubbling because

4:13

yeah even though you're not writing code okay you should still think of yourself as a developer it doesn't really matter

4:19

what tool you're using whether it's python or javascript or whether you're writing some code in something like an

4:25

sql database if you're familiar with those or whether you're using bubble ultimately what you are doing across all

4:31

of those tools is using them to write programs and that means thinking in a very logical analytical way about what

4:39

you want your application to actually do so with that little preamble out of the way let's actually jump into editing and

4:46

creating our first app all right so when you first log into your bubble account

Creating a new app

4:51

okay you're gonna see this page you may have already dabbled and you may already know about this so what we want to do is

4:56

create a new application now from scratch so we click the new app button and now we're going to sort of call it something so i'm going to call this

5:03

the mega tutorial 2022 let's say and here is just basically some forms that

5:09

bubble wants you to fill out to give some information to them about what you're building for their own analytics so in our case i'm just going to skim

5:15

through all of this it is not important for our purposes

5:20

all right now our bubble app opens for the first place and what bubble does is it gives you this sort of template

5:27

right out of the box if you want we don't want that so we're going to click start with a blank page

5:33

and then we're going to close this assistant so this is the bubble editor

Setting up our first page

5:38

okay so what you're seeing here is the canvas the design canvas where you

5:43

actually will place the elements that will appear to your users in your website but you have other columns here

5:50

on the left hand side to the workflow tab and the data tab and some of these other tabs as well which we're going to

5:55

go into for now we're just going to focus on the design tab so basically what we what we've got here on up on the

6:02

left hand corner is this is telling us the current page of the application that we're editing is the index page and

6:08

actually i can actually click here and i can see some other pages here as well so that index page is what we are currently

6:15

editing and if i was to double click on this canvas i actually bring up what bubble calls the element inspector so

6:22

this is basically like a properties panel that lets you change certain things about the page or the element

6:28

that you are inspecting so in this case we're actually changing the properties for the page itself so what i could do

6:33

is i could actually come down here and change this to a flat color and then change the background color to maybe a

6:40

light gray and by the way just quickly um your bubble editor might look slightly different than mine at this

6:46

point so you can see that i've got this sort of grid here you can toggle off that kind of grid or toggle it on rather

6:52

by just clicking up here grids and borders and then you can toggle to sort of show a grid and you can change the

6:58

size of those grid boxes as well and change some other properties here so i encourage you to kind of play around

7:04

with that when you are editing so there's one other little small thing that i just want to address before we kind of dig into the meat here and that

7:11

is this responsive tab over here so bubble is actually right in the middle

7:16

now of rolling out a new responsive engine by responsive all i'm talking

7:21

about is the behavior of how your app is going to look depending on the size of

7:27

your user's screen so how your application might kind of shrink or expand or have certain elements drop out

7:35

depending on the size of the screen that your users are using so if you're watching this when this responsive

7:41

engine is out of beta it's currently at the moment of recording in beta then you won't see this option at all but for us

7:47

who are watching this sort of at this moment while the responsive engine the new responsive engine is still in beta

7:53

we just need to come over to this responsive tab and click upgrade responsive if you've made some changes

7:59

you might see this kind of thing but if you haven't made any changes then you won't say it at all we don't need to copy this so we're just going to upgrade

8:05

that page and so this kind of upgrade is done on a page by page basis but as i said if

8:10

you're watching this a few months from now when the responsive engine is out of beta then you won't see that option to

8:16

upgrade you'll just be on the new responsive engine by default and um you do want to do this for every page you do

8:22

want to be using this new responsive engine because it is vastly superior to what was there before in saying that i

8:28

don't want us to actually deal with responsiveness at all today because it's sort of another topic on its own i want

8:33

to suggest sort of deal with the fundamental building blocks of programming in bubble today so what i

8:39

actually want us to do is if we open up that element inspector again for our index page and we go over to this layout

8:45

tab okay i just want to make sure that your container layout is set to be fixed

8:50

and what that means is that it doesn't matter what size screen your users are viewing your application on it will

8:56

always stay the same size it won't shrink or expand or have any other kind of responsive behavior so right out of

9:02

the gate okay let's just actually see what our application looks like we've given it this kind of background color what we can do is come over to this

9:08

preview button over here click preview and that will open in a new tab our application as it appears to our users

9:16

so you can see here that we actually do have a fixed width page you know like this is the the size of our canvas i'll

9:22

just jump out of full screen mode here for you um you can see that you know this is the size of our canvas here

9:28

technically it's 1080 pixels wide and this is 1080 pixels wide so my laptop

9:34

screen is a little bit wider than that which is why you're seeing the sort of white space on either side so this is

9:39

good this is what we actually want right now this is not how you would build applications in practice you would always want them to be responsive but

9:45

let's leave responsiveness for now and i'll deal with that in a separate video so now let's actually add some elements

Adding visual elements

9:52

to our page right let's actually make it look like something so over on the left hand side here you have all of the

9:57

different elements as bubble calls them objects things that you can add to a page so the simplest one is this

10:04

category visual elements so for example i can just drag drag a text box on here we all know what text does so what i

10:11

want to do here is in this box up here i'm actually going to define what this text actually says so let's go with you

10:17

know the old programming convention and you know i can change the size of this box right here i can also do some other

10:24

things like change the style so how this text actually looks so you know bubble comes

10:30

with a whole bunch of pre-configured styles like this i actually have to drag it a little bit bigger um but what you

10:36

can also do is just click up here to not choose any style whatsoever and then you

10:42

kind of have more granular control over the particular text properties that you

10:47

like and you can actually create your own styles too right so your own um pre-configured templates for how

10:53

elements like this text should look and we'll get into that in a little while for now we just won't choose any style

10:59

at all so i'm gonna click preview again and that's going to reload this preview

11:05

page for us and here you can see okay this is exactly how we've defined our app so there you go your app is actually

11:11

out there in the world like if i sent you this url right now and made sure that this application was public you

11:16

would see this as well it is live on the inter web so that's text right and you

11:23

also have other kind of visual elements that you can add here so you know you can add a button

11:29

you could add an image and you can upload whatever you want to

11:35

actually be displayed within that image element here right so i'll upload an image

11:40

here bubble will upload that and then it will display the image and there's sort of some properties that you can use here

11:46

about the way that this image is displayed but this will sort of do for now so let's go back and and preview what this looks like so i could click as

11:53

i said i can click this preview button or i can just come right over to that tab as it existed before and just click

11:59

up on that top bar to see the new page and see what i'm doing here is i'm i'm more or less kind of like making a

12:06

change right making a small change to the the application and then i'm

12:11

previewing it to just see like you know did that work and that's a really good habit to be into obviously right now you

12:17

know we're only changing the appearance of tech so there's not much writing on on changing lots of things but when you

12:22

get into actually programming some complex logic you always want to sort of change one small thing and then test it

12:28

just to see if everything still works as opposed to changing a whole bunch of things all at once and then previewing

12:35

them all at once because then if there's a bug if something's not working as you expected you've got no way of knowing

12:42

what sort of action or change that you made in the application actually led to that bug it could have been any of the

12:48

changes that you made it could be an interrelation of the changes that you made so always good practice is to test

12:54

as you go make a small change test make a small change test um that's just a good sort of meta programming workflow

Collecting user input

13:01

okay so those are basically like some basic visual elements but let's think for a second here about what application

13:06

we're actually trying to build so it's a second-hand goods marketplace where people can upload goods that they're

13:13

selling and then get in contact with people who might want to buy that from kind of similar to how facebook marketplace works if you ever use that

13:20

so we obviously need some way for a user to actually input the information about

13:25

the products that they're selling right to tell our application hey i've got something to sell please display it to

13:31

other people in the community to add that kind of interactivity to our application we want to come down to

13:37

input forms okay input being the operative word here because we're taking

13:43

some value from a user they are inputting that information into our application so i'm just going to delete

13:49

these elements right here by clicking them and then clicking delete on my keyboard and i'm just going to add a

13:55

simple input over here if i just preview the page here just to show you how this input kind of works

14:02

out of the box right here's the input side kind of has this hover behavior we can customize this kind of behavior as

14:08

well by the way and then i can click into it and sort of start typing something and you notice how that sort of initial type here text disappeared as

14:16

soon as i started typing so this type here takes us what we call placeholder tags so it's text that's only going to

14:22

be displayed when this input actually has nothing in it and we can actually modify that

14:28

ourselves so we could say something like you know add your product name to kind of give a bit more of a specific prompt

14:35

to the user right so then i could add you know my product name maybe i'm selling you know

14:40

some nike shoes right and what i also might want to do just to make this kind of a little bit more usable is just add a text box up

14:48

here which is just a label it's just basically a label for this for this input okay and i have snap to grid

14:54

turned on so i'm kind of that's how i'm able to kind of adjust this text to be fitting right here okay and now we could

15:00

add some sort of other inputs too right like other things that we have we have like a multi-line input which is for

15:07

adding like longer sections or longer paragraphs of text we also have a drop

15:13

down where you can have your user select from a predefined list of options in our case right i think the next thing that

15:20

we want to take is the price for this product so i've added another

15:26

input here what i might just do is i might just copy this this label up here and use it again down here so what i can

15:32

do is i can just do the old control or command c and then v to create a duplicate or what i can do and i'm using

15:39

ctrl z by the way there to undo you also have the undo redo buttons at the top there what you can also do is just hold

15:46

down control or command on a mac and just drag on a particular element and

15:51

that will make a copy of it so here we might say price right and i might just

15:56

rename this to be name and another good habit that we want to do at this point

16:02

is actually name our inputs too so that we can easily identify them later so this input here is at the moment called

16:08

input add your product name it's just kind of taken that from the placeholder text so we might just want to call that

16:14

input product name so i would click up the top here to change that and this as

16:19

i said this is going to be really important later on when we need to actually reference these inputs when we need to find them so i'll do the same

16:26

thing here i'll call it input price should be input product price if i'm following the same naming convention

16:32

there and the last thing that we might want to add is a photo right allow users to upload a

16:39

photo of the thing that they're selling so here i can use the picture uploader element and drag that down here and then

16:46

i'll give it a label as well right which just says photo okay and our users can now click

16:53

this to upload an image following our good workflow we should preview that and we can see okay here's all these things

16:58

as they're appearing now this price one we might want to change a little bit because this is of course taking um not

17:04

necessarily text like we don't necessarily want to say type here we sort of want to kind of configure this in a way that's expecting you know a

17:11

currency a dollar input in in this particular case so we can actually change the content format of this inbox

17:18

here which is basically saying telling the input what type of value what type of information should it expect so we

17:25

can change this from text down to an integer and if i reload the page

17:30

then i won't actually be able to type in text here i'll only be able to type in numbers and that's really important

17:36

because that's going to allow us later on to actually manipulate this data okay we can't necessarily add five dollars to

17:44

a text value but we can add five dollars to a number value so we can do this kind

17:50

of manipulation that's dependent on the type of value but we can actually go one step further bubble gives us sort of an

17:56

extra option here which is called currency and that lets us kind of have this prefix dollar sign if i reload the

18:04

page here you can see the input when it's focused gets that dollar sign then we can add

18:09

our our value there so it's just sort of a helpful formatting but this is still ultimately a number value or an integer

18:17

value okay and that's important because we can't save necessarily currency

18:22

values into our database that's sort of our next step but we can save number values so behind the scenes what i'm

18:28

trying to say is behind the scenes even though this is currency okay this is actually just a number value bubble is

18:36

just letting us configure this input to treat it for formatting purposes as if

18:41

it was a currency all right so here's our sort of really basic form right i might add nike shoes i might say

18:49

actually they're gonna be a hundred dollars right i might upload an image there's my nike shoes but now what right

18:56

like our users now inputted this information and they obviously want that to be like saved to the app in some way

19:02

so it can be displayed to another user later on so we probably need kind of a button here because if i refresh the

19:08

page now that information's lost it's gone so obviously there's sort of like a next step here right we would have you

19:15

know from user experience point of view we're all familiar with this i'm sure having a button like this and we might

19:21

call this like add product and that would then complete this form

19:27

but now we actually need a way to actually save this information right what is going to happen when the user

19:33

clicks this button we need some instructions we need to program something into our application and this

Your Bubble database

19:40

is sort of a moment where i want to just move away from the computer for a moment and just talk a little bit about how our

19:45

database works because our database is where all of this information is going

19:51

to be saved it's essentially giving our application a memory so that it can retrieve information that's been saved

19:58

there and display that or do something with that data at a later time right so over

20:04

here we have our app here's our app right there

20:10

and in our app we obviously have this like name input right so this is a name field and

20:18

we also have a price field which i'm going to draw a little differently

20:24

because it's it's a number we're taking a different kind of value here and then we have an image

20:31

as well so these are kind of the inputs that a user can enter information into okay and now we actually need to kind of

20:37

take this information and save it somewhere so that where we save the information is the database so database

20:45

is commonly kind of drawn as like a big drum a big cylinder

20:51

here is our database and i want you to think about the database just like a big warehouse with

20:58

all these shelving units in it so we might have like a user's shelf right and

21:04

the only thing that's stored on that shelf is users we might have another shelf that's just for products right so

21:10

this whole warehouse is just full of shelving units and each shelving unit is dedicated to storing a particular thing

21:17

what comes to mind for me is if you ever watch you know like detective or police shows as the evidence room and in the

21:23

evidence room is all these different shelves and this shelf might be for drugs and this one might contain weapons

21:29

and this one might contain documents or melee weapons or or something of the

21:34

sort right so it's the same concept here basically is that we have different shelving units and each of those

21:40

shelving units stores different parcels or different boxes okay but all of the

21:45

boxes on a particular shelving unit are for the same thing okay so we got the users one and we've got the products one

21:52

so what we want to do ultimately is take this information that the user's inputting these sort of unorganized

21:59

values right there's this sort of one random name text value there's another

22:04

price value right if i just draw this obviously our nike shoes and this is 100

22:11

dollars and then here god i do not want to have to draw a shoe right now but here we go um there's our there's our

22:17

shoe um which looks more like an insect or a flying banana but rest assured it

22:22

is a shoe and this is of course a text field this is rather a text value this is a

22:29

number value and this is an image value okay remember so we want to take this information and package it

22:36

in our case we're just caring about products so we've got this product shelf and in our case actually there's nothing

22:42

on this shelf at the moment so i'll take all of this off right and then what we want to do is sort of take all of this

22:48

information and put it inside of this package this product package and then

22:53

store it somewhere on our products shelf okay so if i just blow this up a

22:59

little bit i've got sort of a larger version here right this is our larger version that we want to kind of put onto

23:05

the shelf this parcel this box that it corresponds to a product that is a

23:11

product in our database has compartments within it for each of these values right

23:18

so it's got right the equivalent of a name field it's got the equivalent of a

23:24

price field and it's got the equivalent of an image

23:30

field right so these individual kind of compartments or slots within the package

23:35

within the box itself one way to think about this is like if you buy a new device like a computer or an ipad then

23:43

in the box right there's usually like little compartments for all the little pieces right little compartments for the

23:49

wires and this kind of thing or if you're a board game geek like me then you know you have different compartments

23:54

within the board game box for all the different pieces right for the cards and for the dice and for the little you know

24:01

the little pieces everything like that it's all in little compartments so it's the same thing same concept here in

24:08

essence is that for each object that we're creating in the database right we

24:13

have these little compartments within it to house these different fields and

24:18

that's really convenient because then when we actually go to store this what we'll do is we'll grab a new empty box

24:23

off the shelf right we'll grab this empty box and we'll take the value that the user have has inputted into those

24:30

input fields and we'll store it here so we'll go nike shoes hundred dollars

24:35

and our image i'm not gonna draw it again but there's a there's a you know what i

24:41

can do i can do like a nike text something like that so that's what happens and then we're going to put this

24:46

guy right onto our product shelf so that we can find it later and we can do

24:51

something with it we'll get to that part in a moment so just making this concrete for a second let's go back into the

24:58

editor and i will actually create this new product in our database so what we

25:04

first have to do is go to this data tab and then configure the equivalent of

25:09

what this box should actually look like like what compartment should exist within a product data type or a box

25:18

right a package to store on top of the shelf because we're going to define kind of the template right what all of these

25:24

product data types should look like what are all the compartments that should be in every single product and then every

25:31

time we need to create a new product well then we just grab a new empty box off the shelf right we grab a new empty

25:36

box off the shelf and we put it onto the shelving unit we store the values in it and then we put it in the shelving unit

25:42

we put it into the database so let's start talking in the database lingo now so over here i would create my new data

25:49

type that new object that new thing to put on the shell so i'm going to call that obviously a product and now we have

25:57

this thing called a product and over here i'm going to define the equivalent of these compartments right what are the

26:04

fields what are the values that should live inside of a product so the first

26:09

one i'm just going to call name so corresponding to this over here and here we have to define what the type

26:16

of value is so this is really important because if i set this to a file

26:22

right then i wouldn't actually be able to save the equivalent of this because this is not a file format right like

26:29

different bits of information are formatted differently and that means that bubble can do different things with

26:35

them it can manipulate them in different ways so it's important that we define

26:41

what type of value each of these fields actually is because

26:46

the compartment size or the compartment shape is going to expect a certain type of value so in this case we want to set

26:53

it to be we see a text field and you can see that there's obviously a whole range of things here we've got a number one

26:59

numeric range date we've got a yes no which if you've done some other programming in the past you might be

27:04

familiar with as a boolean so it's just basically a true or false equivalent field and then some other stuff down

27:10

here file or an image which will just be a link a url pointing to where that file

27:16

or image actually lives where it's stored on the internet which may be in a database somewhere else so that's our

27:22

name field okay we want to also create one for our price

27:28

and that's a number and then we want to create another one for well we'll call it the photo

27:35

okay and we're just dealing with a single photo for now obviously your users might want to upload multiple photos but for simplicity we will just

27:42

deal with a single photo for now so that is adding that information now to our

27:47

database so now we have configured our product data type in the database and

27:53

now we have to do is actually do the equivalent of of actually getting the value from this input

27:59

and storing it within a data type in our database so that is some kind of

28:04

behavior that our application has to do and all behavior that our application has to do we're going to define here in

28:11

the workflow tab well at least most of it there's some stuff that you will define here on the design tab but for

28:16

stuff like this we're actually kind of taking information from our page and storing it in the database this is where

28:22

we actually come to the workflow tab so remembering that i've got this product

28:27

button here this add product button okay what i want to do is add what bubble

28:32

calls an event which is going to be triggered whenever that button is clicked okay so i'll follow bubble's

28:38

instructions here and click here to add an event and i'll come down to the elements section

28:44

and choose an element is clicked and here i will now choose from the elements

28:50

that i've defined on the page and choose the one that i want to attach this workflow to so of course that will be

28:56

the button add product now i've actually gone a long long way to setting this up it's the slow way a much faster way if i

29:03

actually remove this is from the element itself if you have the element inspector open you can just

29:10

click start edit workflow and that will just create that event for you it'll just create a this element was clicked

29:17

workflow for you okay so that's the event okay so now when this button is clicked this event will fire and we will

29:24

now have to define what are all the things that will happen when this button is actually clicked so those are called actions so

29:31

what we actually want to do here is of course create this new product in our database and save those fields to it

29:38

first section that we want to add we're going to go down to data things okay so this is sort of like the category of

29:45

actions that you can choose from and we're interested in data because we're saving stuff to the database and then

29:50

we're going to choose create a new thing so in bubble speak a thing is just an

29:56

object that you're going to now create and add to the database so create a new thing and now we're going to choose what

30:03

type of thing that we want to create and the option that we have here is a product you would have noticed just by

30:09

the way that when we actually defined our product here in the database right we already had a user data type here and

30:16

that is just a data type that comes out of the box with every bubble application right when you create a new application

30:22

in your database in your warehouse there will already be a shelving unit defined for users and that's because users are

30:29

just so central to every web application that bubble has just incorporated some out of the box functionality to handle

30:36

users that's what we're seeing here but now that we're creating a new thing right we're going to choose from all of

30:42

the non-user objects if we were creating a new user there would be a different action that we would actually choose and

30:48

it would be under account and then sign the user up that would be the action we would choose but we're gonna kind of

30:53

ignore that for now so now we're choosing the type of thing that we want to create so we already have that

30:58

product template sitting in our database right okay so now we're creating a new product every time that this button is

31:05

clicked okay so let's just see that in action like if i click over here

31:10

and i add nike shoes 100 i'll upload those shoes again and click

31:17

add product okay well we didn't see anything happen and if you're watching that first sort

31:22

of preamble section to this video you all know that's because we didn't set any kind of alert or indicators of the

31:28

user but we have probably just executed this workflow you know we clicked the button so in theory this should have

31:35

fired and we can actually see if it did we can go down to the data tab here and if we go over to app data this is

31:42

basically going to let us see all of the things all of the objects that live in our database so um kind of need this to

31:50

refresh for a second here and you can see so all i had to do was sort of click off of the products table or the

31:56

products view and click back onto it and now you can see here we've actually got one object in our database okay this

32:04

single row in this products table is corresponding to that button click that

32:09

we just did if i click this again haha we've got a second object you can

32:15

see there's sort of a slight difference in their created date over here so that's giving us a clue but you can see the fields are all empty right price is

32:22

empty name is empty photo is empty um i can actually click on this little edit icon to open up kind of the full view

32:28

here and indeed you know all of these fields are empty you may be able to guess why all we did

32:35

was we created a new product all right so we did the equivalent of kind of taking an empty box right and putting it

32:43

onto our products shelf but we didn't put anything into that box we didn't take any of these values and actually

32:50

route them into this new product object in our database

32:55

that is what we actually have to do via the set another field option here this is where we actually define

33:02

what of those values should be saved into the object so what i can do is i

33:07

can add sort of the option to add a field here and then i'm going to choose from the list of available fields on our

33:14

product object so again here's our product object right so i what i have to choose from are those fields that i've

33:20

defined already those compartments that i've defined within this product box um

33:26

so i'll start with the name okay and it's gonna say name equals okay so that's a great clue name equals so now

33:32

we're gonna say well what should that name value be set to right what should it be equal to and i could just type in

33:39

here you know my nike shoes 2009

33:44

and if i reload our preview it doesn't really matter what i type in here right

33:50

in fact just so that's clear i might even type like reebok shoes okay if i click add product now and i look into

33:57

our database i'm seeing my nike shoes so i've just defined some static value here

34:05

that it doesn't matter what input has been typed into these inputs here what value the user has defined okay the

34:12

value of every product that i create is going to be my nike shoes 2009. so that's not obviously very useful right

34:18

it's static information what we want to do is point this field to the input okay

34:24

so point this field to the input so that no matter what the user types in that's

34:29

what's going to be saved to the product so that's what we call a dynamic connection right it's a dynamic value

34:36

the value in the product will change depending on what the user has typed

34:42

into the input okay so what i want to do here i can insert dynamic data here i can first delete this and then click

34:49

insert dynamic data and insert dynamic data that is just the bread and butter of bubble that is just like the magic

34:56

kind of button you click that and now you can write an expression right this is where you're

35:02

actually doing programming you're not writing code but you're choosing options okay so the options that you have to

35:07

choose from here are um well lots of different things but what we're interested in are these inputs here so

35:14

this is where it was useful that we named these inputs before because now we know exactly which ones they are so we want to set the name value in our

35:21

product to be equal to whatever value is in that name input in our application

35:28

okay in our form so input product name and at the moment okay if i just click

35:33

off of that this red coloring here and this issue that we're seeing up the top

35:38

here this issue tracker okay that's telling us that this is not a valid expression as it is okay and the reason

35:45

is we can't set this name text value to be equal to an input it kind of like

35:50

doesn't make sense right it's like trying to say that i know the price of my shoes is anger i guess that makes

35:58

sense on a kind of metaphorical level but it wouldn't really make much sense if you're trying to go into the shop to

36:03

buy some shoes and the price tag said anger so this is kind of an invalid and

36:08

invalid thing i mean you might throw a tantrum and make it come true in the store but what we want to actually do is

36:14

make it literal so that a machine like our well the program that is our application which is just running on a

36:20

machine right which is stupid literally it doesn't actually have any intelligence of its own we have to tell

36:26

it literally everything that it has to do so we're not interested in the input itself we're interested in what's inside

36:33

of the input and that's what we mean by value here take whatever is inside of

36:38

that input the value inside of that input so that's what we're doing there and then we're going to do the

36:43

equivalent for those other fields too which is pretty self-explanatory so the price is equal to the input products

36:50

prices value and then we'll do it for the image right so or rather we call it

36:55

the photo so the photo is equal to that picture uploaders value there and so now

37:01

in theory this should be working so let's try it out okay let's say nike

37:06

shoes 2010 i'm not even really a nike shoes guy so i don't know what the brands are here let's say 150 dollars to

37:13

give it something a little different and i'll upload an image here and then i'm going to click add product

37:19

and we go now into the database we should see unless we do an entry here in

37:25

the database which is corresponding to the values that we just typed into the form all right so we've got our content

Improving the UX of our form

37:33

now been saved from that form into the database a couple little small ux things that we might want to do at this point

37:39

okay if i go back down to workflow right here i'm just going to add another

37:44

action here which is reset inputs and what that's going to do is once we've

37:49

clicked this add product button here then all of the values of these inputs are just going to be erased so that the

37:55

inputs are empty again and that reset relevant inputs specifically the inputs that it's going to reset are the inputs

38:03

in previous actions the inputs referenced rather than previous actions so these inputs here so again we're

38:10

going to follow our best practices we change one small thing so now let's now test it

38:16

okay i'm going click add product and wamblam there we go um those are reset

38:21

so we're getting some kind of visual indicator now right that stuff is happening and we might want to go even

38:27

one step further this is albeit an element that i almost never use but for

38:33

demonstration purposes it's quite handy is this alert okay so it's an alert

38:39

which i can tick to position it at the top it won't be visible when the page is loaded but what we can do is add another

38:47

action here which is going to show that alert and we can set in

38:52

milliseconds how long it's going to kind of fade in and stay on the screen and then fade out so if we reload the page then

38:58

we can see that in action what i actually want to do this time around i'm just going to add my details here

The debugger

39:04

t-shirt 30 i'll just add my shoes again because it doesn't really matter at this point i

39:09

want to actually draw your attention to this bar down here which is the debugger

39:15

which is if there's one thing more than anything else to take away from this video it is use the debugger the

39:22

debugger is your best friend when things aren't going wrong the debugger is the only person the only entity i should say

39:29

that you can really rely on so one thing that we can do is we can go into step-by-step mode and what this is going

39:36

to do is that when i trigger an event like clicking this add product button okay then it's going to let us cycle

39:43

through each one of the actions that's going to be triggered by that event one

39:48

by one and we can see what's happening inside of each of those actions at the same time so right now we're seeing okay

39:55

that event that button add product rather is clicked okay so now we're

40:01

going to see what happens next so we run next okay it's going to do this action create a new product and you can see

40:07

what the values actually are that's being set in that new product you can actually click into any of these sort of

40:14

blue highlight here and you can see okay what's the expression okay what bubble

40:19

here is calling the evaluator what's the expression that's actually leading to this value that's outputting this value

40:27

and this is the expression here it's input product names value and i can actually click there to

40:33

see what is the value of that input at this precise moment okay so you can do that for all of these and this url here

40:41

this is actually a url on bubble's own servers so bubble is actually hosted on

40:48

aws amazon cloud services so amazon's massive server warehouses that power a

40:54

lot of the web honestly they power bubble as well that's at least where a lot of bubbles um storage lives and

41:00

where your app storage lives and so this is just a link it's just a url to a precise

41:06

location on one of those servers okay so when we uploaded that image here in this

41:12

picture uploader okay that image was actually uploaded and saved to somewhere

41:17

on amazon's or rather we should just call them somewhere on bubbles servers and this is the location here so now

41:25

this product when it actually lives in the database this photo field technically behind the scene scenes is

41:31

just an address to a location on the server where the image file actually

41:36

lives and every time that you want to display that photo then basically your your application is going to look at

41:42

that address find the photo and then download it into your user's browser so

41:48

that they can view it but anyway that we're getting into the weeds a little bit there we're going to go run next now we're going to see okay reset relevant

41:55

inputs that's the next step if i click that presumably the inputs have been reset now as you can see and then

42:00

there's this last action here show message and the alert pop up so we're going to run that and you can see

42:06

there's that alert beautiful at the top of the screen so that's all you know

42:11

this workflow is doing all that any workflow is doing rather it's just a cascade of actions a certain event

42:19

happens and then in order all of these actions that you define are going to

42:25

trigger all right so that's all good and well we can now save data into our database but

Retrieving data from the database

42:31

obviously what we really want to do is retrieve that data from the database so go into our application's memory and

42:37

pull out some data to do something with it in our case to just display it we just want to take information that one

42:44

user has saved and display it out to another user so just coming back to our

42:49

trusty sketch pad here we're basically just doing the reverse of what we already just did so we've got the

42:54

database here inside of our database we have a shelf full of different products

43:00

and then we've got our application over here right here's our app and we basically want to now sort of take one

43:07

of these items off of the shelf okay and save display its information out on the

43:13

page somewhere okay so the way that we actually will do that is by routing the

43:19

values through some visual elements so we'll basically have like a text element here that's

43:26

going to display the value will have another text

43:31

element to display the number and then we'll have an image

43:37

element to display the image so that what we can ultimately do right for any of these

43:43

particular items here is just pull these values through onto the page we

43:51

need visual elements on the page as the conduits through which we can display

43:56

information out in the database so i'm just going to jump into the bubble editor and just show you how that looks

44:02

kind of in practice so i'm going to for this moment i'm going to go hold down control and just

44:08

select all of these guys here and just move them over to the left hand

44:13

side and we're actually able to group these as well but i'm gonna get to that in a moment okay and then just over here

44:19

on the right i want us to have some way of actually displaying this data back out to the database so if i've just got

44:25

a text field this is you know the simplest thing that you could do here okay this text field as you've seen

44:32

before can hold static values right so you could just type in here exactly what

44:37

you want it to display or you could insert some dynamic data okay so dynamic

44:43

data being data that's being you're looking somewhere else as to what

44:48

the data should be displayed and the main place that you're going to look very often is going to be the database

44:54

so to get into the database to basically we're at the moment where we're talking about this text field here for this text

45:01

field to be able to pull out an item here it basically we basically need to

45:06

tell it where to look okay we need to tell it hey come over here and look

45:13

into the database and find this guy and then pull this guy out

45:18

and display some of its value here okay so we're doing a a request essentially

45:24

to the database to retrieve some information and the way that you program that in bubble

45:30

is with this do a search for action so we're going to do a search for and

45:35

that's saying look in the database for a particular thing okay where do we want to look at what shelf in the warehouse

45:41

do we want to go to okay we want to go to this one the products okay the product shelf that's what we're looking

45:48

for okay and now we can also add some constraints we can say okay so what products should i look for okay you

45:55

could say things like look only look for products that were created within the last 24 hours or only look for products

46:02

that start with the letter d or you know any kind of search constraint like that only products that were created by a

46:08

particular user will kind of get into that kind of stuff in a little bit as well for now no search constraints so

46:13

this is just gonna look in the database and pull out all of the products that live there and then display them back

46:19

out to the user so we're gonna search for all products and immediately that's

46:26

going to be an invalid expression because what's happening there is we're actually pulling out like all the

46:31

products right and then we're trying to display them through a text element that doesn't really make sense we just want

46:37

to take one of them okay we just want one single item here so for sake of

46:43

clarity we're just going to grab the first item in that list okay so we're pulling out multiple we want to grab the

46:49

first item in that list of things that was returned from the database okay and

46:55

then we're saying okay well what field on that object okay i'm going to replace

47:00

it here which of these fields do you actually want to display in this text here because you can't display the whole

47:06

product okay you've got to choose what value you actually want to display so we're going to choose the name and just

47:13

before we do this okay i want to just make sure that we're cleaning up our database a little bit because we've got a couple entries here that don't have

47:19

any names on them and that's going to kind of ruin my demonstration here so anyway those are all our products here

47:25

with some kind of random names and i want to add a a sort by value here so i

47:32

actually want to grab the most recently created item in in the database so we'll go

47:37

we'll sort by create a date and then descending we will choose yes so that we're getting the most

47:44

recent at the top honestly this still confuses me whether it descending should be yes or no so

47:50

i hope that i've that i've got it right here um and there we go so there's our first value t-shirt so that was the last

47:56

value that we created so if i was to add something else here right if i was to add basketball i don't need to add the

48:02

other fields uh we're still on step-by-step mode so i'll turn that off and now basketball is

48:08

being displayed right and we can use the debugger here as well to make sure that this is actually working as we expect

48:15

i can go down to this inspect button here okay and that's going to let me choose any element on the screen i can

48:22

also search for them here and if i click on it it's just going to pull up kind of all of the properties

48:28

all of the values and settings for a particular element and anywhere there's

48:34

this blue kind of clickable text that's showing you that that's some dynamic information so you can click into it to

48:39

see what's the expression right what's the expression that's outputting this value and the expression is indeed the

48:46

search for products and we're grabbing the the first item in that list and then

48:52

just displaying the name there so you can see that that's working kind of as you would expect all right so now let's

Groups

48:59

say that we want to display the price right so what i could do is i could control drag on this to create a

49:05

duplicate and go first items kind of price but this is a little bit of a it's

49:11

a non-convenient way of setting this up writing this exp this whole expression

49:17

every time we want to be a little bit more elegant and so what i now want to introduce you to is the concept of a

49:23

group okay so just going back to our sketch for a second again instead of

49:28

grabbing one of these items and then individually writing an expression that's going to grab the text and then

49:33

for this element it's going to grab the price and then for this image element it's going to grab the photo et cetera et cetera et cetera what we want to do

49:40

is instead just put all of the elements that are corresponding to the same thing

49:48

in the database right all of these elements are going to be displaying the same product we want to put them all into a group so this is a group

49:56

and then instead of routing the value directly into a visual element like this

50:03

text field okay we actually want to pull the entire object right this entire

50:09

product into the group itself this whole group

50:15

is actually holding a entire product a group in bubble is what's known as a

50:21

container and containers can hold any type of value just like an element like

50:26

you know just like a text element can hold text and a photo element can hold an image a container can hold all of

50:32

those things too but it can also hold entire data objects so if i just delete

50:38

this delete this and come down here to this container section and grab a group

50:44

right and then i'm just going to format it in a way that where we can see it so i'll

50:49

give it a border okay you can see up here that we can set the type of content and that type of content could indeed be

50:56

you know a text or a number and there's there's times where you'd want to do that but in our case right we can actually set it to hold a product it's

51:03

essentially a product shaped container it can only hold products and now we can

51:08

tell it to actually look in the database find a product and then hold on to it for us when the page is loaded so the

51:16

data source for this product is going to be the same thing that we did for the text do a search for a product and we

51:24

want to make sure that we're doing that same sorting right and of course this is now invalid

51:31

because again we're trying to grab multiple products here and put them into a group that's only programmed to hold a

51:38

single product okay so we just have to grab the first item from that list or any item from that list right we also

51:44

have access to the last item we also have access to a random item or a particular item from a particular place

51:50

in the list but we will just grab the first item and now if we preview this

51:57

and we inspect our group here well you can see that it is in fact holding a

52:02

product it's holding the t-shirt product

52:07

and you can jump into the data source and see why okay so that's all working

52:12

perfectly we have this t-shirt product living inside of the group and all we want to do now is basically like cut

52:19

little slits into it essentially so that the values the fields within it can kind

52:25

of shine through right so that this stuff here the text value for the name and the price and the

52:32

image basically create little windows in the group so that those values can shine

52:37

through can populate uh the elements so as before we'll grab

52:43

for example this text element which is going to hold the name and we'll insert dynamic data and now we have access to

52:50

the super handy expression parent groups product so parent group meaning the

52:55

group that i am living inside of and since we're writing this expression from the point of view of this text element

53:02

okay the parent group is this group here this group product so we can grab

53:08

the product that's living inside of that parent group and then we can display

53:13

some value here and we're going to display the name and if i drag this down by holding down control

53:19

now we can just update this to be price and i'll use an image element as well

53:26

and instead of uploading a static image like we did it right in the beginning we'll insert dynamic data here for a

53:32

dynamic image and again it's parent groups product and its photo

53:38

and alas now our beautiful absolutely wonderfully formatted group here that

53:44

should win some design awards in my opinion is now displaying all of the values that we want it to so this is

53:50

working absolutely perfectly and if we wanted to kind of change which values were being shown here well now we

53:56

don't actually have to go in and edit every individual expression right and change the search parameters we can just

54:02

change it here at the group level so maybe we want to actually sort these by

54:08

um when the first one was created so show the the earliest first and our

54:13

first one actually doesn't seem to have a price field or an image field so that's why this information isn't

54:19

showing up but i think you get the picture so we can kind of change the search parameters at the group level and

54:25

then all of the elements inside will of course reflect whatever the new value of

54:30

the group is and just while we're here because we all pretty much always want to keep our elements in groups okay

54:37

because it keeps the page organized and it makes it convenient for us to have groups reference other groups and pass

54:44

information between groups which we're not going to talk really about in this video but good practice is to keep

54:49

yourself organized here so i'm just gonna pause for a second and look in this elements tree and you'll see this

54:56

is basically a list of all of the elements that are on our page right now and you can see we've got a bunch of

55:04

elements here that are all existing kind of at the same level in the in the page hierarchy

55:10

and then we've got our group product which we can open up and we can see okay here's all the stuff inside so we want

55:17

to keep kind of a good level of organization here otherwise things will get messy really quickly so what i can

55:24

do i want to group these guys the form elements within a single group so if i

55:30

hold down control and select all of these

55:35

what i can do is actually right click and then group elements and depending on

55:42

the structure of your responsive page you'll want to choose a particular one of these okay we're not going to go into

55:47

responsive design today because it's not really worth doing when you're just getting a handle

55:53

on the fundamentals of bubble but in our case we want to just put this inside of a fixed container so that's what it

55:58

should look like with a fixed layout group all right so we've seen how to pull a

Repeating groups

56:05

single product into a container okay but what if we want to display like an

56:11

entire list of products right so just like you know if you were going on to like the browse or

56:17

the search page of this website you'd expect to see multiple products not just a single product okay so for that we

56:24

need a different type of container right here we just have a standard group and a standard group can only hold one data

56:32

object or one data thing at a time what we need is an object that can actually

56:37

hold multiple what we need is something like this that this is sort of one formatting of

56:44

it that has rows okay essentially like a table and then when we look in our

56:49

products shelf when we look in the database and grab a number of different products okay well then we would

56:55

basically pull a product into each of those rows okay so that we could display multiple of them to the user so the way

57:03

that we do that in bubble terms is with something called a repeating group which

57:08

is very aptly named okay so repeating group is just a group that repeats or rather more accurately the right way to

57:14

think about it is more like a collection of groups all kind of stacked together

57:21

or grouped together at the repeating group level just like for the group we define what type of

57:28

content it expects right so this is a kind of an ongoing theme as you're adding elements and you're telling that

57:33

element you should expect this type of value okay whether that's like a

57:39

primitive value like text or an integer value or a yes no value or an image or

57:46

whether it's a data type value right like a shape that you've configured an

57:52

object that you've configured like a product so we always have to define that it's almost as if we're creating like a

57:59

product shaped hole and it can only accept products right if you try to put you know a

58:05

different object in there it just won't fit so we're expecting products and then the data source

58:11

we can again do a search for products in the database and i won't add any constraints here and i won't even worry

58:17

about sorting and this expression is now immediately blue because this is valid this repeating group is expecting

58:24

multiple products and this expression right now is returning multiple products when i say returning what i mean is

58:31

we're basically sending a request here to the database do a search for products and send me back everything that you

58:37

find and so what is being sent back from the database is what is being returned

58:43

that's sort of like the lingo in the programming space returned so searching for products we're getting multiple

58:49

products returned and if i preview this our repeating group is down here we

58:54

can't actually see anything in it yet okay but if i sort of click on one of these cells you can see okay well inside

59:01

this repeating group okay we're at the repeating group level here um there's the first product there's a second

59:06

product third four so there's there's definitely stuff in here okay the only thing we haven't done which you maybe

59:12

have guessed already is we haven't added any elements to actually display the

59:18

values within these products right we haven't added the conduits through which these products can really show

59:24

themselves so we will do something here we will add a big text field up the top maybe we'll

59:31

give it a little bit of formatting here as well and we'll insert some dynamic data and now we have access to this

59:38

expression current cells product so any repeating group which is just like a table right just like an excel

59:45

spreadsheet essentially um well a single column excel spreadsheet you have cells

59:51

and those cells are just the the subgroups right in the list so current sales product what we're going to do is

59:56

just define all of this at the first cell level here so i drag this text


PART - 2 

1:00:02

element down it's actually going to be replicated in each of these cells whatever i do up here is going to appear

1:00:10

in every single cell so that's the really kind of convenient thing about the repeating group is it just mimics

1:00:15

the same formatting throughout each of the rows or each of the columns depending on how your repeating group is

1:00:21

set up so when i choose current sales product name you can see well this is sort of being mimicked across all of those

1:00:28

groups and then if i take a look at our preview here you can see that is in fact how it is

1:00:34

appearing so this is sort of some really fundamental stuff here is displaying stuff in lists and of course right we

1:00:41

might want to also maybe i will bring this over to this side a little bit and call this the

1:00:47

price maybe make it a little smaller and

1:00:53

bring that guy over actually i'll bring him back and then add in an image here as well

1:01:00

an image here as well insert dynamic data current sales products

1:01:05

photo okay and there's our repeating group this guy doesn't have a a photo but all

1:01:12

the rest are displaying information just as we would expect so that's repeating

1:01:17

groups that's lists in bubble all right so we can now create and display these

Pushing data between containers

1:01:23

products but what if we want to let our users edit the products that they've created that's kind of like completing

1:01:29

the picture here is most applications you know let people add information we display that information out and we also

1:01:36

let users edit and delete the information that they've added so completing the picture here we want to

1:01:41

let our users be able to edit products that they have created so the way to do

1:01:46

that we basically want you know one way to do this is we've got this repeating group of products here what would be

1:01:52

cool is if we could click on one of those and that basically like displays a form from which we can actually edit the

1:02:01

content so we've already got a form here which is convenient

1:02:06

what i want to do before we kind of get too ahead of ourselves i'll create a new form which we'll use to edit one of

1:02:13

these products and then we'll actually combine that form the edit product form

1:02:20

with the create product form because they're using the same import inputs at the end of the day we don't really need to repeat ourselves here so we can use

1:02:27

the same form for both creating a product and for editing a product but

1:02:33

let's just jump into an editing mindset first an editing form granted that we

1:02:40

haven't really talked about users yet um but at the moment we're just going to let like anybody edit any product which

1:02:47

is obviously not like a super intuitive user experience but it's just going to at least get us familiar with the edit

1:02:53

functionality so what i might do i'm just sort of making this repeating group a little bit bigger to give ourselves a

1:02:59

little bit more room is just add a little button here a little button

1:03:04

that says edit okay and if we click that then we basically want to display a form

1:03:11

that's going to let us edit the product that's in this cell and where we want this form to live okay we could have it

1:03:18

live anywhere but just to kind of show you a little bit more about what bubble can do okay we're going to use a pop-up

1:03:24

right so a pop-up is a very special type of container that lives kind of one

1:03:30

layer above your page and isn't visible to your users until you show it okay so

1:03:36

we might call this the pop-up edit product and just like any container right just like we did with our first

1:03:43

group now and then we did with our repeating group okay we need to set the type of content here for this pop-up and

1:03:49

because it needs to kind of house a product that we're then gonna edit we

1:03:55

want to um set this to be a product type of container and we don't want to set

1:04:01

the data source okay the reason why we don't want to set the data source is because we don't know yet which product

1:04:07

we want to display in this pop-up setting the data source here is the equivalent of saying when the page is

1:04:14

loaded what product do i want to load into this pop-up but that's not the way

1:04:19

that we're loading content that's not the way that we're loading the product in this case we're only loading the

1:04:24

product when a user actually clicks on that edit button in one of the cells and

1:04:30

then we want to take the product from that cell and put it into the pop-up so that's user behavior right that's a

1:04:37

command that's going to happen when the user takes some action okay and that's a

1:04:42

clue for us that we actually want to use a workflow rather than this data source so we

1:04:49

actually want to use a workflow here and if i go back onto my page and click on my edit button this is

1:04:56

where we can actually program that initial event so when this button edit

1:05:01

is clicked okay we want to do a couple of things well one of the things that we obviously want to do is display that

1:05:08

pop-up so if we come down to element actions okay and we click on

1:05:14

show and then what we want to show is that pop-up edit product okay that's kind of

1:05:20

like one big piece that we need to do right out of the gate if i reload this and i click edit here

1:05:27

there our pop-up is appearing okay so the next step here is actually to put something into this product so just

1:05:33

jumping over i want to sketch this out again real quick we've got our repeating group of products here right

1:05:40

repeating group which i'm just going to abbreviate to rg repeating group of products okay with all these individual

1:05:47

rows and in each of those we have some different products right we have nike

1:05:53

shoes we have a t-shirt right we have

1:05:58

other stuff down here we want to be able to click on one of these cells and then populate i might use a

1:06:05

different color here i'll use a green for the pop-up okay this is our pop-up

1:06:13

all we're doing is this when one of these cells is clicked or rather when the edit button in that cell is

1:06:20

clicked we want to take the value of that cell and push it

1:06:26

into the pop-up okay that's all i wanted to sketch it's just really really simple what we want to do here so how do we do

1:06:32

that in bubble what we'll do is before we show the pop-up essentially we want

1:06:38

to display some data in it okay so that it's ready to go right off the bat we want to program this action here so how

1:06:45

do we do this action here well we want to add another action and i want it to be before this action so what i'm going

1:06:51

to do is right click and then click choose insert an action that's going to add an action previous to the one that i

1:06:58

had right clicked on and then we want to come down to element actions because what we're dealing with here is an element and then we have the option here

1:07:04

to display data and what this is asking us is what is the element that we

1:07:10

actually want to display this data inside of okay that's what this first part here is and we want to display it

1:07:17

in this pop-up pop-up edit product and bubble will know immediately that you

1:07:22

need to display a product type thing in here okay you can't just

1:07:28

display any old data because the pop-up itself is expecting a product

1:07:35

right so i couldn't for example i couldn't just use this for example current user that

1:07:41

doesn't make sense and we're going to get this kind of error here where the pop-up edit products content type so the

1:07:48

type of content that it's expecting is a product but what you're trying to put in there is a user so anytime that you see

1:07:54

these kind of like hints when you're learning bubble in the beginning it's just just read them pay heed to them they're going to tell you what's

1:08:01

actually going on and they'll give you an option here to resolve it by changing the content type of that pop-up to a

1:08:07

user but that's not what we want we want it to be a product we just need to change our expression so what we

1:08:13

actually should be choosing is this current cells product and by current

1:08:18

cell okay this is referring to the cell in which the button was clicked okay so

1:08:26

that's kind of a critical thing to point out is that any time that you're launching a workflow by clicking on an

1:08:35

element okay you're going to be able to have access to the parent group of that

1:08:41

element and in this case the parent group is the cell it's the repeating group cell so

1:08:46

that button here's the button here was clicked and it's inside of this cell

1:08:53

okay so we can actually take the value of that cell so current sales product current cell again

1:09:00

from the point of view of the element that was clicked which is the button in this case and then we could actually

1:09:05

choose a field here but we don't want to because we want to display the entire product we can take one of its fields

1:09:11

later and display it through a text element but for now we will just want just ship the entire product into that

1:09:17

pop-up and what i'll do just so that we can see this working right off the bat is grab a text element here

1:09:24

and dynamically display that parent group's product so the product in the pop-up display its name

1:09:33

and now if i refresh the page i click over here nike shoes boom there it is in

1:09:38

the pop-up nike shoes or t-shirt there we go t-shirt is now in

1:09:44

the pop-up okay so now we could just replicate this form all right i could

Editing data things

1:09:49

literally just if i delete this i'm just going to take this entire form here

1:09:54

copy it with ctrl c and then go into my pop-up edit product and paste it and i want to actually make

1:10:01

it horizontal so i'm going to right click center horizontally and then instead of adding this product

1:10:08

right because this is an edit pop-up after all okay we should actually make this an edit product

1:10:15

so now what you would expect of course is that these inputs should be

1:10:20

pre-populated to whatever that current products values are okay so we can kind

1:10:26

of see what was there and then change it at the moment right even if we click

1:10:31

this and if i go inspect and look at this pop-up yeah it does have the

1:10:36

product that we're expecting okay but we kind of want i want to see the current product's name in here i want to see

1:10:42

nike shoes i want to see the price 100 right i want to see the image here so that i can change it i can see it and

1:10:48

then change it so every input gives you the ability to display some initial

1:10:54

content okay so when that input is loaded it's rendered okay what is the content that should just already be

1:11:00

existing in there when you're creating something from scratch like we were with this original form here you don't want

1:11:07

to set the initial content all right we're creating something from scratch it doesn't make sense to have an initial content in there but now that we're

1:11:14

editing something okay this is where initial content is really kind of critical for the user experience so in

1:11:21

here i can insert some dynamic data and what i'm actually seeing here is i can

1:11:26

choose the parent groups thing and to me that's a clue okay parent group's thing that means that the parent group doesn't

1:11:33

actually have anything set and in fact bubble is asking me to set it here so this form that i carried across right

1:11:40

which i might just call edit inputs for clarity doesn't have a type of content itself

1:11:48

okay so i could actually set this to be a product and then as the data source

1:11:54

i'm going to choose the parent groups product so remembering that this group edit inputs is inside of the

1:12:00

pop-up it is inheriting the product from that pop-up and then these inputs can

1:12:07

then pull through the value from the group so just coming up to our diagram again here's our pop-up here's our edit

1:12:14

group right here's our edit inputs group so what's happening is the value of

1:12:21

one of these cells in the repeating group is being pulled through into the it's been pushed rather into the pop-up

1:12:26

via a workflow and then this edit inputs is grabbing it from the pop-up level

1:12:33

and then any inputs actually inside of here are grabbing it

1:12:40

from this edit inputs group so we're just passing data from one group to

1:12:46

another from one container rather to another all these repeating group or a

1:12:52

group or a pop-up they're all containers right they all hold data and so um what

1:12:57

we need to be doing is playing past the parcel with one container to another and to maintain that sort of dynamic

1:13:04

link in our logic so this pop-up's having its value set by a workflow and

1:13:10

then this edit inputs is just pulling that data from whatever the pop-ups

1:13:16

value is okay so this is basically an expression that's just you can think of it as running all the time it's

1:13:22

constantly looking here okay what's the value what's the value what's the value what's the value and if the value here changes

1:13:28

then the value inside of this group changes so now that we have this parent group of

1:13:34

the inputs set up now inside of the input itself we can

1:13:40

have access to the parent groups product and then we can choose the value that we want okay so in this case the name and i

1:13:47

can do the same thing down here the parent groups products price and then i can do the same thing here

1:13:55

with the photo all right now if i click edit boom there

1:14:02

we have it all of that data is loaded and i can sort of just like oh you know what i missed up the year was actually

1:14:09

2009 which in theory should make them even more valuable now uh so that's all

1:14:15

that's set up now we have to set up a workflow to actually edit the stuff okay what this edit product button should do

1:14:23

so let's go back click on edit product and this is we're going to choose start edit workflow so

1:14:29

that we automatically attach a new event to this button and

1:14:34

have a little think here maybe this is a good time to pause the video and just try and figure this out for yourself if you've got this far if you've been

1:14:40

building along just try and figure this next part out for yourself what we're going to do if you are ready to go is

1:14:48

come down to this data section because we want to make changes to a product in the database our app is pulling out some

1:14:56

product from the database and then it's making some changes to it and then it's sending it back in essence so anytime

1:15:04

that we're dealing with the database we want to be talking uh we want to be using this data section and then we have up an option to make changes to a thing

1:15:12

so that's what we're going to choose make changes to a thing and what's the thing that we want to to change the

1:15:17

parent groups product okay so parent group remember this expression is from the point of view of the element that

1:15:24

was clicked the element that was clicked was this button edit product which is living

1:15:31

inside of this group edit inputs okay and that group edit inputs is housing

1:15:36

the current product that we're looking to edit so in theory right parent groups product is going to be that edit inputs

1:15:44

group so we're going to get the product that we're trying to edit that's that is uh what we want and now we can choose

1:15:51

okay what should we set all those fields to right what changes should we actually

1:15:56

make so we can set all these things to be to be something new right again i could just type some new value here

1:16:04

okay but obviously that's not what we want it's not dynamic we want dynamic data not static data

1:16:10

so the answer here is just to point in fact we want to point this to

1:16:15

the inputs in our group edit pop-up however we haven't renamed our inputs

1:16:21

here so we actually have two edit product names we've got an input product name here in the edit popup and then on

1:16:27

the page we've got an input product name so now that we're coming to do our workflow

1:16:33

input product name input product name which one is it okay so this is a good example of why

1:16:40

naming your elements is really important really important so pop-up edit product we might want to

1:16:47

call this input edit product name okay

1:16:53

input edit product price picture uploader edit okay now if we

1:16:59

come back to our workflow okay we can actually see this is in fact the input that we want to set it to

1:17:07

so setting the value there so that when this button is now clicked

1:17:12

okay it's going to save the value of the input here

1:17:17

to the product's name field so that's the way that we edit stuff

1:17:23

so i'll do the same for the photo right picture uploader edit

1:17:28

and i'll do the same for the price it doesn't matter what order you you put these in by the way

1:17:34

it'll all get executed by bubble instantaneously essentially so we make changes to the

1:17:40

product and then from a user experience point of view right we might want to then um hide the

1:17:47

pop-up right hide the pop-up edit product and now let's see if this actually works

1:17:55

so i'm going to click i can choose 2009 right i want them to be a bit more valuable so rather they were 2010 now we

1:18:03

want 2009. that's going to bump up the price to 200. the photo will will keep

1:18:08

the photo the same and then we'll click edit product okay and you can see

1:18:14

it changed it changed here in the repeating group and it changed if you go into the database

1:18:20

and you click refresh data down here it changed here too which is exactly what we would expect

1:18:25

because this is where the data is kind of living actually in the database and this repeating group here on the

1:18:31

page is just retrieving the data from the database again anytime that you are

1:18:36

setting the data source okay like this search for products just think of this as a command that is

1:18:43

constantly being fired so search for products search for products search for products search for products and if

1:18:49

anything changes in what's returned from the search then it will be reflected

1:18:54

in the container doing the search or the element doing the search so that's why we could kind of see it being updated

1:19:00

here in real time we didn't need to do a page refresh or anything of that nature all right i want us to start to do

Combining our edit and create forms

1:19:07

something a little bit more ambitious here okay we don't want to be doubling up here

1:19:13

with this pop-up edit form okay and we also have a create form and they have exactly the same inputs

1:19:20

and this is violating something that we'll talk about a little bit more about later on but is violating what we call

1:19:26

the dry principle the do not repeat yourself principle which is a good principle to keep in mind when you're

1:19:31

programming if you repeat yourself then you are increasing the chances of introducing some bugs into your code and

1:19:38

you're also making it really hard to maintain your application over time that

1:19:44

might sound a little abstract right now but this will hopefully make it a little bit more concrete and more the more

1:19:49

examples that we that you see over time um you'll realize the value of this so at the moment we're repeating ourselves

1:19:54

if we wanted to change the look of one of these inputs right well we do have styles which we haven't talked about yet

1:20:00

but if we wanted to change something here even change the the placeholder here you know then we would have to

1:20:05

change it also in the pop-up edit product form so let's actually just use

1:20:12

this single form for both editing and creating new products

1:20:18

how do we do that well what i want to do just right out of the gate is i'll just delete this form because it's not super

1:20:25

important and drag out this repeating group and now in essence what we want to do is when this

1:20:31

edit button is clicked right instead of pushing the value of the cell into that pop-up we push it into this form okay

1:20:41

but you might be thinking i mean that form is is for creating products so kind of how do we make it do both it is a

1:20:48

little bit confusing the first time that you deal with this right so the first step that we could do

1:20:53

here just to kind of get our bearings okay is actually set this group which

1:20:58

we're going to call the group add slash edit product okay and set it

1:21:04

to be of type product okay just like we did with the the pop-up edit form and

1:21:10

this workflow here we now want to change so that instead of displaying the data

1:21:16

in the pop-up we actually display it in that add edit product group instead and

1:21:22

we can remove this as well and at this point we could also

1:21:28

set the initial content for these inputs okay and the reason that this is going to

1:21:33

work even for creating a new product and editing is that unless

1:21:40

this edit button is clicked there isn't going to be any value here in this group

1:21:45

it's going to be empty so we could easily set the initial content here to be the parent group's product's name

1:21:51

just like we were doing on their edit form right parent groups products price

1:21:58

and the parent groups products photo okay and if i load this right

1:22:03

it'll actually look just the same as before right i might add here digital camera i'll just clicked tab there to go

1:22:10

down to the next input make it 400 and upload it here

1:22:16

and then i created a new product now it's not appearing here in my repeating group why well if we come down to our

1:22:24

opinion group we see we've got a fixed number of rows we're only showing four rows so we don't want that actually

1:22:31

we want many different rows and you can see that this minimum height of the row is

1:22:36

actually giving us some issues here because this line here you can see there's sort of a bit of a weird overlap

1:22:42

so we might just want to make this a little bit bigger 150 pixels would probably do it

1:22:49

and now if we preview the page we're kind of giving some more space here and we can

1:22:54

and we can scroll so that's working great we can see that we've created that digital camera so this is still working

1:23:00

even though we set up that edit kind of functionality this is still working however now let's see what happens if we

1:23:06

click edit boom now we've got a value in here and we could do this for any of these right

1:23:14

boom so it works to create a new product okay and we can get a new product kind of in

1:23:20

here but now if i click add product if we do the step by step

1:23:26

we're creating a new product again another digital camera and i only have

1:23:31

one of them so this is a problem because um i can't sell two things of something i only have one of

1:23:38

so if i refresh this data in the database you can see we've got two digital cameras so this is a problem

Only when rules

1:23:44

we don't actually want to create a new product every single time that button is clicked sometimes we want to edit the

1:23:51

product that's already in there so let's just think about this for a second we've got this form

1:23:57

here okay with a button

1:24:03

here okay and some inputs right some inputs

1:24:09

now at the moment when this button is clicked we're launching this workflow which is

1:24:15

to create a new product that's fine we also

1:24:21

want to launch a workflow where we edit a product okay

1:24:26

and since we have the same element triggering two different things okay we

1:24:32

need to have some conditional rules right we basically need to say the equivalent

1:24:37

of if there is an existing product right in the form right if that's true

1:24:47

then we want this to fire if it's not true then we want this to

1:24:52

fire okay so in bubble how we would do that is i'm just going to delete my popup

1:24:59

edit product because it's going to confuse things is we've got the single event to add a product and we actually

1:25:06

want to add another action here if i insert an action and that's going to be

1:25:12

i'll make changes to a thing action and the thing that we want to make changes to is going to be parent groups product

1:25:20

okay and we would set this up just as we did before right to be taking the value of those inputs

1:25:28

the inputs that the form is is also using when it creates a new product

1:25:36

right the price okay okay only now you can imagine well

1:25:41

this is a problem because first it's going to create a new product and then it's going to make changes to a product

1:25:48

if it's in the form and then it's going to do these things these things are fine these things are kind of what we want

1:25:53

however we don't want both of these to fire so what we actually want is an only

1:25:59

when condition here that's the equivalent of writing this rule or this conditional

1:26:05

conditional rule here so and only when rule we only want a new product to be

1:26:11

created only when that parent group's product so the form right the container

1:26:17

that's holding those inputs when it is empty

1:26:22

is empty okay because of course on page load right now it is empty okay there isn't

1:26:30

anything in here as soon as we click edit well i'll i'll click inspect here and you can see for yourself right it's

1:26:36

empty there's no product in this container it's empty but once i click and click edit and we've pushed a value

1:26:44

into that group well now it's no longer empty now it has a product so you can guess that the

1:26:51

inverse condition is what we would want over here right only when the parent

1:26:56

group's product is not empty okay in that case we actually want to make changes to the

1:27:02

product in that group and the alert the last kind of thing is the alerts we can actually change the alert message here

1:27:09

you know depending on whether a product was added or created i'll get to that in a minute i think let's just test

1:27:16

this functionality out for now so let's just add a new product for

1:27:21

example right maybe we've got a lawnmower to sell 160 dollars

1:27:28

all right there's our lawnmower okay let's do the step-by-step i'm gonna click add product okay that

1:27:35

button and product is clicked okay next step create a new product okay

1:27:42

we only want that to happen when the parent groups product is empty so here's that condition that only when condition

1:27:48

and since it's highlighted green that's telling us that the condition is true okay the answer to that condition is yes

1:27:54

the parent group's product is in fact empty is empty is yes okay so that's all

1:28:00

great and then if we run next the next action which is going to make changes to the product

1:28:06

well that's highlighted red because it's not true there isn't any product in this

1:28:12

form yes there's values in the inputs themselves right but we haven't actually

1:28:17

pushed a product into that underlying group okay which we would have been

1:28:23

doing by clicking this edit button okay so this make changes is not going to fire and then reset out relevant inputs

1:28:30

and show the message that is going to um to then fire however now if we come back

1:28:36

to our nike shoes and i've recently found out actually these are 2005

1:28:42

which is probably going to double the price at least to my logic and we go step by step

1:28:48

now will we create a new product no we won't because that parent groups product right

1:28:55

the the input form group the container for all these inputs

1:29:00

it has a product in it is empty is equal to no all right there is a product inside of that container so

1:29:07

then we move over to the next action which is evaluating to true because there is not

1:29:13

um well rather there is a product in that group so is not empty is evaluating to yes okay

1:29:20

and now you can see that we've made changes there and so the last thing here is that is that alert that i've just

Yes/no statements formatted as text

1:29:26

showed you so i actually click change the alert message so we want this alert message to display something different

1:29:32

depending on whether there was a product being created or whether we were editing a product so we can use the same kind of

1:29:38

only when logic i'm actually going to add in the the expression here so parent groups

1:29:45

product is empty okay and at the moment this would just say yes like if i

1:29:51

if i just click add product here okay it's just evaluating to the value of that expression which is yes what we

1:29:58

actually want to do is we can come over here and go formatted as text we can actually give a value a text value to be

1:30:06

displayed if this expression is true right so if the product is empty and we can give another one if it's no okay so

1:30:14

if it's empty in that case right we're saying that the product was created

1:30:19

and if it's not empty then we're saying that the product was edited okay like i

1:30:25

said this is sort of like intermediate level bubbling here but pretty simple to get your head around and and can be

1:30:31

really really powerful way of of adding some nice ux to your site so if i add a new product here what's another product

1:30:37

that i can think of maybe an ipad you know it's secondhand so i know they're

1:30:42

still pretty expensive i'm gonna upload okay and then if we click add product

1:30:50

boom product created and let's say i want to edit my t-shirt no

1:30:56

one's buying it so i'm going to reduce the price a little bit

1:31:01

and let's run through this step by step we already know what's going to happen for these actions and if we come over to our show alert

1:31:08

and we can see that the the option is product edited because we have this this formatted as text expression here where

1:31:15

the the parent groups product is not empty and if we format that no as a larger text string then what we're

1:31:22

getting is product edited so product edited is what we're going to see up the top

Pages

1:31:28

all right now our page is looking a little bit crammed in most applications that you're going to build you're going

1:31:33

to have the concept of pages right you're going to have different content that's living on different pages in your

1:31:39

application so let's do that right now at the moment we've just got this single index page

1:31:46

but let's actually split off some of the content here so we'll keep the index

1:31:51

page as kind of like a home search page right where we can just sort of like list all of the goods that people have

1:31:58

listed for sale and then we'll have sort of like a create a product page where

1:32:04

we'll actually put this form here so if i just go up to my page

1:32:09

drop down here this is where you can add new pages so add a new page here and i

1:32:15

will call it the create page and i can actually choose one of my existing pages to duplicate

1:32:22

but in this case we will just create a new page from scratch once you're on the page okay as before because at the time

1:32:29

i'm recording this the new responsive engine is still in beta i'll have to go in and upgrade the page to the new

1:32:35

responsive engine not that that's making a whole bunch of difference for us right in this practice app because we're only

1:32:41

dealing with a fixed width page right so our page is fixed with so this is our

1:32:47

new create page and now i want to go back to my index page and i actually just want to bring this across one way

1:32:54

that you could do this is actually by going right click and copy with workflows and what that's

1:33:02

going to do is it's not only going to let us copy and paste this content but any workflows attached to that group

1:33:10

so this add and slash edit uh product group are

1:33:15

also going to be moved over so this is definitely going to break our our edit

1:33:20

functionality but that's okay this is mainly for demonstration purposes so fully okay with that so i've copied with

1:33:27

workflows that group and over here i'm going to paste with

1:33:33

workflows okay so that's our add product page right there and as usual we should

1:33:40

test that this is still working so if i just add sort of another lawnmower let's

1:33:46

say it's a cheaper model and if i now add this

1:33:52

just check in my database all products cool we've got another lawnmower so that

1:33:58

form is still working what we also have is an issue that we've seen to have introduced so any time that you have any

1:34:05

illogical statements in your application or anything that's kind of broken bubble

1:34:11

will flag them to you so right here if i click on it it'll take us to the element in question it's saying that um we can't

1:34:18

actually show this alert product created anymore because actually we're on the

1:34:24

create page now and that alert we didn't copy over from the index page so i

1:34:29

actually don't have the option here so i'll just fix that by coming over back to our index page and

1:34:38

i'll grab that alert and i'll actually cut it so i'll control x on my keyboard come over to the create

1:34:44

page paste it back in you can see it's a different width there that's because our

1:34:49

index page is actually 1080 and the default width for our new create

1:34:56

page is 960. so i'll just bump that up to 1080 again i don't want us to be dealing with responsiveness if this was

1:35:02

responsive then we would make sure that no matter what the page size was that these things would appear appropriately

1:35:09

but as i said we're going to deal with that in another video so there's our product up the top um

1:35:15

and it looks like it's automatically reconnected itself right there so the alert has just gone

1:35:21

away so that is awesome and then over on our index page we can actually delete

1:35:27

this now and move this over here and now this edit

1:35:33

button has actually had that workflow attached to it edited so that that action that was

1:35:40

going to be displaying data in that form pop-up rather in that form group has now

1:35:47

been removed so let's just let's just remove that edit button for now because that's not the functionality that we're

1:35:52

that we're looking to build so now we have two pages in our application right um the logical thing that we want to do

Inter-page navigation

1:35:59

allow our users to do rather is to move between pages right so the most common

1:36:04

user experience that we are all used to is having some kind of

1:36:10

header right so i'm going to drag a group up here to act as my header

1:36:16

and i'm going to just change the style to be a group border so it kind of sticks out

1:36:22

a little bit and what we can do is we can have some buttons up here that

1:36:28

navigate the user to particular page so we might have a button here in the right

1:36:33

hand side which is called create a product right create a product and in

1:36:39

this case what we want to happen is when this button is clicked we want to actually take the user from this index

1:36:44

page and put them over onto the create page so i'm going to start edit workflow

1:36:51

and an action and the action that we're actually looking for is under this navigation section so anytime we're

1:36:56

dealing with moving the users around through multiple pages then we are

1:37:01

talking about navigation and specifically this go to page action so

1:37:06

this is going to let us choose where in fact we want to send the user to so i'll send them to the create page these pages

1:37:13

by the way this reset password and this 404 page are default pages that bubble

1:37:18

gives you out of the box resetting passwords is sort of bubble has some built-in functionality for

1:37:23

doing that that includes this reset password page we're not going to go into that today but feel free to look up in

1:37:29

the documentation how that works and this 404 page that's what will be displayed if your users try to go to a

1:37:35

page that doesn't actually exist they will end up on the 404 page which maybe you've done in the past and your

1:37:41

internet wanderings ended up on a 404 page and then you'll know what i'm talking about so anyway setting the

1:37:47

destination to the create page we can ignore all of this this would become relevant if our page had a data type

1:37:56

because pages themselves if i go to this create page and just double click here to open up the

1:38:02

inspector on the page pages themselves can have a type of content so pages are

1:38:09

just another container just like we've got groups and repeating groups and pop-ups and got a couple of others here

1:38:14

that we haven't talked about today pages also act like containers for data

1:38:21

in our case we don't because the create page doesn't have a type of data then

1:38:27

we don't need to worry about the data that we are sending we're just moving the user from one page to the other so

1:38:34

now if i go and preview this okay here is our header up on the top in fact i

1:38:39

might just make it a different color just to stand out a little bit maybe a

1:38:45

sort of a dark blue like that right now if i click create a product

1:38:51

here we are on the create page so obviously we want to do sort of the equivalent right on the create page if i

Reusable elements

1:38:58

just extend my page height here a little bit make it 800

1:39:04

okay and then i'll drag this form down a little bit to give us some room and center it horizontally and now i could

1:39:12

create a new header right i can go group and put a new header here and

1:39:18

pretty quickly i'm feeling like this is a bit tedious actually because okay well let me make sure i've got to

1:39:24

set it to be the same color same color and then i want to get the

1:39:30

button and i want to get it probably in exactly the same place because i want to look i want to look exactly like this so

1:39:38

isn't there a way maybe i could just copy this right i could just copy this over and let me see okay i've just copied it

1:39:45

over um this is the creator product i'd probably want you know another button to

1:39:51

take the user back to the main product page so i add a browse button but now my

1:39:57

first header on the index page now this one is out of date i know i need to create a button here so what i'm trying

1:40:03

to do here is set the scene for the need for what bubble calls reusable elements

1:40:09

elements that you create in one place and then you can add them to multiple

1:40:14

parts of your application so you're basically creating like a master template that you can then distribute

1:40:20

throughout your application so back to our trusty little sketchboard for just a moment pretty simple concept reusable

1:40:27

elements so over here we have our browse page which in our app is called the

1:40:33

index page right and over here we have our create page

1:40:39

now a reusable element is something that we're going to define as if it was a page okay so we could

1:40:46

have over here our header which is a reusable element which we basically define as if

1:40:53

it was a page so it exists independent of any particular page and now we can

1:40:59

add this particular reusable element to any of our particular pages

1:41:06

but we're not really putting the original reusable element we're just putting an instance of it okay it's as

1:41:13

if this is sort of the master template so if i was to make changes to that

1:41:18

master template like if i was to add a button here then those changes would propagate

1:41:25

through to all of the instances of the reusable element okay so in that way we can just

1:41:32

make changes and maintain one element in one place and have those changes be

1:41:39

reflected throughout our entire application so that's all really a

1:41:44

reusable element is super super powerful concept so how does it actually look well let's jump into the bubble editor

1:41:51

and actually create one ourselves all right i'm going to delete this header that i just created and i'm going to

1:41:57

come up to the page and add a new reusable element so the

1:42:03

user element is going to be called a header and i'm going to create it from scratch

1:42:08

here again just like for pages right we need to do this upgrading to the new

1:42:13

responsive engine which you won't need to do if you're watching this after the new engine is out of beta

1:42:20

okay so here is our basic layout for our header i want to

1:42:25

make sure that we're dealing with fixed width again because i don't want to worry about responsiveness and i'm just

1:42:31

going to make this the same size as our canvas and i probably only need to make

1:42:36

this about let's call it 80 pixels high okay so this is our reusable element

1:42:42

and like before i can change the color to be kind of like a dark blue

1:42:48

and i'll add a button which is going to be create a product right and maybe i'll

1:42:56

have a different type of button here see what bubble offers me okay that light one is probably cool we probably

1:43:02

want to define our own button styles our own button looks but for now this is this is fine now

1:43:08

if i go to my index page and i scroll down here there's the section called

1:43:14

reusable elements and in fact you can see there's two headers and that's because bubble actually gives you a

1:43:21

header out of the box so this is my header this one with the lower case which i should probably

1:43:27

rename to to matt's header let's call it just so that we can differentiate

1:43:33

but um yeah bubble just trying to help you out it already has some predefined

1:43:39

header formatting for you this is how the bubble one looks so you know pretty nice right out of the

1:43:44

box it does what kind of we need it to do but let's not get ahead of ourselves let's

1:43:50

keep things slow and drag in our own header where we know kind of how it works so we've got that here on the

1:43:57

index page and now we can go over to the create page delete this

1:44:02

and add our header there as well and

1:44:08

now if you look on our create page there is that header it's a reusable element so

1:44:14

if i try to edit this right i can't i actually have to click edit element or

1:44:20

come over to it in this page tree here open it up and now i can kind of change

1:44:26

and edit this actual header so just take note here we've got this one button

1:44:32

create a product if i control drag on this button to make a new one and call this browse

1:44:39

okay and then i refresh my preview you can see that now the header has been updated

1:44:47

here as well so these changes will propagate through to any instance of

1:44:52

this reusable element anywhere that we've put it within our application so then we can attach our actual uh

1:44:59

workflows to these buttons right so we've got a navigation action here which is going to say go to page we'll go to

1:45:05

the index page in this case for the browse button and for our create a product

1:45:11

we're going to go to the create page

1:45:17

the create page and this is now going to let us have this way for our users to

1:45:22

navigate from one page to the other so we're on the create page let's go to the browse page we're on the browse page

1:45:29

let's go to the create a product page so there you go there is reusable elements in nutshell pretty simple concept but

1:45:36

very very powerful wherever you can you want to be building in reusable elements

1:45:42

you want to be building things in a modular way that's going to keep your

1:45:48

application really clean and really what we would call maintainable so it's going

1:45:53

to be easy for you to make changes later on because there isn't this kind of convoluted spiderweb of logic you've

1:45:59

created like this module that stands apart independent of everything else right i can define a header define all

1:46:06

the logic for the header within this run reusable element that i know works and then put that kind of all around my

1:46:12

application so i can kind of siphon that off as like a self-contained

1:46:17

unit of logic so to speak that i know it is working all right now i've avoided

Users

1:46:24

talking about users up until this point but this is the right time to introduce them because users are such essential

1:46:31

concept for every application that you're going to use virtually i mean you there might be some applications that

1:46:37

you're building where you don't have your users interact at all it's just some back-end um tool that you are using

1:46:44

but nonetheless they're sort of unavoidable in the bubble universe and most of your applications are going to

1:46:50

have some kind of user interactivity so that's why bubble has them existing out

1:46:56

of the box so you have this user data type here and one really cool thing about users is

1:47:03

that any other data object that's created in your database is going to have this

1:47:10

created by field here and that created by field is going to be populated by whatever user was logged into your

1:47:18

application at the time that that product was created so at long last let's actually kind of

User sign up

1:47:24

get into the meat of this okay we want to have in our header okay i'm not going to use the bubble predefined header

1:47:30

because it's kind of cheating we want to have kind of like a login button so i'm going to i'm going to drag

1:47:36

these move these buttons over a little bit and maybe make this one a different color

1:47:42

okay and call this sign up or log in okay this is where we would typically

1:47:49

want to display after clicking this button display a sign up form or a login

1:47:55

form to the user and this is something that bubble actually gives us out of the box as well we've got the sign up login

1:48:02

pop up here got a bunch of handy logic kind of built in now you may have noticed it exists as a reusable element

1:48:09

right the sign up login pop-up is a reusable element and i'm still in the header here i'm installing my reusable

1:48:15

header so i've just copied one reusable element inside of another visible

1:48:20

element and that's something that you can do too you can nest reusable elements inside of one another in our

1:48:26

particular case we're probably not going to do something like this on our index page

1:48:32

and put this sign up login pop-up actually on this page

1:48:38

right and then trigger it from the page right so i've got another sign up login button

1:48:46

here which if i go down to element actions and then

1:48:52

show i'm showing that new signup login pop-up

1:49:00

boom just like that so i could do that right but it obviously in this particular case doesn't make a lot of

1:49:06

sense to do that because well one that sunup login button should live in the header and also the fact that it lives

1:49:13

in the header will allow us to launch the signup log and pop up from multiple pages potentially that's some a user

1:49:19

experience that you might want to have in your app we actually want to nest the sign up login reusable element inside of

1:49:27

the header reusable element and that means that we can always just trigger the signup login reusable from within

1:49:35

the header we don't have to trigger it independently from the pages themselves

1:49:41

so i'm going to remove that right and so what i want to do here is just create that exact same workflow so i'm clicking

1:49:47

the sign up login button what we want to do is create an event

1:49:54

create an action rather that shows that sign up login pop-up

1:50:02

just like that and so what i want us to quickly do is just actually recreate the functionality of this sign up login

1:50:08

pop-up just so we can actually see how it functions okay so

1:50:14

if i remove this signup login pop up completely and i just create a new

1:50:20

pop-up on this page we're just going to create it as a normal pop-up right now not as a reusable element okay and i

1:50:26

want to make sure it's set to be fixed width that's great i might just extend

1:50:32

the height a little bit and let's just create two groups here okay

1:50:38

one group is going to be for where the user can sign up and the other group is going to be for where the user can log

1:50:44

in okay so the inputs are slightly different so this group over here

1:50:49

i'm going to do this in the most simple way possible this group over here is going to be our

1:50:56

group sign up okay and that means we might want to add some

1:51:01

text to it right that just says sign up and

1:51:07

give it some header formatting okay and i'm not going to worry about labels right now we're just going to use the placeholder text as our labels so we'll

1:51:15

have an email input okay input email

1:51:21

where i'll actually set the content format here to be email and what that's

1:51:26

going to mean is that we're actually not going to let our users enter anything into this input that isn't formatted

1:51:33

like an email address okay it'll come up as invalid all right so there's our

1:51:38

email input and now i'm going to control drag to grab a password input and in

1:51:43

fact i might just center these both center all of these rather horizontally

1:51:52

and so this is going to be our input password and the placeholder is going to be

1:51:58

password and we can actually format this to be a password as well which is going to mean that when the user types something in then it's not going to show

1:52:06

the user what they're typing right just like you'd expect a normal password input it's just going to be a whole bunch of asterisk signs one after the

1:52:12

other so you'll see how that works in a moment and then we'll have a button here which

1:52:17

is going to be our sign up button when this button is clicked this is kind of where the magic needs to happen so i'm

1:52:25

going to go start edit workflow and since we're dealing with users now user

1:52:30

logic we're going to come over to the account page and choose this first section here sign the

1:52:36

user up so what this is going to do is it's going to create a new user object

1:52:42

in our database right just like how we were creating products before right we had a product straight box that we were

1:52:47

putting onto the shelf and putting some values into it same thing here but for user objects we go through this action

1:52:55

here because users are a a special kind of data type

1:53:00

within bubble with some special kind of features that only apply to users and

1:53:06

you can see what those features are under here right we have you know you can log users in and out update their

1:53:12

credentials so their password you can send them password reset emails send a magic login link and it's good that

1:53:19

bubble handles all of this stuff because you know a lot of the stuff is security sensitive password handling is is a

1:53:26

topic that we wouldn't really be able to handle ourselves in terms of the encryption of the passwords and this

1:53:31

kind of thing so it's very good that bubble kind of takes care of that stuff for us and then just exposes the sort of

1:53:37

one action that lets us change a user's password or logs a user in with a password so um so we've got the sign the

1:53:44

user up action and here we would just point these fields to the inputs where

1:53:49

the user is entering in these values right just like when we were creating the product so input emails value and this one will

1:53:58

be our input passwords value and actually i've missed about password here so i'm going to right click shortcut tip

1:54:04

here right click on this input here the expression and click reveal the element that's going to take

1:54:10

me right to it in the editor and i can just change the name there so signing

1:54:16

the user up we're not going to require a password confirmation okay that would mean we're going to have another

1:54:21

password input okay so the user has to type the password into the first input and then type exactly the same password

1:54:28

into the second input i'm sure you're all familiar with that kind of feature we're going to keep it simple

1:54:33

and we're not going to check remember the email either so if you're unsure about what any other stuff does if you

1:54:39

just hover over a lot of things in bubble you have this sort of c reference okay so we can click on that and kind of

1:54:45

say okay what does this mean to remember the email and it's telling us that if we

1:54:50

set that to be true the user's browser will remember the email that they last

1:54:56

entered when they went to sign up um or log in so that means if a user logged out and then logged back in their email

1:55:02

address would already be pre-populated so but we're not worried about that in this case either so we're going to sign

1:55:08

the user up and then the last thing that we might want to do is actually just hide that pop-up right the user's logged in

1:55:14

now if i start typing up here then i can filter the elements on my page i'm gonna hide that pop-up which is called pop-up

1:55:21

a at the moment we should probably call it pop-up sign up and log in let's just

1:55:27

do this for now okay we've got some extra space down the bottom which i'm going to use for our login group

1:55:33

functionality and then we're going to kind of show and hide these groups depending on what the user wants to do but let's just test whether this

1:55:39

functionality itself works all right i'm trying to click this button and nothing's happening so i can

1:55:46

go step by step and try to see okay what what is meant to happen here and doesn't look like i've got any action assigned

1:55:53

so thank you debugger another good reason why we would use the debugger in this case so what i actually have to

1:55:58

attach here is an action to show that sign up login

1:56:04

pop-up that we created so element actions show that pop-up signup login okay

1:56:14

there we are and so i'm going to enter my email address here a helpful tip if you want

1:56:20

to you know you're testing login or sign up functionality or any kind of functionality really with a lot of

1:56:26

different test user accounts you can keep using your own email which means that some random bugger on the internet

1:56:32

isn't going to get your test emails and but also means that you can continue to receive them in your email box it's just

1:56:39

by putting a plus and then putting kind of some value after the end which might

1:56:44

just be you know test it might be a number it might be kind of today's date

1:56:50

in some way whatever kind of makes sense for you at least in the case of gmail it will ignore everything after this plus

1:56:58

sign this email address will still get routed to my email matineri.com but in

1:57:04

bubble bubble will see this entire email address so it will pick up different

1:57:10

users even though all of those users emails will still be routed to your real

1:57:17

email address so i'll do that here okay and now we'll type some password in

1:57:23

here and have the user sign up now the user apparently has signed up at

1:57:30

this stage what we could do is kind of give some indicator in the header to show when the user is signed up okay so

1:57:37

maybe what we want to do right just a really simple thing is just add some text up here and we'll make sure that

1:57:45

it's light texture it shows up and we can say logged in as okay and then we can add i

1:57:51

might actually make this even smaller logged in as and then insert dynamic data and we want

1:57:58

to choose this option here current user so that will return whatever user is

1:58:04

logged into the application at this moment so the current user and then we can grab any one of these fields from

1:58:10

them and what we're going to do is grab the email because of course the email is a default field that we have for all

1:58:16

users if you go into the database and click on the user you can see that this email field is what bubble is calling a

1:58:22

built-in field so it's default it comes out of the box every user is always going to have an

1:58:28

email now if we refresh this page you can see voila i am in fact logged in

1:58:35

so that's awesome so kind of the next logical step here okay we're still seeing the signup logger and

1:58:42

we want to have our users be able to log back into the application but it might make more sense for us to let our users

1:58:48

log out and then we can kind of test that log in functionality after that so

1:58:53

what we could do here right if i just use hold down control and select both of

1:59:00

these guys okay and then hold down control and drag this button here and

1:59:06

make it a bit smaller i could make this a log out button and then i could

1:59:11

attach my logout action to this button so that's again under the account

1:59:17

settings we've got this action called log the user out okay so that's again

1:59:22

some bubble built-in functionality but that's not a very clean user experience of course to have one button for sign up

Conditional statements

1:59:29

and logging in and another button for logging out kind of makes sense that when the user isn't logged in

1:59:35

they see this button signup login and when they are logged in then they see

1:59:40

this button this logout and so what we could do here is use what is called a conditional

1:59:46

statement right which is just like we were doing with our workflows when we were defining an only when statement

1:59:53

here we can define these statements at the element level as well okay so the

1:59:58

element will actually be sort of constantly asking itself the question is this true is this true is this true is


PART - 3 

2:00:04

this true and anytime that it is true it'll take subsequent actions so let's

2:00:10

kind of see how that would work if we come over to the sign up login this is where we want our kind of first

2:00:16

condition to live i have the option here to go to this conditional tab and this is where you

2:00:22

define all of those rules and you can see this this button already has one it has a this button is hovered condition

2:00:30

and if we go to our preview you can see in fact it does have a slight hover behavior you know when i'm hovering over

2:00:37

it's going dark and that's actually a condition that's built into the style settings for this button right the style

2:00:45

here this primary button style if i was to select off of this

2:00:52

then that condition becomes visible for us so you can see that this is how it's defined okay we've got sort of an

2:00:57

expression up here that says when this button is hovered and then a series of button commands essentially telling this

2:01:04

button what to do should this condition be true and we actually want to keep all that stuff

2:01:09

okay so i'm actually going to put us back on that primary button settings and then we're going to define

2:01:15

our new condition here so i think what the easiest thing to do in these kind of

2:01:20

situations where you have two different elements and you essentially want them

2:01:25

to be visible or invisible based on some condition is to just make them both

2:01:31

invisible by default and then to find the condition that makes them visible so

2:01:37

the first step that we want to do here is come over to this layout section and click the element is visible on page

2:01:44

load so we want to untick that okay and that means that when the page is actually loaded this element will not be

2:01:51

visible at all and that's a great starting point because now we can just define a condition to tell the button

2:01:57

when it should be visible and that's sort of a nice way of keeping behavior consistent when you have this kind of

2:02:03

conditional show hide functionality it's just set things to be invisible by default and if you know that you've done

2:02:09

that everywhere in your application then you know you only have to look in the conditional tab to see

2:02:14

in what condition should it be visible so just the best practice there all right so here's where we're going to

2:02:20

define that condition i'm going to click this button here the question that we want to ask here if we just think sort

2:02:26

of taking a step back that's a good habit and we'll just take a step back and just and just ask yourself in plain english or whatever your native language

2:02:32

is what do i actually want this logic to do so this button is invisible by default and we want it to be visible

2:02:40

only when the user is logged out only when the user is not logged in do we want to show this button

2:02:46

let's see if bubble exposes an expression that captures that i'll click here to start writing this

2:02:53

expression and what we want to do is choose current user so that's sort of the start of this expression what is the

2:02:59

object what is the thing that we're evaluating here and thankfully for us bubble offers this is logged out

2:03:07

expression okay so anytime that that's true then we can set a number of properties

2:03:12

on this button and the first one that we want to choose is if this element is

2:03:19

visible so since our user's logged in at the moment we're not kind of seeing this behavior but we do still have our logged

2:03:25

out action attached here log the user out so i'm just going to click that to log the user out and then

2:03:32

in theory that signup login button should become visible there it is now it is visible and if we

2:03:39

inspect any of these elements okay it'll actually show us the conditions as well

2:03:44

and they'll be highlighted green whenever they are true okay so the current user is logged out so

2:03:50

conditional behavior is super powerful you'll be using this all the time in your bubble development

2:03:56

so we do also want to have sort of an equivalent action here on this log out button so what if i actually drag it

2:04:03

over the top of the other button okay so they're kind of taking up the same space

2:04:09

on the pages we're giving it the illusion of it being a single button when in fact it is two separate buttons

2:04:15

and we could actually set this up to be a single button okay we could actually set this up using some conditional

2:04:20

workflows right to say you know if the user's logged in then trigger this logout action and

2:04:27

otherwise trigger the the logged in action um but you know we'll keep things

2:04:33

simple right now and we'll just have two separate buttons here so we want to do exactly the same thing here on this

2:04:39

button logged out we'll tick this element is visible on page load no okay so the default behavior when the page is

2:04:46

loaded is for this to be visible and then we want to when the current user

2:04:52

is logged in right because we're talking from the log out buttons point of view now

2:04:58

then we want to set this element to be visible and if i click the sign up login button now

2:05:06

and let's just say i sign up as a different user so test number two

2:05:11

right and sign up now a logout button is appearing and if

2:05:16

i click that to log out now i'm logged out and that signup login button is

2:05:21

appearing okay so we've got that basic um infrastructure here set up within our header but we still have some work to do

Custom states and forking logic

2:05:30

in our pop-up sign up because at the moment we're only letting users sign up we also want to let them log in so i

2:05:36

want to set this up the same way as this default bubble sign up more or less

2:05:42

because it deals with something called custom states which can be a little bit

2:05:47

of a confusing concept um in the beginning um but it's worth introducing

2:05:52

them early on and just getting getting familiar with them because there's not that much to them and you will encounter

2:05:58

them you will use them within your bubble development so this is a great place to introduce them

2:06:04

so what i'm going to do is i'm just going to copy this group here the sign up group and

2:06:10

i'm going to make this group my login group okay and you might be wondering well why

2:06:17

on earth are you doing that like you're not going to have two forms one above the other right like that

2:06:23

looks ridiculous um and you'd be right that would look ridiculous what we actually want to do here is when one of

2:06:30

these groups isn't visible okay then it actually collapses so from the user's point of view we're only going to see

2:06:37

one of these groups at a time okay because the other one is going to disappear and because it's collapsed

2:06:45

okay the size of this pop-up is going to shrink to accommodate the group that is

2:06:50

still visible and so for that to work we are going to just touch just tinker

2:06:57

around the edges of the responsive engine i want this pop-up to not be a fix layer okay i

2:07:03

actually want it to be a column and a column layout in bubble is going to

2:07:10

force any elements inside of it to be stacked on top of one another

2:07:15

here's our column layout here right

2:07:20

column container right if we wanted to add a group into here which we have done we've got two groups here they would

2:07:27

automatically as they have been here kind of be stacked

2:07:32

this is group a this is group b they'll automatically be

2:07:37

stacked one on top of the other you can't kind of move them around in the way that we were seeing in the in

2:07:44

the previous parts of this video whenever you're using uh a container like column or like the one other ones

2:07:50

that we're not going to talk about today aligned to karen and roe then any elements that are inside of a

2:07:56

container with that setting are going to have their position automatically set

2:08:01

depending on that container type so in a column scenario it's one above the other i don't actually want this to be a

2:08:08

responsive tutorial because there's a lot more to kind of discuss here around how this engine this responsive engine

2:08:13

is actually behaving so even though i've set the layout here to be a container i've actually still got a fixed width

2:08:20

and a fixed height okay so that's why we've still got this the space here on the right hand side the only thing that

2:08:25

i might do is if i go into each one of these groups i can set the alignment of this group

2:08:31

relative to the parent group right so i'm going to set this guy to actually be

2:08:37

in the middle and set this guy to also be in the middle okay with that little responsive setup out of the way now what

2:08:44

we do have on both of these groups if we click on them is this option here collapse when hidden okay and that's

2:08:51

going to let us do what i was discussing before where we actually collapse the height of that group if we collapse the

2:08:56

height of this group here right if if group a is visible then basically group b will move up okay group b will move up

2:09:04

and the rest of this container will move with it so only thing that we're sort of missing

2:09:10

here is the ability to kind of switch between both of these groups right depending on

2:09:15

what the user wants to do so what we could do i'm going to just extend the height of this pop-up just by

2:09:23

maybe 60 pixels and i'm going to have a button here

2:09:30

a button which i'm going to make a different kind of look and i'm going

2:09:36

to make this my button we'll call it switch and how this works is going to work is if the user is currently seeing

2:09:43

the sign up form but they want to log in then they're going to click this button to see the login form instead okay so

2:09:51

that's just basically exactly the same as the default signup login pop-up over

2:09:56

here that bubble has created works okay so that's what we're creating here

2:10:03

so on our pop-up all right first thing i might want to do is make this horizontally aligned okay so what we

2:10:09

basically need here is like a rule that basically says like if the user is in

2:10:15

sign up mode okay and they click this button then switch them to log in mode

2:10:21

and we also want the inverse condition if they're in login mode but they want to go to sign up mode okay then this

2:10:28

button will switch them into sign up mode okay and a common way that this is

2:10:33

done is using something called custom states so i actually just want to pull up

2:10:38

a new test page here okay just to demonstrate this in kind of isolation so

2:10:44

that you get the picture a custom state is nothing more than another container

2:10:51

right that's actually what it is like we've got a group here right and that is a container

2:10:57

and a container holds a type of value a custom state is exactly the same okay

2:11:03

i could define a custom state on this group right by clicking here

2:11:09

and going add a new custom state and that custom state i would set

2:11:14

to be let's say mode and then i would set it to be a particular value so it's sort of a container that lives on a

2:11:21

container okay so if this is in this example here this is our group

2:11:28

a you can think of the custom state as almost like

2:11:33

a meta container like it's not visible on the page it's just a hidden container

2:11:40

to hold some value okay and that can be really useful for a whole variety of

2:11:46

different purposes one of which is just holding some information such as okay

2:11:52

which mode should the signup login form be in right now should it be in the sign

2:11:58

up mode or should it be in the login mode okay and then depending on what that mode is okay other elements on the

2:12:06

page can react okay it's almost like it's a traffic light okay so let's sort

2:12:11

of just like demonstrate that so i'm gonna delete this group and i'm gonna set the custom state here on the page

2:12:18

level okay so you can do that you can set a custom state on any element okay but to keep things organized a good

2:12:25

practice is to do it at the page level so you can find them easier later and i'm going to call this

2:12:31

mode okay and we're going to make it a text value okay and we can also set a default

2:12:38

value here for the mode i'm going to get back to that in a second now all i want to do

2:12:43

here i'm going to drag two shapes out onto the page let's call it a shape green

2:12:49

and we'll give it a green color and i'm going to do a shape

2:12:54

red okay traffic light colors here

2:13:01

okay now i want both of these guys to not be visible on page load

2:13:06

right just as before but i want to set some condition that's going to say whether or not they should be visible

2:13:13

okay so that condition okay is going to be looking to the custom state so if we

2:13:20

just ignore this for a second okay we've got a custom state here okay we're going to

2:13:27

have a custom state here living on the page and that custom state is either going to be green or it's going to be

2:13:33

red okay depending on what it is if it's red then we want the red shape to appear

2:13:41

if it's green then we want the green shape to appear that simple okay so the element right

2:13:47

the equivalent of these groups here are looking to the custom state right they're looking to the custom state

2:13:55

to know what they should do and so in this case right the cast state is green so the red one's going to disappear

2:14:01

however if that changes to red then the green one is going to disappear okay

2:14:07

so these shapes as before like any condition they're constantly asking themselves the question in this case

2:14:14

what is the customs date value what is the customs date value what is the customer's data so they're asking

2:14:19

themselves that over and over and over again and anytime it's going to change then their behavior is going to change

2:14:25

okay so in practice that means setting a condition here which to get to the customer state we're

2:14:32

first going to select the page okay so the page name is custom state okay in

2:14:37

fact i'll just name it to be custom state page so it's super super clear so

2:14:42

we're first going custom state page and now we have access to this mode option

2:14:49

okay so that is referring to the custom state living on the page okay so the

2:14:55

pages mode right when the pages mode when the value in

2:15:01

that mode custom state right the custom state that we've called mode when that is equal to

2:15:08

green okay then this element is visible

2:15:14

and we'll have the inverse over here okay so just as a little shortcut what i'm going to do is i'm going to right

2:15:20

click and copy this expression come over to the red guy

2:15:25

and paste it okay and what i can actually do that's one little shortcut what i can

2:15:31

also do is just copy the entire condition right so very very um quick way of of of

2:15:39

changing these things and then i'll just change this to be red what i need now is a way to change the

2:15:46

state of the page itself right so change whether or not it's going to be green or

2:15:51

red and so i might have a button here which says

2:15:57

red and another button over here which says

2:16:02

green okay and this is where i actually need to set the

2:16:08

action which changes the custom state so when button green is clicked

2:16:14

we want to because we're dealing with an element here right the page is in a way just another element

2:16:20

we're going to set the state so change the value inside of our custom state

2:16:26

so the element that we want to change is the custom state page and then custom state itself right because you can have

2:16:32

multiple custom states on an element in this case we've only got one called mode and now it's saying okay what do you

2:16:38

want the value to be called what do you want the value to be set to so we want it to be green

2:16:44

and then we create an equivalent for red so i'm going to copy this workflow and paste it

2:16:51

and now i'm just going to change this to be button red okay so the element that's clicked to launch this workflow button

2:16:57

red and then the value here is going to be

2:17:03

red okay so let's test that out in action okay so at the moment there's no value

2:17:09

right when the page is loaded there's no default value in that custom state you can't have one but we didn't set one

2:17:15

okay and let's do this step by step if i click green we're going to set the state

2:17:23

which is called mode the custom state mode to be set to green and there's the green one visible

2:17:29

if we choose red now the red one's visible so green red green red now maybe you're asking

2:17:36

yourself well why did you not just use a a show action right just like show

2:17:44

that shape green in this case it's a good question um the answer is that it

2:17:49

is a very hard to maintain way of doing this because every time that you show the shape green okay you also need to

2:17:57

hide the shape red okay so there's now two actions where before there was just one and plus these shapes might be not

2:18:05

the only elements that need to react to the custom state for example we've got

2:18:11

two buttons here right but we could just as easily have one

2:18:16

and we could have similar kind of condition here you know it essentially says when

2:18:21

the custom state pages mode is equal to one of those values right is

2:18:27

equal to green right maybe we just maybe we just actually set this set it

2:18:34

to red and then if i copy this condition and paste it

2:18:39

then we would do an opposite one for red okay

2:18:45

now we have this button switch okay reacting to the custom state

2:18:51

it's looking to the custom state to decide what to do based on some conditional statements but also these

2:18:57

shapes are and we can't change the color of a button like this using workflows we

2:19:04

can't do it so we're forced to use these conditional tabs which are reactive by

2:19:10

nature okay they're always looking to see if some condition is true to decide what they should do and so that's where

2:19:16

the value of a custom state comes in it's holding some temporary value okay

2:19:21

which is um usually going to be used well is often used to tell other elements on the page what to do but you

2:19:27

could also use it for all kinds of different things you could have a product shaped custom state that holds a product um temporarily right maybe it's

2:19:35

just like you know in in a card in the in the header so you're saving that as a custom state the important thing about

2:19:41

custom states by the way is that when the user refreshes the page they're lost just like any other value that's on the

2:19:47

page right we're not storing stuff in the database it's just stored locally so a page refresh will will undo it so if i

2:19:55

just preview this so by default we actually don't have a value here um i

2:20:00

hope you're following along so far um this page as it is set up right now is

2:20:05

actually broken because i deleted one of those buttons earlier remember i had two buttons up here and now i've only got

2:20:12

one button and that one button that's remaining was the button that was setting the custom state to be

2:20:19

red so we actually want this button to be dual purpose right so if the custom

2:20:24

state is green then what the action that we want to fire is changing it to red and if it's red then the action that we

2:20:31

want to fire is setting it to green okay so another only when condition is necessary here now i'm going to set this

2:20:38

up what might be to you the intuitive way first off the bat at least it was for me and then you're gonna see why

2:20:44

that way actually doesn't work so first thing that you think you might want to do okay button switch is clicked okay we

2:20:51

only want this action to fire right if the value of that custom state is green

2:20:57

okay so we could say only when custom state page right to access this

2:21:02

custom state again when the mode is green

2:21:08

then we set that value to be read and then if i copy this

2:21:14

expression okay then we basically just create the inverse here right green

2:21:20

only when it's red and at the moment none of these will fire if

2:21:26

we reload the page here okay and click this nothing happens and that's because

2:21:32

there's no default custom state set at the moment at the moment the custom state for the page this mode custom

2:21:39

state is empty it doesn't have any value so that's why this is evaluating to false

2:21:46

okay because the mode of the custom state page is empty and the same for the next one

2:21:52

so to resolve that we can set a default custom state so i'm double clicking to open up the inspector at the page level

2:22:00

and then i'm going to set the default value to be green and that should resolve this right so

2:22:07

now it's green and so now if we click red hmm

2:22:13

nothing is happening so this is a good time to check out our debugger maybe our by

2:22:18

using the debugger we can figure out what's going on so i'm going to go into step by step mode and just see okay

2:22:24

exactly where is this workflow breaking down so i'm clicking on red okay

2:22:31

and okay since we are in the green mode right the mode is green we're going to

2:22:37

set the custom state to be red that's what this first action is doing okay so that's all good that's working

2:22:45

and then in the next action we're asking if the value is red then set it back to

2:22:52

green so you can see what's happening there is we're just going from one state

2:22:57

quickly to the other one um this first action is setting it to be red and then

2:23:03

the second action is setting it back to be green and so when you look at this in real time

2:23:09

it looks like nothing's happening so how do we resolve this well we don't want to have two actions back to back like this

2:23:16

because actions as i said before they cascade so one fires and then the next fires and then the next fires and we

2:23:23

don't want that we basically want when the button is clicked at that point we want it to ask itself like is it green

2:23:30

in that case launch this workflow and if it's red then launch this workflow so

2:23:36

those are those are two kind of independent branches of logic so to speak we actually want two events here

2:23:44

and anytime that you have two events they'll both fire if a button is clicked

2:23:49

if i copy this right and paste this okay anytime that the button is clicked both

2:23:55

of these events will fire so we want one of these to be

2:24:01

the equivalent of the red okay so i'm gonna cut this and paste it well i can just delete this

2:24:08

over here okay so one of these is saying set the value to be green

2:24:15

and one of these is saying set the value to be red okay so so far so good okay so

2:24:20

now we've got so we've got two separate events okay and we've got an only win

2:24:25

action in each okay but this is still going to lead to an issue and maybe you

2:24:31

can kind of have a guess as to why let's debug this and one way that we can do this a little bit more easily is

2:24:38

actually rename our events it's going to help us keep track of what's happening in the debugger so um so this action

2:24:45

here is setting the value to be red so we want to call this event switch to

2:24:51

red and then logic states that this one which is set in the value to be green we

2:24:58

should call set to be green so all i'm doing there is clicking up the top of the event and then just typing in

2:25:04

something new okay so that's going to help us keep track of what's happening if we go step by step in the debugger so

2:25:10

let's do that step by step i'm going to click there okay so this

2:25:16

switch to red event is now firing so this guy over here and if we go right next what it's doing

2:25:22

okay it's looking is the custom state green okay which it is in that case

2:25:29

switch to red okay and now the next event is firing this guy okay so both of these events

2:25:35

are set to trigger when the button is clicked and they're just going to happen one after the other which was kind of

2:25:41

the problem that we had before right when we had actions so you can probably guess what's going to

2:25:47

happen here this is evaluating to see whether the state is red which it is because we just changed it to red in the

2:25:53

previous workflow um so now we're just jumping straight back so this is not working the way that

2:25:59

we've set this up to get this to actually work we don't want to have the only when conditions here on the action

2:26:06

level we want them to happen on the event level so we're actually going to sort of stem the flow right at the

2:26:12

beginning essentially means is that rather than this event firing and then checking if this is true and then this

2:26:18

event firing and checking if this is true only one of these events is going to fire because only one of them

2:26:25

is going to be true so what i mean by that is if i copy this

2:26:30

expression here i'm actually going to clear it out and put it up at the event level so here i've got the event

2:26:35

selected rather than the action the event selected and then i paste it in

2:26:41

okay this event will only fire at all if this condition is true okay otherwise

2:26:49

this will not happen and same thing over here i'm going to copy this right click and then clear it

2:26:57

and then paste that expression at the event level you can see now that only

2:27:02

one of these conditions is actually going to fire at a time it's either going to be red or it's going to be

2:27:08

green at any at any particular time so in practice right

2:27:14

if i click this now switch to green this guy

2:27:19

is the action that we're firing now okay that's only gonna fire if the custom state is red which it's not at this

2:27:26

moment the custom state is green okay so we're going to skip past this event and

2:27:32

we're going to go to the next one that next event right this one here

2:27:37

is then asking okay is the custom state green which it is in that case you're gonna set the value

2:27:44

to be red so that looks like the behavior that we want and it's gonna work in the reverse

2:27:50

as well okay so we're asking that switch to red condition now okay so

2:27:57

this is something that bubbles kind of doing intelligently as it's changing which order of things to do these events

2:28:02

in it's choosing the one that's going to be false first so that we don't have the same problem that we had before so now

2:28:09

that switch to red action is being asked and it's false so then we're moving over to the

2:28:16

switch to green action which is evaluating to true

2:28:22

in which case we switch back to green so now this behavior

2:28:27

is kind of working hopefully that kind of gets your head around the concept of using custom states as kind of like a

2:28:33

routing mechanism here you could just as easily instead of using a custom state

2:28:40

you could use a group okay you could use a group as the container for this temporary value so

2:28:46

you could have the type of content you could have group mode instead right and

2:28:51

as the type of content choose a text and here you would define what the default is so you would it

2:28:57

would be green now you point everything to this group rather than the custom state so over here where you have these

2:29:04

conditions instead of custom states mode is green you would go group modes

2:29:11

text is green okay and you would do that for all of these you would you would change this

2:29:17

to refer to group mode and then all of your conditions would be looking at group mode as well and so that would

2:29:23

work exactly the same way the only value of doing it in a custom state is that it's kind of hidden okay this group here

2:29:30

you have to decide kind of what to do with it often people will put this in a pop-up to kind of hide it if they're

2:29:35

doing it this way and custom states do have some other benefits as well in terms of passing data between reusable

2:29:42

elements and pages but that's a little bit more advanced we're not going to kind of get into that today

Creating our login/signup form

2:29:48

so hopefully based off of this you have an idea conceptually of what's going on

2:29:53

that we can now apply to our sign up login pop-up right so if we go back to

2:29:59

our header element and our pop-up signup login okay now we

2:30:04

can just apply exactly the same logic structure that we were doing on that

2:30:10

test traffic light page to this right we want to set a custom state

2:30:15

that's going to define whether or not either this sign up group should be visible or this login group is visible

2:30:20

okay so let's take this one step at a time let's first deal with the setting of the custom state and then let's deal

2:30:27

with the elements that are going to react to whatever the value of that custom state actually is so first let's

2:30:33

actually define the custom state all right which makes sense to do that in the pop-up okay you could also do it

2:30:39

at the header level because we're dealing with behavior that's only happening within the pop-up it's logical

2:30:44

to also do it at the pop-up level so that custom state we can just call it mode again and make it a text value

2:30:53

and the default value let's make that sign up and then let's actually configure this button to start with okay

2:30:59

and then we can at least make sure that we're setting the custom state appropriately

2:31:04

so when that button switch is clicked okay we actually want two versions of this so i'll set up one first and then

2:31:10

make a copy of it to do the inverse so when that button switch is clicked okay let's make this our login logic so we

2:31:18

only want this to fire when the mode is equal to

2:31:24

sign up right because we want this to actually switch it to the login mode so the inverse of sign up

2:31:31

and then we'll add an action here which sets the custom state of that pop-up

2:31:39

right which sets that mode custom state to be login

2:31:44

right and we'll rename this as well so that it's clear what the action is

2:31:51

actually doing and then i'll just make a copy of this i'll make a copy of this event

2:31:57

okay and this one will be switch to sign up and here we just want it to do

2:32:02

exactly the inverse so set this to be

2:32:08

login okay and set the value here to be

2:32:15

sign up right so in this case only when the value is login then we want it to do

2:32:21

the inverse which is set the state to be sign up so without dealing with um

2:32:27

what's gonna happen um when this button is clicked we can at least just see kind of if it's working

2:32:34

so first things first let's inspect the pop-up and just see okay what's the custom state right now and it's sign up

2:32:41

okay so that makes sense that it's sign up because that's the default value remember at the pop-up level

2:32:47

we defined this default value to be sign up okay so that's working so we can at

2:32:52

least tick that off now if we go step by step and we switch

2:32:58

modes okay well the mode is not login okay so this event is not going to fire

2:33:04

it is sign up so this event is going to fire and what that event is doing is

2:33:09

setting the value to be login so now if we were to inspect the pop-up

2:33:14

again we should see there we go that the value of that custom state is login

2:33:23

and if we were to click this again then we should see that it is back to sign up okay so we can tick that kind of

2:33:30

bit off of setting the custom state okay we know that functionality is working this is a good practices build things in

2:33:36

a modular way right so this part of the feature is working now we can move on to the next part which is actually getting

2:33:43

these groups to react to whatever the custom state actually is okay so we'll

2:33:48

start with the sign up group here first right so let's define the condition to

2:33:55

start with so this condition is basically saying it's the equivalent of the traffic light system right like when the value is

2:34:02

green then show me okay in this case when the value is sign up then show me the custom

2:34:08

state that we're looking for is of course living on the pop-up right so when the pop-ups mode

2:34:14

is equal to sign up right then show me then

2:34:21

this element is visible okay and if we copy this condition and go over to our login group we can just

2:34:28

paste it and then quickly change things to be the inverse right

2:34:33

login is what we're after and then we can just test this too right testing things in a modular way we don't always

2:34:39

have to set things up kind of in a complicated way okay now both of these elements are

2:34:44

visible by default at the moment okay so we want to change that to begin with so

2:34:50

on both of these i want to untick this element as visible on page load so

2:34:57

that will at least let us see if they're basically reacting to the to the

2:35:02

state so at the moment the signup form is is visible and that makes sense right

2:35:08

because the default value as we showed before of this custom state in the pop-up is sign up

2:35:15

and then if we go to switch modes voila we're seeing log in

2:35:21

okay so that's working perfectly the only thing of course is that we want this pop-up to kind of contract to the

2:35:27

size of these groups here so to do that if we come back over here we actually

2:35:32

want to tick collapse when hidden okay on both of these collapse when hidden

2:35:38

okay for this to work there's kind of one last step that we need to do because at the moment if we just if we preview

2:35:46

the page again you'll see that yeah it's collapsed right they're both appearing in the same

2:35:52

place at the top but we've got all this extra space down the bottom and all that extra space is there because of the size

2:36:00

of this pop-up that we created but also because we've got a minimum height value here

2:36:07

set i said that earlier for kind of like ease of teaching this but we actually

2:36:12

don't want to have a minimum height here okay that's basically saying like this pop-up

2:36:18

can be 660 pixels or higher but it cannot be less than 660

2:36:24

pixels so at the moment this is 660 pixels high so this is as far into the responsive

2:36:31

design as we're gonna as we're gonna go i'm actually gonna set this to be zero and so in our editor here okay

2:36:38

we're seeing a completely collapsed signup form but don't fret okay in reality that's not going to be the case

2:36:43

when we preview because we're always going to have a custom state here so here we go the up form is visible it's

2:36:50

asking us to switch modes which we can do and we could get a little bit fancy here as well we could get some more

2:36:56

space below this switch mode i'm not going to get into that in this video because we're going to get too deep into

2:37:01

responsive design in that case the one thing that we don't have set up here okay we've got a sign up button that's

2:37:08

signing the user up but we haven't configured our login button okay so i'm

2:37:14

because i can't see these groups anymore i'm actually going to use the elements tree to find them

2:37:19

so group login button sign up in fact it's not a button sign up anymore it's a button login

2:37:27

[Music] log in and now we can create a new workflow

2:37:32

here to kind of finish off this whole process the action that you want predictably is

2:37:37

under account and it is to log the user in okay and now we want to choose what

2:37:44

input we want to point this towards and as earlier we've got duplicates here and that's because we copied the form but we

2:37:50

didn't change the labels change the names of the inputs within those forms

2:37:57

right so if we go back to our group login here we want to probably call this input

2:38:02

email login and input password login

2:38:07

and then we can do the inverse on group signup input email

2:38:13

sign up and input password sign up so that we can keep track of

2:38:19

what we're doing with these inputs a lot easier okay so now we'll set this to be input

2:38:25

email login right which we know is the input living on the login section right

2:38:32

so if i just untick this for a second right it's the this input here and this

2:38:40

input here okay not the equivalent inputs in the sign up form so i'll just

2:38:45

undo this so that it's collapsed again and then the password is going to be the

2:38:50

input password login value now stay logged in again

2:38:56

that's something that we can have a look at the reference and see what does it actually mean stay logged in and bubble

2:39:01

is telling us that's going to keep the user logged in after 24 hours so if that's not if we set that to be no then

2:39:08

if the user's still logged in they've logged into the app and then they've gone away or they've closed their browser or whatever and 24 hours have

2:39:14

passed then the app will automatically log them out unless this value is set to

2:39:19

to yes so now we should be able to

2:39:25

switch modes and we should be able to log in right using one of those emails that we already

2:39:32

created and there we go now we're logged in as

2:39:38

that user that we created before and of course we could do some other things here right like we haven't hidden the pop-up here so we'd probably want to

2:39:45

we probably want to hide this pop-up sign up login and we probably also want to reset the inputs

2:39:53

okay but i think you get the picture right that's kind of how this works so if i log this out again

2:40:05

there we are now we're kind of getting some nice user behavior so all of what we just kind of set up is

2:40:12

more or less the functionality that comes in this default signup login pop-up there's some more stuff here

2:40:19

which you can dig into like having a forgot password functionality but that basic functionality about switching

2:40:25

between the sign up view and the login view that is exactly how the the bubble

2:40:30

default form works so now you can go off and you can create your very own sign up form um based on that same logic all

2:40:37

right so there's one last feature that i want us to create here and that is the ability for our users to favorite or to

2:40:44

like certain products which then add them to a sort of a separate list a

2:40:49

favorite products list that's going to allow us to demonstrate absolutely fundamental part of bubble which is

2:40:56

linking data objects okay so we want to create a link between users and products

2:41:01

in some way now right off of the bat i want to draw your attention to our app data here where you can see that all of

Data relationships

2:41:08

these products that we created before have a created by field equal to

2:41:14

that matte plus test user if you remember we weren't actually logged in when we created all of these these

2:41:21

products but what bubble does is any time and i mentioned this earlier any

2:41:26

time that a object is created in the database okay this created by a field is

2:41:32

populated with whatever user was logged in at that time now in our case we

2:41:38

didn't have any users at the time that where these products were created but what bubble was doing behind the scenes

2:41:43

was remembering okay that all of these were created with

2:41:48

my browser and then the first time that i logged in as a user with this browser

2:41:56

okay it automatically made this attribution it just guessed that hey you weren't logged in before but you created

2:42:01

all these products now that you've logged in i'm just going to assume that it's the same user and if you're

2:42:07

interested you can actually turn off that functionality by disabling how bubble handles cookies browser cookies

2:42:13

so look that up in the in the reference but that's essentially why that's the explanation as to why we have a creative

2:42:20

buy field here if i was to log out and log in as our other user our

2:42:26

test 2 and if i was to create

2:42:33

a new product here

2:42:39

right and then we were to look in the database okay you could see actually so this latest product here was created by

2:42:46

a different user so that's how that created by field works it's automatically populated by bubble so

2:42:52

that's sort of our first data connection it's built in by bubble but it creates a

2:42:58

connection between one data object the user and another data object the product

2:43:03

okay and that can be really really useful okay because then we could do things

2:43:08

like if i had another repeating group over here okay and this was a repeating group of

2:43:14

products okay i could do something like doing a search

2:43:20

right again just doing a search for all the products but now i can add a search constraint so a filter on that list

2:43:27

that's only going to return some entries so one of the constraints that i could

2:43:32

put on here would be that the created by the field that corresponds to a user is

2:43:39

equal to the current user all right and now i'm only going to see

2:43:46

if i just add a text here that's it and make that the current

2:43:51

sales product's name so we can actually see what's going on and if i go into the browse page you can

2:43:57

see that that second repeating group only has one entry and that is the one that i just created there's only one

2:44:04

product created by the current user so it's appearing over here but we can also

2:44:10

create our own connections between data types okay not just by relying on the

2:44:16

default created by field we could create a connection between products and carts

2:44:22

or products and courier companies right or products and

2:44:27

categories or products and all kinds of different things this is not going to be a deep dive into different types of data structures but just want to get you kind

2:44:34

of familiar with the idea that we can do this in our case we're going to just we're going to stick with users and

2:44:39

products but we're going to create a different data connection between them right to allow this kind of favorite

2:44:45

products list okay so how this is going to actually have to kind of work so we've got

2:44:50

a user here right that's the common rendition of a user and they've got some fields right

2:44:56

like well they've got an email field okay that's kind of like a default field that they have but we also want them to

2:45:03

have which is equal to you know some value but we also want them to have and

2:45:08

i'm going to use the uk spelling here sorry guys a favorited products field

2:45:14

how this data connection works is you remember that we have a shelf of products in our database

2:45:22

right a table of products okay so one of these might be the headphones that we just created another one might be the

2:45:27

shoes um the t-shirt all that kind of stuff okay and we essentially want

2:45:33

them all to be stored the ones that our user has favorited right let's say they favorited the headphones and they

2:45:39

favorited the t-shirt and they favorited the shoes we want them to be saved to

2:45:46

the user okay in some way and then we can actually kind of access them later via the user now what we're not doing is

2:45:52

we're not actually literally storing the products

2:45:58

in the user data type okay like they still exist on their shelf all we're doing is

2:46:05

creating a reference okay we've got a list of favorite products

2:46:10

here okay which all these really are are addresses it's saying you know

2:46:18

i want you to your favorite of that one and your favorite maybe

2:46:24

that one right and i should really do this in another color and maybe you've favorited that one okay and so these are addresses

2:46:32

it's basically where is it on the shelf like if you you know you go to the library and there's like a code system

2:46:38

and dewey decimal system and it's telling you like this book is in this part of the library it's on this shelf

2:46:45

you know and it's this far down and it's sort of roughly this far across it's the same thing here it's just an address

2:46:51

it's basically saying that it's on shelf a in the position 4 or something like

2:46:57

that behind the scenes what's really happening is we're actually storing the unique identifier for each of these

2:47:04

products which is kind of you know without going too deeply into that every single object that's created in your

2:47:11

database has a unique id created by bubble okay so this is sort of the

2:47:16

equivalent of that address this is how you can create a connection between a user and a product is by storing the

2:47:24

unique id of the product on the user and in that way okay you can always find that

2:47:29

product later on based on its unique id okay because then you know where in the database to look right on which shelf

2:47:36

you should go to find that particular product the key kind of takeaway here is that these products exist independently

2:47:44

in the database right right here's our users they're on their user shelf the products is just on their product shelf but for

2:47:50

any particular object like for any particular user okay they might store

2:47:56

references to other objects that let us find those objects later on so in the

2:48:02

case of our product what we also have if i just cut this

2:48:08

over here we also have a created by field right which we've got

2:48:15

our users over here okay it's not literally storing a user over here okay it's storing a

2:48:22

reference to a user it's storing this long kind of string that's saying this is the

2:48:30

user that created me so if you want to find that user then just look them up on

2:48:36

their shelf okay look them up by that unique id how do we actually set this up in bubble

2:48:42

right well let's get into it so we first need to make changes to our data structure to accommodate

2:48:49

this okay so on our user data type we need to create this field here this favorited products field okay so i'll

2:48:57

create a new field and we'll call it favorite products and

2:49:03

the type here is going to be of type product okay but it's not a single

2:49:08

product if it was just one single product okay then this is what we would do if the user could only select one

2:49:14

product to be their favorite then we would just leave it like this but we actually want to store a list of

2:49:19

products right it's multiple products it's multiple ids here right multiple of these guys and so

2:49:27

that's why we have to tick this field is a list

2:49:32

and then we can create that and now it's just a matter of creating some logic in our bubble application that's going to

2:49:39

take certain products and store them on the user or technically speaking store

2:49:44

the reference or the address of those products on the user so just before we

Privacy rules

2:49:49

do this i want to store the email address of the user who created

2:49:55

this product in this repeating group and we can ostensibly say that that's so that other users can contact them about

2:50:01

the products that they're selling so i want to insert dynamic data here what i want to do is because i've got i've got

2:50:08

a current cell that's a product okay i'm kind of i'm grabbing the derivative fields from that product what i

2:50:16

basically want to do is i want to open up the product this product here and then i want to pull out this created by

2:50:22

field to grab the user so i'm going to go current cells product

2:50:29

creator so just like i was choosing the name and the photo and stuff before i can also choose the creator and that's

2:50:34

returning an entire user okay at this point i've got an entire user that i'm

2:50:40

dealing with in this expression so this whole thing here but of course i can't expose an entire user through a text

2:50:47

element because a user just like any object in your database is it just a collection of fields right it's a

2:50:54

package of data in different formats text format image format number format

2:51:00

whatever okay so now i need to choose okay which of these fields on the user

2:51:06

do i actually want to propagate through this text element and so i can choose the email like that

2:51:15

okay and since it's not appearing i'm kind of curious as to why so i'm

2:51:20

clicking on my text element here current sales product

2:51:25

created by is empty okay it's empty if we come over here to the creator we're

2:51:32

getting a hint here so this is something you're going to bump up to in the beginning so we need to call it out and

2:51:38

that's privacy rules so a quick note about privacy rules here's some products

2:51:45

in your database here's your app okay so this is database again if you remember

2:51:50

this diagram so inside of our database we have all kinds of different data like these

2:51:56

products and what our application is essentially doing is asking the database

2:52:01

to send data back to it right our application doesn't have any memory that's where the database comes in so

2:52:07

this kind of expression of grabbing you know this repeating group of products what that's essentially doing is the

2:52:14

application asking the database okay to return

2:52:20

a certain amount of products right to return these guys so they all come running on their merry way and then are

2:52:27

displayed out to the user in the application the problem with this approach when a object is returned like

2:52:34

a single product like this all of the fields on this product are also returned all of them and that might

2:52:42

cause a security issue okay because you may not want all of these fields to be exposed to the

2:52:51

user with just a little bit of programming skill okay you can access all of these fields even

2:52:57

if you're not actually displaying them in your application you can go into the in the inspect tab of your browser and

2:53:04

you can pull out all of the fields that i returned here and so that we need to

2:53:09

deal with privacy rules because privacy rules are going to restrict sensitive

2:53:15

data from being returned okay so let's say that we were sending this product we didn't want to send the uh the price

2:53:23

let's say that was sensitive information we could have a privacy rule that says unless the user is say the creator of

2:53:30

this product then send everything to the application send all of this except the

2:53:37

price so essentially acts like a filter at this point where price in this case

2:53:44

would be left behind but name image you know and the created by field

2:53:50

those would all be returned on the other side so in a nutshell really short

2:53:56

consideration of this topic that's what privacy rules are doing and it's important that we deal with them because

2:54:02

out of the box okay bubble is is setting some privacy rules on the user okay so

2:54:09

even though we're getting everything from the product okay the user that we're trying to get some

2:54:15

information from is having its email restricted and so if we go into the data

2:54:24

tab and then we go to privacy okay this is where we can actually see

2:54:30

what privacy rules we have set you see we've got one rule up here which is that when the user who is who you're

2:54:37

evaluating and the expression is the current user so in this case right it

2:54:42

would be this would be like if the creator of this product is the current user then you would show their email

2:54:49

okay so if the current user the currently logged in user is the same user as the one that you're evaluating

2:54:56

that you're asking the question about then this is what will happen this is what you'll allow

2:55:01

to happen and one of them is to view all fields otherwise okay everybody else so

2:55:06

if you're not the creator of a product in this example okay then you can't actually see any information about any

2:55:13

other users that's what this is saying here and so what we actually do want is to expose

2:55:18

this email field okay so that says that don't show anything else about a user but you are able to return this email

2:55:26

field for a user like that is something that can pass through this filter i'm quite happy for you to pass through

2:55:34

the email of any user okay and you might want to re you have some more elaborate privacy rules around where you can send

2:55:41

these emails and probably in your application you might want to actually have some kind of in-app chat or

2:55:47

messaging functionality so that you never expose users emails to one another but in this really simple example

2:55:53

application that we're building this is going to be fine so now that i have updated that i'll

2:55:59

refresh the page and now indeed you can see we are seeing those email addresses

2:56:05

okay we are seeing all of these email addresses so with that out of the way okay and privacy rules can get quite

2:56:11

complex so this is a really simple treatment of privacy rules let's get into our favoriting products

2:56:18

functionality okay so the first thing we're going to decide is how is a user going to add a

Creating a ‘favorite products’ list

2:56:24

product to their favorite products list okay and one thing that we might want to do is add a little icon a little icon

2:56:33

here and we might want to make this like a little plus icon

2:56:40

and let's customize this a little bit okay let's kind of make it slightly like

2:56:45

like grayed out and then when it is hovered okay so

2:56:50

let's add a condition here when this icon is hovered okay then

2:56:56

we'll make it kind of a darker a darker color

2:57:02

something like this there we go and you know maybe we want to make this a style so we haven't talked about styles

2:57:08

yet but based on what we've set here the values that we've set here we can create

2:57:14

a new style so let's call this our hover icon let's say

2:57:21

and now from the styles tab okay we actually can edit all of the values for

2:57:28

any styles that we've created so if i filter this by icons you can see here is

2:57:33

the the style that i just created and so any time like if i have another one of these

2:57:39

icons over here and i set it to be the hover icon right anytime that i

2:57:45

change something about this let's say i give it a border that's going to apply to all instances

2:57:53

of that style any icon that has that style is going to get that same formatting so it's kind of like a

2:57:59

reusable element in a way you know where you set the you set what the master template looks like and you make changes

2:58:05

only to that master template but you can have many different instances of the template all around your application and

2:58:11

they will all reflect any changes that you make to that master template so

2:58:16

that's styles in a nutshell i'm going to undo that border and what we want to do here is attach a

2:58:23

workflow now to this icon which is going to take the current sales product right the

2:58:30

product that's in the cell where this icon is okay and add that product to our users favorite products okay add one of

2:58:37

these guys to the favorite products list so we will go

2:58:43

start and edit workflow what we want to do we actually have two options here we can make changes to the

2:58:49

current user that's always something that bubble gives us out of the box so we can make changes to the current user

2:58:56

who's logged in or we could make changes to a thing

2:59:02

and the thing that we decide we're going to change we could choose make changes to lots of different things is going to be the current user now what

2:59:08

do we want to change here we're talking about what field do we want to change right and we've got this favorite

2:59:13

products field okay these are the two fields that we can make changes to on our user so we want to choose favorite

2:59:20

products now okay we actually want because we're dealing with a list we have some

2:59:26

different options here what we want to do is add an item to that list and the item that we want to

2:59:33

add is going to be the current sales product right the cell

2:59:39

in which this icon was clicked

2:59:44

so if i just go step by step for a moment and i go nike shoes okay make changes to the user

2:59:51

and we're adding that current sales product to the user

2:59:58

maybe i'll add a t-shirt and i'll add a digital camera as well and now if we look in the database okay and we

3:00:05

evaluate our user you'll see that there's a bunch of long number strings in here okay these are

3:00:12

the unique ids of these products that we added right remember i said like all we're storing

3:00:18

on the user is the address where we can find those products on the products table on the products shelf okay so

3:00:25

that's what we're doing we're storing the id here so these are all of the addresses or the unique ids of the

3:00:32

products that we've added okay and we probably want to give some kind of indicator that these items have been

3:00:38

added okay so then we come back to our trusty conditional tab okay so now we can do

3:00:44

something really clever we can say something like okay well when the um the

3:00:50

current user's favorite products okay we're taking that list and we're now kind of we want to ask it you know

3:00:57

is the product in this cell that we're evaluating is it inside of this list is

3:01:04

it inside of my favorite products list so we can choose contains current sales product

3:01:10

so does the favorite products list on me as the user okay does it contain

3:01:17

this particular product the product inside of this particular cell

3:01:23

so that question is going to be asked for each cell every single icon in every

3:01:28

single cell is going to ask itself this statement okay so that means that some

3:01:34

of these icons will have the statement evaluate to true and for some of them it

3:01:40

will be false right for the ones that do have a favorite product in the user's favorite products list it will be true

3:01:47

so now we could say okay well maybe maybe we say the element isn't clickable

3:01:53

and the icon color like again will make it kind of a dark a dark blue

3:02:01

right and now you can see okay so this item is in my favorite products list so is this one and so is this one okay so

3:02:09

that's how we can kind of add items and just to kind of round out this picture what if we allowed users to

3:02:15

remove items as well how do we do that well let's bring it all together now the

3:02:20

things that we've learned in this video okay we know that we want the behavior

3:02:26

of this icon to be different depending on whether a certain condition is true

3:02:32

namely depending on whether the favorite products list has this product this particular product

3:02:38

in the cell in it or not so we probably know that we're gonna have to use some kind of only when

3:02:44

condition here right so for the one that we are click that we already have set up

3:02:49

okay we basically want to say like only if the product isn't already in the list

3:02:55

okay then add it into the list okay so only when okay the current user's

3:03:01

favorite products doesn't contain the current sales product then launch

3:03:07

this workflow but we also want the inverse okay if it is in the list then remove it if it's in here

3:03:15

okay and i click the button then remove it or at least

3:03:20

delete the reference to that product from my list of favorite products so

3:03:26

i'll just copy this and change this expression here so that it's

3:03:34

when the favorite products list contains the current sales product okay and then we have to

3:03:41

update this as well because now we don't want to end the product i can click on this by the way and then that allows me

3:03:47

to change it now we want to remove the product so we've got two workflows here that are

3:03:54

both doing the inverse of one another and so

3:03:59

if i click this now in fact i'm not able to and if we go into our debugger we might be able to

3:04:05

get a clue as to why ha so this condition which is saying if this product the product in the cell is

3:04:12

in my favorite products list then it's not clickable okay so the fact that it's not clickable means that we

3:04:19

can't launch any workflows off of it that's what not clickable means

3:04:24

so i should actually remove that condition

3:04:30

and now if i click this see how it's been removed it's no longer

3:04:37

blue and if i click it again it's added so kind of at whim i now have a

3:04:44

ability to add and remove items from my favorite products list

Closing remarks

3:04:49

all right that is the end of this huge mega tutorial we've packed so much in so

3:04:55

well done if you've made it this far there's obviously a ton that we haven't been able to cover here because bubble

3:05:01

is this really complex tool there's lots of layers to it but hopefully you've got a good solid initial foundation now to

3:05:08

sort of go out there and start exploring different avenues do let me know what

3:05:13

you are building i want to know what challenges that you're facing let me know if this video was helpful

3:05:19

one of the next big things that you should focus on learning would be responsive design so i'll link to a

3:05:24

video up here somewhere where you can get a good grasp on responsive design as well otherwise best of luck with your

3:05:31

building and happy bubbling [Music]

3:05:53

you


Taking YOUR Existing BUSINESS

With AI bubble Io

Built ChatGPT in 20 Minutes


I built a ChatGPT app in 20 minutes with NoCode


189,954 views 3 Mar 2023 #NoCode

At a key transitionary moment in my career, I discovered #NoCode. It changed everything for me. And now I'm setting out to change everything for you. /// FREE MASTERCLASS Use this link to watch a free, 1-hour masterclass: https://NoCodeAdvantage.com/free-mast...


/// DON’T MISS MY NEXT VIDEO Click below to subscribe so you never miss out!    / @nocodeadvantage   /// PRIVATE COACHING Book a private coaching session with yours truly! https://jordanrichardson.paperform.co/ /// TRY THE BEST NOCODE TOOL (BUBBLE): 

TRANSCRIPT

PART - 1 

0:00

AI is coming for your job well maybe

0:05

[Music]

0:07

when tractors and combines were invented

0:10

they definitely put a lot of low skilled

0:12

laborers out of business if all you knew

0:14

back then was how to push a plow you

0:16

were in trouble but is farming totally

0:18

obsolete today no way the farmers who

0:21

were stuck in the same old way of doing

0:23

things were put out of business but the

0:25

farmers who chose to leverage and take

0:27

advantage of the new technology thrived

0:30

and were more productive than ever

0:31

before same principle applies to Tech I

0:34

mean if you're a junior developer who

0:36

just Googles copies and pastes code all

0:38

day I'd be a little bit nervous if

0:40

you're a copywriter who just writes

0:42

words without deep human touch I'd be

0:45

worried if you're a business owner who

0:46

isn't actively thinking about how

0:48

artificial intelligence might enhance

0:50

your solution you're probably going to

0:52

get outmatched here pretty soon by the

0:54

competition I mean the proof is in the

0:55

pudding look at all the companies

0:57

rapidly adding AI to their product right

0:59

now Snapchat is using it as an

1:02

experimental product for casual chats or

1:05

even for help with custom poetry about

1:07

friends instacart is using it to enhance

1:09

their search feature so users can get

1:12

inspirational shoppable answers to their

1:14

food questions Shopify has added a new

1:17

shopping assistant feature which makes

1:19

personalized shopping recommendations

1:21

based on user requests and these are

1:23

just a few of the thousands of services

1:25

out there turning to AI to enhance their

1:28

offering here's the cold hard truth if

1:31

you ignore AI or think you're good

1:33

without it you're probably going to be

1:35

in trouble but if you Embrace and

1:38

leverage AI to your advantage you'll be

1:40

more potent than ever it is your destiny

1:43

so I'm assuming you're not a

1:45

gajillionaire with access to funding and

1:47

devs and resources to build your own

1:49

proprietary AI model if that's the case

1:52

this video is for you because I'm about

1:54

to show you exactly how to create your

1:56

own white labeled custom artificial

1:59

intelligence app powered by open ai's

2:01

chat GPT API which just launched today

2:04

by the way in 20 minutes flat without

2:08

writing a single line of code you ready

2:10

let's do this

2:11

[Music]

2:17

time

2:20

all right so when you're in your bubble

2:22

account you'll see something like this

2:24

you'll hit create an app and I'm just

2:26

going to go ahead and say chat GPT 44

2:31

and I'm going to create the app now when

2:33

you first create an app Bubble has a

2:35

little application assistant you can

2:37

just skip that for now

2:39

the first thing you're going to want to

2:41

do is head to the plugins section add a

2:45

plug-in and this top one right here this

2:48

is the number one used plug-in buy

2:50

bubble users so go ahead and click

2:52

install and done

2:54

now you're going to want to add an API

2:57

what API well remember we're connecting

2:59

with chat GPT so let's go to

3:02

platform.openai.com

3:07

go ahead and click get started verify

3:09

you're a human and create an account you

3:12

may need to verify your email I'll do

3:14

that real quick all right so once you

3:16

have your account set up you want to go

3:18

to the API documentation

3:21

and for this we're using chat gbt

3:23

they're brand new API powered by GPT 3.5

3:28

turbo whatever that means but that's

3:31

what we're using now if you want you can

3:33

read through this guide just to kind of

3:35

get more familiar with it but I'm going

3:37

to go straight to the API reference for

3:41

this chat GPT product and again I don't

3:44

know how to code so what I'm looking for

3:47

is this curl code right here I'm

3:50

literally going to just copy this curl

3:53

code and I'm going to go back to my

3:55

bubble editor

3:56

and I'm going to go to this button right

3:59

here that says import another call from

4:01

curl

4:02

and I'm going to paste what I just

4:04

copied and import now this old one I

4:08

could just trash because I don't need it

4:10

anymore

4:11

and now this API I can call chat GPT

4:16

and as you can see bubble Auto magically

4:20

imported the entire call and structured

4:22

it exactly how we need it to be

4:24

structured well almost exactly

4:27

the only thing we need to replace is we

4:30

need to put our API key right here

4:32

instead of these words so let's go back

4:35

to open AI and click personal

4:38

and go to view API keys

4:42

now you're going to want to create your

4:44

very first key and copy it and you'll

4:48

never be able to see it again so make

4:50

sure you got it copied and then go

4:53

straight back to bubble and in place of

4:55

the your API key words just paste that

4:59

key now we should be good to go the

5:01

prompt we're giving to chat gbt is hello

5:04

let's see what Chachi BT says back if I

5:06

initialize this call hooray it worked

5:10

now how do I know it worked because this

5:13

pop-up here is showing all of the

5:15

returned values that open AI is sending

5:18

back to us after having received our

5:21

prompt so I always kind of like to look

5:24

here at the raw data here now open AI is

5:27

sending us an ID which I don't really

5:29

care about it's sending us an object

5:31

sending us a bunch of mumbo jumbo here

5:33

it's sending us kind of how many tokens

5:35

we used you can look at their pricing

5:37

and see how much a token is worth and

5:40

then it's sending us the response that's

5:44

what I really care about it's saying

5:46

hello there how can I assist you today

5:47

so that's what I care about so if I go

5:50

back up here I don't care about this so

5:53

I'm just going to ignore it I don't care

5:54

about this I'm going to ignore it I

5:55

don't care about this this this this or

5:59

this

6:00

the only thing I really care about is

6:03

the choices section that contains the

6:06

message that contains the content so I

6:09

could even get rid of the role I don't

6:11

care I know that it's my robot assistant

6:13

I do care about the message content I

6:17

don't care about the finished reason for

6:18

now and I don't care about the index for

6:20

now now I can hit save the last thing

6:22

we're going to want to do real quick

6:24

before we move on is we don't want to

6:27

always say the word hello to the Chachi

6:29

BT right we want to be able to type in

6:31

whatever we want to type

6:33

so let me go ahead and highlight this

6:36

and Bubbles says use these open carrot

6:39

closed carrot symbols for dynamic values

6:42

so let's do that because this is we

6:44

don't want to always say the static

6:45

hello we want this to be dynamic so

6:48

let's go ahead and say open carrot close

6:50

carrot and then just say user prompt or

6:54

something like that in the middle now

6:56

that gives us the ability to add our own

6:59

custom user prompt I'm going to uncheck

7:02

private here and I'm going to check

7:03

private here and here because these will

7:05

always stay the same

7:07

so now for my user prompt I could say

7:09

something like how old are you and

7:13

re-initialize the call and now as you

7:15

can see it's coming back with I am an AI

7:19

language model and do not have an age as

7:21

humans do all right fine hit save and

7:24

our API connection is ready to roll now

7:27

let's build the ux let's go back to the

7:30

design tab let's grab a group element

7:33

throw it on the page

7:35

something like that should do and I

7:38

personally like to change the layout so

7:40

I'm going to double click anywhere on

7:42

the page and go to layout and then

7:45

choose not a fixed container I like to

7:47

do like maybe for this we could do an

7:49

aligned a parent container so now I have

7:52

my group and I'll make it a column

7:55

container and I'll Center it vertically

7:58

in the middle of the page now I'm just

8:00

going to make this page background like

8:03

a nice little gray here just a subtle

8:05

Gray

8:06

and then I'll make this group itself

8:08

maybe just like a flat white and I'll

8:12

give it a little bit of a shadow

8:15

and give it a roundness of 20. this will

8:18

be our chat prompt box let's give this a

8:21

title so I'm going to throw in a piece

8:22

of text here maybe something like that

8:25

and I'm going to say

8:27

no code GPT I'm so creative with my

8:31

naming I know and I'm going to hit

8:34

Center here and I'm going to go to

8:35

layout and center the whole element I'm

8:38

going to go to this group as you can see

8:39

this text element is snug right up to

8:42

the top of this group

8:44

I'm going to go ahead and go to the

8:46

padding and just give it a little bit of

8:48

padding like 30 all around 30 pixels all

8:50

around now I'm going to bring this size

8:52

up

8:55

all right next I need a way for the user

8:58

to type their prompt right so let's go

9:01

and grab something called a multi-line

9:04

input

9:05

and I'm just going to throw that in here

9:07

somewhere maybe this size ish and I'm

9:10

going to remove the style and maybe make

9:12

this I like the font enter and I'm going

9:15

to Center this thing now I'm going to

9:17

grab a text element that will kind of

9:19

serve as my button to submit and I'm

9:22

going to remove the style

9:24

and I'm going to Center this text

9:28

and I'm going to Center the element

9:30

itself

9:31

and now I'm going to go back to the

9:34

appearance

9:35

make the line spacing one and center the

9:38

text vertically

9:40

now I don't want the button to be right

9:42

up next to the input so let's give it a

9:44

little bit of margin here in the layout

9:49

all right now let's go to back to the

9:51

appearance and make the background maybe

9:54

like a

9:55

a blue

9:59

bring the roundness to like 20 or

10:01

something we can bring the font color to

10:03

white now I don't want it to say edit me

10:06

we can say something like submit and we

10:10

might even make it bold now as you can

10:12

see there's some Dead Space here at the

10:14

bottom so let's go to layout and let's

10:16

bring this down to zero at minimum and

10:19

that way it'll just fit the height to

10:22

the content that's within it alright so

10:24

what's next what do we want to have

10:25

happen when they type in this input and

10:28

hit submit well we want it to give us an

10:32

answer right so to give us an answer

10:34

what do we need to have happen well we

10:36

need to Ping the open AI API have chat

10:40

gbt process and answer for us and then

10:43

ping our app back with that answer so

10:46

let's right click on this button and

10:49

start edit workflow that means when they

10:53

click on this button what workflow will

10:55

occur let's see

10:58

as you can see that automatically took

11:00

us to the workflow tab which uses kind

11:03

of like an if then logic so if this text

11:06

is clicked then what do we want to have

11:10

happen well the first thing we want is

11:12

we want to call that chat GPT API and

11:15

it's not here because I need to go to

11:17

the plugins and right now I'm using it

11:20

as data I want to use it as an action

11:24

now if I go back to the workflow and I

11:26

say chat GPT there we go we have our

11:30

call by default we have how old are you

11:33

but we don't want it to always ask how

11:35

old are you we want it to be dynamic

11:38

depending on what the user just typed in

11:40

the input so we'll insert Dynamic data

11:43

and what data where do we get the text

11:46

that we want well from

11:49

let's go back to the design tab this


PART - 2 

11:51

from this multi-line input called

11:54

multi-line input a or you can name it

11:57

whatever you want maybe I could name it

11:58

prompt something like that so I'm just

12:01

going to copy all this command C and go

12:04

back to my workflow and go back to the

12:07

dynamic

12:08

expression and say I want whatever's

12:12

inside of multi-line input prompt I want

12:15

its value to be the prompt all right

12:18

that's awesome we're going to call

12:20

Chachi BT with our prompt and it should

12:23

work but how do we actually display the

12:26

answer we receive well let's go back to

12:28

the design Tab and what I'm going to do

12:30

is I'm literally just going to copy and

12:34

paste so now if you go to the elements

12:37

tree you might notice that I have group

12:39

a and I have Group B so group a we're

12:43

just going to go ahead and say that's

12:44

group prompt

12:46

and now I'm going to hide that

12:48

temporarily and I'm going to go to Group

12:50

B and I'm going to call this grouped

12:52

answer

12:54

now the answer I receive will be

12:56

displayed here so I don't need an input

12:58

so I'm just going to trash that and now

13:00

I'm going to go get another piece of

13:02

text throw that in here somewhere remove

13:05

its style let's make it black let's go

13:08

to the layout let's Center it let's get

13:11

rid of its minimum height for now and

13:14

let's go back to the appearance and

13:16

let's say we don't want it to always say

13:18

edit me we want it to say whatever the

13:21

response from Chad gbt was right well

13:24

how do we know what response it was well

13:27

that goes back to the workflow and I'll

13:28

show you that here in just a second what

13:30

we're going to do is we're going to take

13:32

Chad gbt's response and we're going to

13:35

send it or display it in this group

13:39

answer right so we need group answer to

13:42

know what to expect right so let's go to

13:45

the type of content and say we're

13:47

expecting what is it an image is it a

13:50

file what is it no it's text so we're

13:53

going to say the type of content of this

13:55

group is going to be text now the data

13:58

source is going to be empty initially

14:01

because we don't quite yet have an

14:03

answer from Chachi BT but once we do we

14:06

will provide that data at that point all

14:09

right so now back to the text element

14:11

where is it let me open up my group

14:13

answer and we got the title here and we

14:16

got the text element that's flat because

14:19

it has nothing inside of it and I'm

14:21

going to click on this Dynamic

14:22

expression and say I want to grab from

14:25

the parent group's text right so this

14:28

text it's parent is group answer and

14:32

group answer is what we're going to

14:34

display Chacha BT's answer in maybe

14:37

we'll make this italicized or something

14:39

so it looks more like a quote from a

14:42

robot I guess and then let's go to the

14:45

submit button and obviously they're not

14:46

submitting anything here so we'll just

14:48

say ask something

14:51

else all right so let's go back and

14:53

start from the beginning really fast

14:55

just so that we're on the same page

14:56

we're going now to group prompt so when

15:00

they type something in and they click

15:02

submit I'm going to right click Start

15:05

the workflow for that

15:07

I'm calling chat GPT what am I calling

15:11

it with well the prompt that they typed

15:13

and once I get my answer I'm going to go

15:15

ahead and hide group prompt because I

15:19

have my answer I don't need it anymore

15:20

I'm going to display the answer in group

15:25

answer

15:27

what data do I display well whatever

15:30

Chad gbt answered so let's click on this

15:33

and say we want the result of Step One

15:36

whatever we got from step one from that

15:38

API call we want to pull remember it was

15:42

in the choices category and we'll say

15:45

the first items

15:47

message content Okay so we've hidden

15:50

group prompt we've shown the answer but

15:52

now we've got to actually show the

15:54

element

15:56

group answer

15:57

now we're doing this hiding and showing

16:00

of these groups and I just realized we

16:02

probably should real quick go to group

16:05

prompt and say you are visible on page

16:09

load and group answer you are not

16:13

visible on page load because we'll just

16:16

be showing this group in that workflow

16:18

After we receive the answer we're not

16:21

quite there yet but let's just give this

16:23

a preview and see where we're at now I'm

16:26

going to go ahead and get rid of this

16:29

question mark debug mode equals true

16:32

just because that this is Bubbles debug

16:34

mode and it is useful but right now I

16:37

just want to see the app as a user would

16:39

see it so I'm going to delete that and

16:41

refresh so I've got my no code GPT and

16:44

I'm going to go ahead and type where are

16:47

you from I'm so creative I'm going to

16:50

hit submit it's doing some thinking and

16:53

boom we have an answer awesome well

16:57

let's ask something else well nothing's

16:59

happening I'm clicking and nothing's

17:00

happening why well because we didn't

17:02

build the workflow for that so let's go

17:04

back and let's click ask something else

17:07

right click and start the workflow for

17:10

that and what do we want to have happen

17:12

well we want to go back to the prompt

17:15

group and hide the answer group right so

17:19

let's do that let's just say hide group

17:22

answer show

17:24

group prompt and let's see what that

17:28

gives us let's refresh the page let's

17:31

say give me one sentence about New York

17:37

City submit and there it is now let's

17:41

try our ask something else workflow if I

17:44

click ask something else it goes back

17:46

but I see a problem here I don't want my

17:49

last prompt to be in that input I want

17:52

it to be erased and cleared out so I can

17:54

ask a brand new prompt let's do that

17:56

real quick

17:58

if I go back here after I've hidden the

18:01

group prompt I've displayed the data

18:03

I've shown group answer I want to do one

18:07

last thing called reset relevant inputs

18:11

that should get rid of what's stuck in

18:14

here let's refresh the page and give it

18:16

one more try write me a poem about how

18:20

cool no code is submit boom there we go

18:25

we've got an answer now how could we

18:28

enhance this well I noticed when I enter

18:32

a prompt and I hit submit it's thinking

18:34

it takes a few seconds to think through

18:36

that so why don't we display its

18:39

thinking visually well let me show you

18:41

how to do that so let me go back to the

18:45

bubble editor and if I go to the submit

18:47

button and I click this I icon here I'm

18:51

going to add a custom State and I'm

18:54

going to call it thinking question mark

18:56

and I'm going to say this will be either

18:58

yes or no

19:01

and I'm going to say normally it's not

19:03

thinking but when I click it so let's

19:08

right click Start the workflow when I

19:11

click it well I'm going to right click

19:13

on step one and insert an action to be

19:16

even before step one and I'm going to

19:18

say I'm going to set the state of this

19:21

text element this text submit

19:25

and what state am I setting the thinking

19:28

one I just barely created and I'm going

19:30

to say yes it is thinking

19:33

and now at the very end we can go ahead

19:36

and copy that and paste that and after

19:39

it's done thinking well it's done

19:41

thinking right so we're going to set

19:43

that back to no but initially it's going

19:46

to be yes now let me go back to the

19:49

design Tab and say if I go to the

19:52

conditional tab of this button and

19:54

Define another condition if I say when

19:57

this text

19:59

thinking

20:01

is yes

20:02

I want it to show something different so

20:05

I want the text to be something like

20:09

processing dot dot dot

20:12

and even better I want it to maybe have

20:14

a little spinner icon so just FYI this

20:18

I'm going to paste this code here this

20:20

gives you a little spinner animation

20:23

just FYI all right let's just see how

20:26

this looks now I'm going to refresh the

20:27

page and say how tall is the

20:33

Stratosphere in Las Vegas question mark

20:37

if I hit submit as you can see it's

20:40

processing so that adds a nice little

20:42

touch now let's ask something else let's

20:44

just do something fun here to enhance it

20:46

just a little bit more let's go to a

20:49

place called lottiefiles.com

20:53

and let's search for a robot animation I

20:58

like this one here so I'm going to

21:00

download and I'm going to download the

21:01

Lottie Json file now let's go back to

21:04

our Bubble app after I input The Prompt

21:07

maybe I want the answer group to look a

21:10

little bit more friendly so I'm going to

21:12

hide the prompt group show the answer

21:15

group and let's just get rid of this

21:17

title let's just put the bot right there

21:19

so the way to put a Lottie Json file in

21:23

is you're going to need to go to the

21:25

plugins section

21:26

and hit add plugins and say Lottie

21:31

and the one I like is called Lottie

21:33

animations maintained so install that

21:35

totally free and go back to the design

21:38

Tab and now that we've installed that

21:40

plug-in if you search here you'll see

21:43

the Lottie element

21:46

grab that

21:47

drop it onto the group

21:49

and let's go let's try something like

21:51

200 by 150 something like that let's

21:55

Center it and let's go to the appearance

21:58

Tab and let's upload that Json file that

22:01

we just downloaded

22:03

all right let's give that a shot and see

22:06

what it looks like refresh the page here

22:08

in our Bubble Run mode and now let's say

22:11

how are you today question mark

22:15

submit we got our nice processing

22:17

animation

22:19

and there it is

22:20

foreign

22:22

so there you have it there's my

22:24

20-minute creation of a custom software

22:26

powered by the most advanced Artificial

22:28

Intelligence on the planet all in

22:31

exactly 20 minutes now the only question

22:33

is this are you going to ignore the

22:36

knowledge you've just gained or are you

22:38

going to leverage it to create the tech

22:40

business of your dreams I'm going to use

22:42

it that's up to you and if you ever

22:44

decide you'd like a consistent Mentor

22:46

for either the business or the tech side

22:48

of things feel free to check out my full

22:50

Academy at nocoatadvantage.com where I

22:52

help non-technical entrepreneurs build

22:54

profitable Tech businesses we do live

22:57

workshops each and every Friday we have

22:59

a growing community and hundreds of

23:01

thousands in perks and discounts as well

23:03

but regardless thanks for checking out

23:06

this video I really appreciate you

23:07

spending a piece of your day with me and

23:09

if you're interested in more free

23:11

tutorials like this be sure to lightly

23:13

tap that subscribe button for me don't

23:16

smash it please and I'll see you in the

23:18

next one have a great day

23:20

[Music]

23:33

[Applause]

23:37

[Music]

23:44

thank you


This NO-CODE Startup Made $3,000,000 Using Bubble.io (Flexiple.com Case Study)


How to Adapt Your Bubble App to Mobile


CLICK HERE TO FIND OUT

https://bubble.io/blog/bubble-mobile-apps/

make money with Bubble.io

How to make money with Bubble.io | $1K+ PER MONTH



Bubble/io - No-Code Webapps wie Reddit und Tinder

Mit Bubble kannst du mächtige Webapps bauen - Die NoCode Revolution

Rating: 3.2 out of 5

3.2 (12 ratings)

82 students

Created by Daniel Wintermeyer

Last updated 8.2021

German

German [Auto]

Current price

₪55.90

Original Price

₪69.90

Discount

20% off

5 hours left at this price!


Connecting external databases to Bubble: Tinybird


How to build a MESSAGING app in Bubble - Flexbox 2022 - Bubble Tutorial


TRANSCRIPT PART - 1

PART - 1 

0:03

[Music] i'm jason and this is build apps without

0:09

code and i've got a treat for you today no it is not an animal cookie

0:15

but i just stole a few of those from my kids and they were yummy

0:20

we're going to take a look at how to add messaging to your bubble app like a chat

0:27

dming i'm going to show you how to allow your users to slide into each other's dms

0:35

and we're going to design on bubbles new responsive flexbox engine

0:41

let me show you a quick preview of what we're going to build before we jump into it so remember when we started building

0:47

an airbnb clone earlier on this channel i already built some of the messaging functionality here so

0:54

let's take a look-see i'm signed in here as chad looking for a place to stay

1:00

considering both of these beautiful options salty bluetooth and cozy two-bedroom cottage i'm going to click

1:05

into salty bluetooth now i added a couple things here since the last airbnb video

1:11

hosted by lauren so i added a field to the property table for host

1:16

which is linked to the users table and i added this send a message button here so if i

1:22

click into here i can see my message history with lauren

1:28

i said salty blue is the place for me how much salt are we talking she replied obviously the environment at

1:34

salty blue is also the ceiling is salt the floor is sold the walls are sold and to an extent the

1:40

air is salt and when you breathe that in you constantly taste the salt so as chad i said i must admit salt is a

1:47

way of life and it is life for me i'm sold i then went on to request pepper to go with my salt she said no pepper i

1:53

said that was a trick question she said are you going to book a date or you're just going to throw salt at me in my dms

1:59

we'll get back to her in a sec i also have a message from jocelyn you can see that it's unread because there's a little blue dot here

2:06

so let's click in jocelyn she was the host of the other gravenhurst property i said um you said your property has an

2:13

abundance of trees and wildlife exactly how many trees are we talking and then i said also do you have bears

2:18

what kind of bears would you say is best she replied that's a ridiculous question

2:24

false black bear um well i could type in a reply here and i'm going to say false

2:32

black bear okay so if i sign in as jocelyn you

2:38

would see that she has an unread message we'll do that in one sec and i'm gonna go back to lauren here and

2:44

say um question

2:51

can i bring a black bear

2:57

cool if i head back here we'll try running as jocelyn

3:02

jocelyn only has a message from chad unread and here one minute ago i said false

3:09

black bear and if i sign in as lauren

3:19

here's my message from chad okay you've seen the preview we are

3:26

going to build this exact same functionality but here inbox chat

3:33

which is a new app i made just for you now if you go to build apps without code.com slash bokchat

3:40

2cs i will send you access to this exact bubble project in view only mode so you

3:46

will be able to see exactly how we did it okay

3:51

bok chat the first thing we need is a way for the user to choose who they want to start a

3:56

chat with this might be a little bit different for all your apps in the airbnb example we just looked at

4:03

there was a send a message to the host button on the property page for this video i already have a list of

4:09

users here in a simple repeating group now you can see that i am logged in as lois

4:14

and i can send a message to peter meg or stewie

4:19

but if i choose one of these it takes me to a new page the page is

4:24

blank this is what we're going to work on today let's do it

4:30

here's a page we're going to work on this is already on the new response dimension so you might have to upgrade

4:37

if you haven't already the width i'm going to use here is

4:44

1280 height 600 is good for now and type of content we still have to add

4:50

our tables so we're not going to set that yet i'm going to drop a group on the screen

4:55

here we'll call this group chat

5:01

and this is going to be the left side where the list of conversations or chats

5:06

are i know this floating group i have up here is 80 pixels

5:11

20 padding on the top bottom and the middle is 40. so i'm going to put 80 pixels margin on

5:17

that group just so it sits right underneath we're going to make a column

5:25

not fixed with no min width let's drop another group in

5:31

this one's going to be group messages which will be the right side where the individual messages are after you select

5:36

a chat not fixed width min width 0

5:44

at least i want to be side by side right now they're sitting on top of each other if i go to my main page

5:50

i want the layout to be row so now these are actually side by side

5:56

this one needs the margin of 80 on top and the chat one is actually going to be fixed

6:02

i'm going to recheck fixed width we're going to try 400 to start

6:10

and the height i'm going to make 100 so it goes full width of the screen

6:17

same thing over here 100 percent

6:22

okay now on this right group here group messages i'm going to put a border on the left just so there's a border in between

6:31

so i'm going to remove this style here and i'm not going to use border style i'm going to use shadow style outset

6:38

horizontal negative 1 which will put it on the left side and the rest of these can be 0.

6:47

this will be black but with an opacity of 10. let's see if that works

6:53

cool so you can see my left group here 400 pixels and then my right group takes up the rest of the space

6:59

now i want a caption on both sides so let's drop another group in call this one group

7:06

chat header

7:12

this is going to be a row

7:18

now fixed width min width 0 let's put 100 height for now

7:25

and let's throw a text object in there we'll call it chats

7:32

i have a style here poppins 14. let's put a bit of padding on this header group

7:38

20s and we can take off the min height now

7:44

since there's an object in there and for this text element not fixed with

7:50

min width 0 min height 0 and that just fits nicely

7:57

cool now i want to border on the bottom here

8:03

remove style i would set hor vertical offset

8:10

1

8:17

black 10 good now i want this same thing but on

8:22

the right side and i wanted to say messages for now

8:28

so i copied this paste it here and this will change to messages

8:34

[Music] all right looking good

8:42

let's put in the tables next

8:47

data all we have right now is users and if i go into users

8:53

here are my users i have set up stewie meg lois peter

8:58

we want a couple more data types though so i'm going to say new type the first one we need is

9:03

chat which will be a list of conversations or chats

9:11

and let's add some new fields only one field we need here i think

9:17

which would be users this will reference the user table and

9:22

we're going to make it a list because you can add more than one user to the chat

9:28

this will allow you to add at least two but more in the future if you want

9:34

and we need another type for messages called message

9:40

now here we need which chat does the message belong to so these are individual messages

9:46

which chat does it belong to who is the message from

9:52

this will be a single user what is the actual message

9:59

text and has the message been read or not that

10:05

will be yes or no that should be good give me one sec i'm actually just going

10:11

to populate these tables with data so we have something to work with as we build our app

Search for chats

10:16

okay i put one chat in between lois and meg now we're gonna go back

10:21

to our index page and i have a workflow here already on

10:27

this group group user in the repeating group row

10:34

which goes to the box chat page where the chats are

10:39

so the date i'm going to send i'm going to do a search for chats

10:48

where the users list contains the current sales user so whoever i

10:54

clicked on so if i clicked on stewie then we want to open a chat with stewie

11:00

in it but also where it contains current user which is

11:06

the user signed in so we want to find a chat that has both the user i clicked on and the user that is signed in

11:14

so in this case i want to find a chat with stewie and lois if i click on stewie

11:21

and i want to get the first one found because there should only be one now we need a condition here

11:26

this is only going to happen when this chat is actually found if this chat doesn't exist then we need to create it

11:33

but if it finds a chat that exists then we're going to go straight there so we're going to put in the same

11:39

condition so i can copy this paste

11:44

we're going to search for chats where the user contains current sales user and the user contains the current user

11:50

and we're going to get the first one and we're only going to run this action if that is not empty

11:58

so if it finds a chat that already exists then we're going to send them to the page if it doesn't we need we need to

12:05

create the chat first so new action create a new thing

12:12

create a chat so let's take this condition or expression

12:19

copied here this we're only going to run if it is empty first item

12:27

is empty so the opposite so if it doesn't find a chat it's going to create one

12:32

okay so in this chat we're going to add a user which is going to be the current user

12:38

remember this is a list of users so we can add as many as we want in this case we're just going to add two we're going to add another user

12:46

which is the user from the row that we clicked on now if a new chat was created we still want to go to the page so we're going to

12:52

do another go to page we're going to box chat

12:59

this time we're sending the results of step two so whatever chat was created in step two that's the data we want to send

13:09

now back in our box chat just make sure that type of content is chat because that's

13:16

the data we're sending so we need that to match just to make sure this works i'm just going to throw a text object on the

13:22

screen here dynamic data current page chat list of users

13:29

each item's username so if i click on meg can i help you it

13:34

should create a chat with lois and meg if one doesn't exist

13:42

there it is low some big and if i

13:48

click down stewie lowestness to me

13:54

all right let's add the repeating groups repeating group on the chat

Group chats

14:00

side call it competing group chats this is going to be a list of chats

14:05

and we're going to do a search for chats where the users

14:12

contains current user so we only want to show chats that the signed in user is a part of we

14:19

don't we don't want to show chats that they're not a part of

14:25

uh we don't want a fixed number of rows we can set this at

14:30

100 for now fixed number of columns will be one container layout

14:36

row because we want things side by side and not fixed width

14:44

zero min width zero min height

14:50

we can uncheck this okay let's drop a group in there

14:55

called group chats enter this is going to be a row

15:02

not fixed with no min width uh we'll drop this to 100 for now

15:07

i want some padding on here so we'll put 20s and the type of content is going to be

15:14

a chat from the current cell so now we can drop in

15:21

text into that group and we'll start off with the parent groups chats

15:28

users each item's username

15:35

so now you can see all the chats that lois is a part of we have one from megan one for stewie

15:40

and if we go back and click on peter

15:48

now we have one for peter peter griffin all right let's make this look a little bit nicer now for

15:55

we're going to put our poppins 14 on here

16:01

and this does not have to be fixed with no min width

16:08

no min height and i don't actually want to show lois in the name here i just want to show who

16:14

the other person is so let's do this slightly a slightly different way

16:19

parent group chats instead of each item i'm going to put

16:24

filtered where the user name

16:30

is not equal to current user then we can get the first one

16:37

because in this case the way we're building it there's only two people per chat you could build it with more than two people

16:43

but uh in this case we want to just filter out the current user's username and that'll just

16:49

leave us with the other user so we got meg stewie and peter lois is taken out that's good what

16:56

and i also want to put in the user's profile picture so let's drop an image

17:04

this is going to be dynamic parent group chats

17:10

users we're going to do another filter because we don't want to show the current user's profile picture

17:19

username not equal to current users username

17:24

first items profile picture

17:32

with image ix and we're going to resize to fit dimensions by cropping make the stretch

17:39

and now we can set the size as a fixed width which we'll do as

17:44

50 with the aspect ratio of one to one so we'll just get a nice

17:50

square here um this one we want to be first we want it to be on the left side so i'm just

17:56

going to click previous or make first then i'll put it on the left side let's see

18:02

all right couple things um let's make it a circle let's center this and let's put some gap

18:07

spacing so our image roundness we'll just put it to a high

18:12

number 50 should work that'll make it completely round this

18:21

should have vertical alignment and this group

18:27

should have gap spacing between elements column spacing of 20.

18:33

looking better take out the border and we can also collapse the height so

18:39

on that group chat inner min height set to zero so it just fits around the elements in there

18:46

and on the repeating group remove style separato

18:53

none what's next i don't know let's put the messages grid on

Repeating group

18:59

repeating group in messages

19:07

type a content message data source do a search for message

19:14

where the chat equals the chat we selected here

19:20

and i'll show you why we're going to set it to current page chat

19:27

back over here on our workflow when you chose a user we're sending data

19:34

we're sending the chat that has that user in it we're going to open it on the other screen by default

19:40

okay let's finish this repeating group minimum height 100 that's good for now

19:46

this is going to be row not fixed with

19:54

and let's do a test i'm just going to copy this put it over here actually no

20:01

drop a group in first

20:11

set it to 100 for now put in some padding

20:21

now i'm going to drop in text and we're going to grab the parent group

20:27

we've got to set the parent group type of content first which will be message for the current cell so this is going to

20:33

show each individual message for the chat that we opened and this

20:38

parent groups message message so if we come back here and we choose meg

20:46

we get some messages because that's the data that i put in and it opens up meg automatically

20:52

because i chose her on the previous screen if i chose like peter for example

20:57

it will open up his message but it's blank because i don't have any data there yet however i also want this to work if i

21:04

choose someone from the left side here so we need to add a workflow

21:09

so let's take this group group chat enter start a workflow we're gonna do something similar go to

21:16

page we're gonna open the same page

21:21

and the data the data to send this time is going to be the current cells

21:27

chat so here's our id but if we choose someone else see the id

21:33

changes now we can open up everyone's messages oh yes and what was that

21:39

beginning middle and end part again all right let's clean up this uh messages repeating group here

Group messages

21:46

i'm gonna take this out for now and we're gonna add another group here

21:52

so it's gonna be called group messages enter

21:59

the others why are we calling it the others we're gonna make this like um

22:06

imessage or like whatsapp or you have chat bubbles and your stuff is on the

22:12

right in a chat bubble and everyone else's stuff is on the left

22:18

so this one's going to be the others not mine type of content messages

22:26

parent group's message it's gonna be a column because uh the stuff inside is gonna be stacked on top

22:31

of each other no fixed width but we will have a max width we're gonna try 60 percent

22:39

and you'll see why soon min height let's just do 100 for now

22:46

close that up later let's take this copy it paste it here

22:51

fix it up parent groups message this is going to be

22:59

the username so message from

23:04

username so whoever sent the message that's going to be their username

23:10

now right below it

23:15

we're going to put the actual message

23:21

the username i want bold though i'm just going to put b in square brackets

23:27

slash b so i can get bold on top and now that we have some

23:33

elements in this group i can close it up by taking off the min height

23:41

and also on the cell row or the inner group outer group


PART - 2 

23:48

okay so here's our conversation but we want um lois's stuff since we're signing in

23:54

as lowest to show up on the right and then meg stuff to show up on the left

24:02

so not loving this style let me just change this to regular

24:13

makes it look a little less bold a little bit of cleanup i also want this

24:18

top header here to span the entire width

24:24

and right now it's got a

24:31

there it is right now it's got a max width of 1280 so we'll just take that off

24:39

that looks better okay so i want this to show up in a bubble

24:45

so if i take a look at my elements here group enter the others this is the one i was

24:50

working on i want some padding so we'll say 10

24:57

10 try 15 on left 15 right

25:02

we want it to have a background color so let's remove this style

25:08

flat color we'll do it like a light gray

25:16

and we want some roundness so let's try 20. looking a little better um

25:21

maybe make that a little bit darker we want that group to fit the content

25:28

because it's spreading out pretty wide there so fit with the content looks good

25:34

take off the separato on the repeating group all right now

25:40

we still need to move lois to the right side before we do that i want to put a date uh underneath

25:46

to say like when that message was sent now we can do that with a plugin called

25:53

relative time so if i go to plugins add plugin this one's called

26:01

relative time this is gonna let me show like based on the created date of the message

26:07

it'll let me show if it was created a few seconds ago or a few minutes ago or a few hours ago or

26:12

four days ago so here it is relative time i'm going to drop it right in here

26:19

call this relative time others the date is going to be

26:25

parentgroup's message create a date

26:34

and we're going to make it small i'm going to take this copy paste drops

26:40

right underneath because it's column group this is going to be

26:47

relative time others current value and we're going to make a little smaller let's try 11.

26:53

cool now you can see when these messages were put in i think we're good so now

Conditional formatting

27:00

let's put a condition on this group here this group's message from is

27:07

not going to be the current user because the current users stuff we want on the right side this is going to be the stuff

27:12

on the left side so froms username

27:18

is not current user's username

27:25

so when that's true this element is visible otherwise

27:30

it's going to hide this element is visible on page load unchecked

27:38

now it's only showing meg stuff there's some space in between that's fine because lois's stuff is going to

27:44

show up on the right side and take this group copy

27:51

paste and let's show it

27:56

there we go

28:02

change the name to group messages enter mine

28:08

change the background now i'm going to take the imessage color

28:14

that nice blue color they have so here it is here

28:28

okay now they're both showing up as meg so change the conditional formatting

28:34

this group's message from username is the current user so change that to is

28:40

then we show it

28:46

there we go so the lowest is stuff showing up in blue make stuff showing up in gray

28:51

now we want lowest stuff to show up on the right side so this outer group

28:57

container layout is row because it's side by side container alignment right now we have

29:03

everything pushing to the left we want it space between and that's going to push

29:08

the group on the left to the left and the group on the right all the way to the right lois says listen up everyone it's time

29:14

for spring cleaning meg says spring cleaning oh not again

29:19

lois if we all pitch in we'll be done in no time meg mom i can't clean i got stuff to do

29:25

i'm sorry that that is a really boring story this relative time thing this one says others this one

29:32

we'll call this one mine good now these we're done with these

29:37

i'm just gonna make them really small so we don't have to see them one one

29:44

one one they're still there they hide now we don't see them

29:51

um next thing i want to do is put the last message on the chat right underneath the name so underneath

29:57

meg here it should say the last message which which was mama can clean i've got stuff to do

30:04

so copy and paste this now

30:09

let's actually want to go underneath not to the right so we need a new group

30:16

here we can choose this and this right click group elements into column

30:23

and that's going to stack them this column group we'll call it group chat

Group elements

30:28

inner last message we need to change the width so that it

30:34

fits in this 400 pixel group that we have set up here

30:40

so we have 400 we have 20 pixels in each side let's do some math

30:46

400 minus 20 minus 20. we have a 50 pixel

30:52

picture minus 50. we have gap spacing of 20.

30:58

let's try 290.

31:08

uh so here we would set the max with some min width zero max width

31:14

there and then it fits nice and snug to the right there

31:19

this is going to be different this is going to be

31:24

let's erase this we're going to do a search for the last

31:31

message for this chat so where the chat sequel to paragroup's chat

31:39

and we're going to get the last item that's going to give us the last message and we want the message

31:45

there we go these ones don't have messengers yet this one does we need to center that

31:57

let's just bold the name a little bit that's a little better

32:04

and this one maybe we'll just make it a little bit smaller

32:11

and this whole group here take off the min height

32:16

what about me all right i'm gonna put in some data for lois and peter just so we have some more uh

32:22

conversations to work with here so we have a chat now with peter

Sending messages

32:28

hey yo lois what i'm packing for kiss stock and i can't find my favorite underwear

32:36

we need an input at the bottom so that we can actually reply and create messages

32:42

so let's grab another group and drop it here

32:47

call it group messages input

32:55

this will be row subfixed width min with zero let's do

33:00

100 height for now all right our group is kind of being

33:07

hidden here so i'm just going to change the outermost group group messages where

33:13

we have 100 percent let's just change that to 80 for now we'll push it back down after

33:21

so we want to input in here so let's put on some padding first

33:27

20s

33:33

input throw that in call input message

33:41

and we're going to use the same style here so we used puppins

33:51

14

33:58

not fixed with no min width we'll try 40 height

34:04

and actually just take out these conditionals don't need those

34:10

and let's close up this group

34:17

i'm in height zero we also need a button

34:23

drop a button in here since it's row it's going to go right beside

34:32

button will be called send

34:40

let's make it black

34:48

with 100 maybe yeah

34:53

right 40 and gap spacing on that group so there's a little bit of space between the input and the button

35:04

getting there now we need to build a workflow on the send button

35:11

so this is going to create a new thing it's going to create a message

35:21

the chat is going to be the current page chat that's the one that's currently open

35:28

from is going to be the current user that's the user signed in

35:33

message will be the input whatever they type there

35:40

isread will default to no we'll work on is red soon

35:47

and reset relevant inputs all right

35:54

so log in as louis meg just said i can't clean i got stuff to do

36:00

sweetheart [Music]

36:06

we all know that you don't have any stuff to do

36:12

now i don't want to hear any more excuses end of discussion

36:19

there you go there's lois's last message a few seconds ago

36:26

peter i'm packing for kiss sock and i can't find my favorite underwear

36:32

lois you mean the pair with the rip

36:38

and the right buck cheek

36:43

beautiful now let me show you this data for a second

36:50

app data messages right butt cheek is red is no

Unread messages

36:57

sweetheart is red as now let's work on israel

37:05

i'm going to put a little shape here right beside the message which will show

37:11

if it's unread shape called shape unread

37:20

and we'll use the same color as we did over here once we a little bit smaller

37:30

try 15 and we want it to be a circle so high roundness

37:37

okay now we want it to show beside this not underneath it

37:43

so remember select first parent this group we made 290 well now we just added

37:48

another 15 pixels plus another gap spacing of 20 so we need to add

37:54

35 minus 35 so quick math

38:02

oh 255. and this we want to vertical align center

38:12

looking good except this is we want i want it to show all the way to the right

38:18

so this outer group container alignment space between

38:27

didn't quite work because now the name is showing up in the middle

38:35

this and this we need to group row

38:44

gap spacing 20. make sure this is centered

38:53

there we go now we need a condition this should only show up in certain scenarios

39:00

we're going to search for messages where the chat

39:06

is equal to the chat from or the parent group chat

39:14

is red equal to no

39:19

because we only want to show it if they're not red and the user

39:28

the from does not equal

39:34

current user because we only want to show if there's not read messages from other

39:39

users not from myself

39:46

now that search is going to get a count how many messages are unread

39:52

and if that count is greater than zero if any of them are unread

39:58

then we want to show this little blue circle hide on page load

40:06

louis doesn't have any unread messages but we just sent a couple for meg and peter

40:13

let's log in as peter appdata run as peter holy crap i am freaking out

Read messages

40:21

all right let's change this to false

40:27

peter only has one chat with lois and there is an unread one so if i click it

40:36

that was my unread one but this didn't go away so we need to add a workflow here when we click on the message

40:42

to set is read that field to yes we already have a workflow here so let's go here

40:48

group chat enter now we want to make changes to a list of things and it's a list of things because we want to

40:55

mark all the messages that we haven't seen mark all of them as read so message

41:03

to a search for messages where the chat is equal to

41:09

current sales chat where is red is now

41:18

where user from is not equal to login user

41:24

and for that list of messages we want to change is read to yes

41:31

while we're in here there's one more thing we can do which is scroll to the bottom

41:38

so if you have a bunch of messages it's just going to stick to the top and you have to scroll all the way down but we wanted to scroll automatically

41:44

so on repeating group messages entry to scroll to we're going to do a search for messages

41:52

where the chat is equal to chat from row turn sales chat

42:00

we're going to get the last one so it's going to scroll to the last message which should show up at the bottom so now when i click

42:07

on lois you can see that blue dot went away because now they're all marked as red

42:13

so if i uh sent a message back to lois here [Music]

42:19

no the pair with the hole

42:25

in the left butt cheek oh that one was hilarious that was even funnier than your first joke and we go

42:31

run as lois now i have an unread message from peter

42:42

and that's why we get the blue dot and if we look at the data for a second

42:49

isread is no on the message from peter

42:54

and if i click it it goes away because now i've seen it so

43:01

that becomes yes let's put that same blue dot over here and then we are done

43:13

and copy and paste adjust the condition a bit

43:19

do search for chats where user

43:24

contains parent groups user user contains

43:31

current user so messages

43:36

oops first one

43:42

so messages where the chat has the user that you clicked on and the current user is read as no

43:49

from is not the current user then we're going to show it

44:01

we have an unread message from stewie

44:10

we have a lot of unread messages from stewie i'm a dirty foul little boy uh

44:16

this unread is only happening when you click here but it's not happening on load

44:23

so let's do that first then we'll reply to stewie

44:32

we're going to add a event for pages loaded

44:42

and make changes to lists of things messages

44:51

do a search for messages where the chat is this time it's going to be

44:58

current page chat is read is

45:04

no from is not equal to current user

45:17

change is read to yes and scroll to the bottom it didn't scroll here either

45:35

unread messages from stewie let me click it

45:41

blue dot goes away and it scrolled right to the bottom

45:46

and the reply is going to be what what

45:53

we should also put a scroll of the bottom on the send button but you know how to do that by now

46:02

and if we sign in one more time as stewie unread message from lois

46:11

we're gonna say hi

46:18

hi can you put an emoji in

46:28

yes you can

46:35

okay i'm gonna stop here for today if you go to build apps without code.com

46:41

chat and sign up i'll send you the link to this exact project in view only mode so you can see exactly how it was done

46:48

also if i make any bonus videos related to messaging i'll send you those as well if you sign

46:53

up so sometimes people leave comments and have questions and i'll just make a quick bonus video and send that out

46:59

i appreciate you watching as always if you learned something today please subscribe lets me know that people are watching and gives me the motivation to

47:05

continue to make these videos lots of more bubble videos in the pipeline so if you like this one again

47:12

subscribe and turn on notifications and you will not miss the next one you're awesome you can do this a little

47:18

bit of consistent practice every day and you will be bubbling in no time like a pro

47:25

no coding experience necessary this is build apps without code i am as

47:31

non-technical as you are if you are non-technical um but if you are so am i

47:36

um so you're good much love thanks for watching see you in the next one peace hey thanks for

47:43

listening


Bubble.io & Langchain

Build your own custom LLM application with Bubble.io & Langchain (No Code & Beginner friendly)



TRANSCRIPT

PART - 1 

0:00

what's going on everyone in this video

0:01

we're going to be

0:04

um querying and integrating our own Uh

0:07

custom llm if you will we're essentially

0:09

going to be using our own data that we

0:12

upload so we can query it with something

0:15

like gpt3 or gpt4 whatever model you

0:19

want to utilize and we're going to be

0:21

doing this actually with bubble and

0:23

another kind of no code backend called

0:26

flowwise this has been recommended by

0:28

quite a bit of people there is a little

Demo

0:31

bit of setup and configuration involved

0:33

in doing this which we're actually going

0:34

to look into but

0:36

just to quickly show you guys a demo in

0:39

this example we've up uploaded the

0:42

Satoshi papers

0:45

um for those of you that don't know this

0:47

was essentially just released kind of

0:49

anonymously in 2000

0:51

um eight if I'm not mistaken on you know

0:55

kind of the

0:57

um the idea of Bitcoin essentially so

0:59

you can see that we've actually uploaded

1:01

it here and if we come back to Bubble we

1:03

can ask it what is this

1:06

document about and who created it

1:11

so let's go on when we click search

1:13

that's going to query it and we should

1:15

get the response below

1:17

this documents about Bitcoin a

1:19

peer-to-peer electronic cash system and

1:21

is created by Satoshi Nakamoto so

1:23

obviously guys

1:24

um if this was just a language model not

1:27

ingested with any other data it wouldn't

1:30

know what it is if um

1:33

when I'm referring to this so yeah let's

1:36

actually get into creating this the

1:37

first thing we're going to do is create

1:39

the back end and we're going to be

1:42

leveraging and utilizing a framework

1:44

called Lang chain so for those of you

1:46

that don't know about that essentially

1:49

just think of it as kind of a tool a

1:51

framework that solves a lot of the

1:53

limitations that current language models

1:56

have you can do a whole lot with it and

1:59

it abstracts it it just makes it easier

2:00

for us developers or even no code

2:03

developers to build things you know

2:06

build very powerful complicated more

2:08

complex applications that are empowered

2:11

by language models and I actually have a

2:13

whole video dedicated to this I'm going

2:14

to leave that kind of goes uh step by

2:17

step of the kind of high level overview

2:20

process but essentially this allows us

2:23

to upload our own data whether it be CSV

2:27

files you know PDF files whatever kind

2:31

of file formats as well as transient

2:33

data so for example connecting this to a

2:35

database or to a you know company CRM

2:38

you can do a whole lot but again in this

2:41

kind of example where you're going to

2:43

simply be doing it with PDF documents so

2:46

um yeah I guess uh there's there's kind

2:49

of I'll quickly kind of iterate through

2:50

this but essentially there's two arms to

2:52

this whole thing right

2:54

the document ingestion and then the

2:57

search query so basically when we upload

3:00

a file the document ingestion

3:03

um we're essentially we're we're

3:05

uploading a file like this right this

3:06

Bitcoin papers and although this isn't

3:08

that long it's only nine pages

3:11

um what we're basically doing is we're

3:13

chunking it up so for example

3:15

um you know this might be one chunk this

3:18

might be another chunk and it's and when

3:21

a you know when when a user asks a

3:24

question it's going to select the

3:26

relevant chunks out of this paper to use

3:28

as context so for example if we ask

3:30

something about

3:32

um you know how proof of work works it's

3:35

not going to utilize the whole PDF

3:37

document it's going to utilize just a

3:39

small section of it which I think is

3:41

really

3:43

um you know a really powerful kind of

3:44

when you do this scale so enough talking

3:48

you guys will kind of understand this

Configuration

3:50

process as we go through it a lot more

3:52

but you're going to want to come to the

3:55

flowwise GitHub repository and like I

3:57

said guys this is a little bit of

3:59

um can there's a little bit of

4:01

configuration involved in doing this

4:04

um you know it's pretty straightforward

4:06

um if you guys follow this tutorial but

4:07

essentially once you're on the repo you

4:09

want to just Fork it make sure you guys

4:12

don't just clone it you want to Fork it

4:15

that way we can host it on our own

4:17

server on our own back end that we can

4:19

query with bubble so yeah once you guys

4:22

have it forked

4:26

you're going to have a um you're going

4:29

to pull up the repo and again you can

4:32

you can read the readme and for those of

4:35

you that I don't know this is just kind

4:36

of a set of instructions provided by the

4:38

developers that built this but again we

4:40

don't really need to know what's kind of

4:42

going on behind all this

4:45

um so really all we need to do is just

4:47

deploy this so

4:49

um you know we can obviously deploy this

4:50

on our computer locally but if we want

4:52

to access it whenever we want we would

4:54

need to deploy it on a server so to do

4:57

that we're going to use Google called

5:00

render and I also set it up with versel

5:03

if you guys are familiar with that as

5:06

far as hosting but there was a bit of

5:07

configuration that was needed to do that

5:10

but renders pretty straightforward when

5:13

you deploy it so again guys we're

5:16

essentially just creating a something

5:18

that's live on production so we can

5:21

access it whenever and whenever so or

5:24

whenever and wherever sorry so so yeah

5:27

to do that you set you want to create a

5:30

FL render account and then

5:33

um if you guys just come back to your

5:37

um

5:40

your dashboard you want to come into new

5:43

and then web service and then connect

5:45

your GitHub repository and

5:49

um

5:50

from this you're going to want to

5:52

essentially either you know because when

5:55

we Fork this it's going to be on our

5:56

account that's basically we're just kind

5:58

of copying and pasting it into our

5:59

account if you will so once that's

6:01

fourth we should have access to it

6:03

directly here so we can just click

6:06

connect and then

6:09

um

6:10

everything oh as far as the run time we

6:13

don't want to use Docker in this case

6:14

we'll use node

6:16

um just select node for the build

6:18

command that looks all good there again

6:21

you can follow the uh kind of the readme

6:23

documentation as well but yeah we're

6:26

going to select just the free plan for

6:27

now obviously if you want to make this

6:29

production level you can upgrade

6:32

um to to have more capacity but once

6:35

that's created it's going to take about

6:36

5-10 minutes to create but once it is

6:39

I'm not going to do it because mine's

6:40

already up probably more closer to 10

6:43

minutes now that I think about it but

6:44

once it is we're going to have a URL

Chat Flow

6:47

provided by us by render that we're able

6:49

to access and this essentially flowwise

6:52

kind of a drag and drop back end of us

6:55

back end as a service you know it's

6:57

pretty straightforward other than just

6:59

getting all of the necessary

7:01

configuration set so let's create our

7:04

chat flow to communicate with our PDF

7:07

documents

7:09

so the first thing we're going to want

7:10

to do is come to the chat flows add a

7:13

new one and um

7:16

click this little plus icon here and

7:19

select the for the document loaders

7:22

again guys there's quite a bit this is

7:24

again provided by Lane chains framework

7:27

but you know this no code tool has made

7:29

it very easy for us to implement this

7:32

but

7:34

um if we come into the

7:38

we can we can select whatever file

7:39

loader we want there's even web loaders

7:42

such as tools with Cheerio which kind of

7:45

you can simply like input a URL and it

7:47

would scrape the site and then ingest

7:49

that data but again we're just going to

7:51

use a PDF file

7:53

loader drag and drop it simply as that

7:57

and you can kind of see the way that

7:59

flowwise is set up it kind of accepts an

8:01

input and has an output that you need to

8:03

connect so

8:04

this is where we're going to actually

8:06

upload our document so in our case it's

8:08

going to be the Satoshi papers at

8:11

Bitcoin papers but we want to actually

8:13

you know set it up to a text splitter so

8:18

just click that little plus icon there

8:19

and back to what I was saying I'll kind

8:22

of walk you guys through the process but

8:24

click the recursive character text

8:27

splitter drop drag and drop it there so

8:30

this is essentially kind of like we

8:32

talked about we're going to be chunking

8:34

all of that document data right it's you

8:37

know in our case it's only nine pages

8:39

but obviously if this is something like

8:40

your company

8:42

um you know data whether it's you know

8:45

something that's internal or customer

8:46

facing it's probably going to be a lot

8:49

of pages and we obviously want to

8:50

reference only the relevant data so we

8:52

do have to chunk it and this is what

8:55

makes it so scalable

8:57

um so yeah essentially once we have that

8:59

drag

9:00

um and and drop connect connect it to

9:03

um we can select the chunk size to what

9:05

we want since

9:07

um you know the the

9:09

Satoshi since this you know what we're

9:11

going to be uploading is only nine pages

9:13

um I think a thousand is fine right here

9:16

um obviously you may want you know you

9:18

kind of have to play around with it

9:20

um you know increase or decrease the

9:21

chunk size and then the overlap

9:23

um this is kind of just to you know if

9:26

if

9:28

um two chunks are kind of very similar

9:30

we can

9:31

um we can have a little bit of overlap

9:34

between the two

9:36

um

9:37

we'll set that to 25 again you can kind

9:39

of play around with it as you will uh

9:41

but as far as the actual document once

9:44

we have this PDF you know chunked and

9:46

split we want to store it somewhere

9:48

right where are we going to store it

9:48

we're going to store it in a pine in a

9:50

vector database now there are a lot of

9:52

solutions if you just click the pine or

9:54

if the you just click sorry you just

9:56

click the plus icon there uh you're

9:58

going to see if we come into the

10:03

um where is it the uh Vector stores

10:06

hidden below me here sorry

10:09

um but you're gonna see we kind of have

10:11

some options here we use uh we

10:14

traditionally use super bass uh with

10:16

this with storing our uh you know

10:19

vectorized data but in our case we'll

10:21

just use

10:23

um the pine cone

10:25

um upsert drag and drop that there and

10:28

you can see that this kind of accepts

10:30

two parameters the document which is

10:31

right here

10:33

and then also the embeddings and this

10:35

embeddings is handled uh by open AI so

10:38

we want to

10:40

um come back here and drop down in the

10:43

embeddings we're going to use the open

10:44

AI embeddings model so

10:47

let's just go ahead and drag that there

10:50

so again if this is kind of too much

10:52

information here all this really is

10:55

doing is we're we're just uploading a

10:58

document and we're making it readable

11:01

for a computer to understand okay you

11:04

know this is most similar with this and

11:06

if we kind of come back to our example

11:09

um we're essentially each one of these

11:12

chunks were were creating it into a

11:15

vector which is like I said just numbers

11:17

that a computer can simply understand

11:22

um

11:23

and how does it understand it

11:25

it does it with cosine similarity so

11:27

again check out my video on that if you

11:29

kind of want a high level uh overview of

11:31

this as far as the concepts of it

11:35

but once we have the data stored in Pine

11:38

Cone think of this just as a database

11:40

solution right once we have all of this

11:42

um you know stored we can now

11:45

reference this this our data in another

11:48

chain so in our case we're going to

11:52

um

11:52

have if you guys come down to chains

11:55

we're just going to do

11:57

um I guess we can do retrieve or we can

11:59

do it we'll do conversational retrieval

12:01

QA chain which is pretty standard in my

12:05

opinion again this just allows us our

12:07

chat to be conversational so it can take

12:10

in the previous context of the

12:13

conversation

12:14

um into context sorry so grab that icon

12:19

here and then put it into the vector

12:22

store retriever now we need an actual

12:24

large language model to power all this

12:26

so again this is something that you know

12:29

you can you can plug in your own models

12:32

um there's there's you know quite a a

12:34

bit we can select from but

12:36

um

12:37

we're obviously going to use just the

12:40

open AI model as you most of you guys

12:42

are familiar with and

12:45

um


PART - 2 

12:46

yeah we can just simply drag that and

12:49

drop it there so now I mean

Backend

12:52

this this allows us to this this is

12:56

really the back end functionality that

12:57

bubble is going to

12:59

integrate with right so when we type in

13:02

this query it's going to do all of the

13:05

kind of

13:06

um you know necessary work to find the

13:10

relevant data in the document that we're

13:12

going to upload and then from there you

13:15

know use that as context and provide a

13:17

response this is called a two-shot

13:19

prompt two-shot prompt response if I'm

13:22

not mistaken

13:24

but

13:25

um yeah that's kind of the bulk of it

13:27

and really from here I guess before we

13:30

actually can make any calls we do need

13:31

to add our environment variables or all

13:34

the authentications such as our open AI

13:37

API key as well as our pine cone API

13:42

Keys which is pretty straightforward

13:44

obviously you guys know probably by now

13:47

if you're watching this how to get your

13:48

openai API key but I will walk through

Pinecone

13:51

the pine cone solution here

13:55

so if you guys come to Pinecone you want

13:57

to create an account and uh you just

14:01

want to if we come back to indexes

14:03

you're going to want to create an index

14:04

you can call it whatever you want we can

14:06

call it you know no code

14:09

um you know whatever you want to name it

14:11

and then for the dimensions we're going

14:12

to do what openai recommends for their

14:14

embeddings which is

14:16

1536 different dimensions we'll use

14:20

cosine similarity again that's

14:21

recommended and then for the Pod type we

14:23

can you can select whatever I would do

14:25

P2 just because it has a lowest latency

14:29

um you know it's quick responses so you

14:33

create the index from there I already

14:34

have mine created it's going to take

14:35

about you know maybe a minute or two to

14:38

initialize and be ready to you know

14:41

upsert our data so

14:44

if we come back to our flowwise our back

Environment variables

14:47

end application we're going to want to

14:49

add all of these configurations and if

14:52

you guys can see obviously I've already

14:54

added my open AI API Keys um so all we

14:57

need is to add our environment variables

14:59

for pine cone to get this thing working

15:01

so for the index that's going to be the

15:04

index name ours is called Bubble

15:06

embeddings

15:08

um call it whatever you want and then

15:10

for the environment if you guys come

15:12

back into

15:14

um

15:14

I guess just come back into the uh API

15:18

keys and then in the environment it's

15:20

going to be whatever region you're

15:21

closest to and

15:24

um add that environment let me make sure

15:27

yeah make sure there's no white space

15:30

there and then lastly the API key so

15:34

just come here and copy that

15:36

so if we Sorry if we come back add that

15:40

and then oh obviously there is an

15:43

optional namespace so this is kind of a

15:46

way to kind of segment our data right so

15:50

obviously if we were to build a more

15:51

robust application

15:53

that handled a lot of different users

15:57

um you know we would obviously not want

15:58

other users to access you know other

16:01

users data and we don't have any

16:03

authentication involved in this so again

16:07

obviously that'd be a big security risk

16:10

there it'd be relatively easy to access

16:13

other users data which can be very

16:15

sensitive but this is kind of a way just

16:18

think of this kind of as a way to

16:19

organize our data so for example you

16:21

could have a namespace for each user

16:24

that signs up with your application and

16:26

only that user can reference this

16:28

specific namespace now in our case we'll

16:32

just call it

16:33

um you know whatever we want we'll just

16:35

call it Satoshi

16:37

papers for now and then yeah once you

Save

16:41

have that you're basically pretty much

16:42

set you want to go ahead and save this

16:44

we'll just call it convo q q a

16:49

chain

16:51

save that and then

16:53

um

16:53

it may take

16:56

um a little bit to upload so we can just

16:59

simply

17:01

um

17:02

upload our

17:04

we can simply upload our document

Upload

17:07

sorry make sure that you guys upload

17:09

your document and then click save and

17:13

then if we actually come in click this

17:15

chat icon here let me clear my data we

17:18

can say what is this

17:21

document

17:22

um about

17:24

and if we click that it may take a

17:27

little bit to initialize I think this is

17:29

where it actually ingests kind of

17:31

follows this whole workflow when we

17:32

actually uh query it

17:35

um so we can see this document is about

17:37

proposed solution to double spending

17:40

um you know it gives us the response

17:42

that we're obviously looking for now

17:43

this is cool right obviously you know we

17:45

have a little chat bot application but

17:48

you know we want to kind of combine this

17:50

with the power of bubble right but with

17:52

bubble

17:53

um you know you may have your own

17:55

already existing application on there

17:57

whether it's a CRM or whether it's a

17:59

tool internal to your team you want to

18:01

integrate this with bubble you know use

18:02

combine this with bubbles you know

18:04

functionality make it very make a more

18:06

powerful and robust application so to do

18:09

that we need to um if you guys have this

18:13

or you guys are going to see this little

API

18:15

kind of code icon here this this is

18:17

going to give us the API that we're

18:20

going to use with bubble to communicate

18:21

with our back end and again apis are

18:24

just um kind as I just mentioned they're

18:27

just tools to allow kind of two separate

18:29

applications to communicate with one

18:31

another

18:32

um so you know obviously as we see here

18:35

all the kind of functionalities handled

18:37

in our on our server that we

18:41

um you know that we

18:43

uploaded on render so

18:46

if we come into our curl you're going to

18:50

see or really just any of these end

18:52

points you're going to see the end point

18:53

it's generated for us and again this is

18:56

kind of the name of um or repo again

18:59

this is unique to my account and you can

19:01

see on the end here it's given us the um

19:05

you know the

19:06

um I guess chat bot ID so you know like

19:09

I said if this was a more robust

19:11

application and you had a lot of

19:13

different users for instance each user

19:15

could reference you know different IDs

19:19

based on

19:20

um you know what what they want to

19:23

utilize so

19:26

um you want to copy this whole

19:29

curl this oh end point sorry

API Connector

19:33

and then come back into bubble and if

19:36

you guys go into the plugins you want to

19:38

install the API connector

19:40

um it's going to be probably the first

19:42

one you see here but if you guys

19:46

um once once that's installed you're

19:48

going to want to add a new API and then

19:52

um we don't need to access any shared

19:54

headers here but

19:55

um expand that and then we can paste

19:58

that same URL that flowwise provided Us

20:01

in here and then make sure you guys

20:03

select this as an action too if you

20:05

don't you're not going to be able to

20:06

access it within bubble which is kind of

20:09

annoying and then for the content type

20:11

make sure you guys have application Json

20:13

just a formatting option very

20:16

um you know across all apis you'll see

20:19

and then you know you can select this as

20:21

private obviously because we won't need

20:23

to access anything but

20:25

um

20:26

one thing oh and make sure you guys set

20:28

the data type to text I think by default

20:31

it's going to be Json format but kind of

20:34

from here we can actually just query we

20:37

can essentially do what we did in

20:38

flowwise's kind of nice little chat bot

20:40

UI we can do it in bubble just to test

20:43

that hey um you know we're making the

20:44

connection and it's working so if we

20:47

come into the Json body here we can you

20:52

know either hard code something in there

20:54

but we obviously want this dynamically

20:56

displayed

20:57

so we'll have the input here is the key

21:01

and then the value so we can for

21:04

instance you know quickly query this and

21:08

I think this might have been actually

21:11

my old kind of test

21:14

endpoint that I did so let me copy this

21:16

new one and then come back into bubble

21:19

and then paste that in so in order to

21:24

use it in our workflows we do want to

21:25

initialize it so click this reinitialize

21:28

call

21:29

and then we should get the response yes

21:31

so we said who created bitcoin is going

21:33

to say Satoshi Nakamoto which no one

21:36

actually knows who that is but you can

21:39

see obviously it provides us a response

21:41

there so now we know that our bubble

21:43

application is you know correctly

21:46

communicating with our backend that we

21:48

just created and once we have this guys

21:50

the rest is pretty straightforward now

21:52

that we can access this in our

21:54

application in our workflows wherever we

21:56

want so

21:58

um obviously in the design as you guys

22:00

saw this very very simple kind of input

22:03

search query

22:04

um application that I've developed

22:06

obviously you'd want to you know

22:07

whatever you fit this to your use case

22:09

your application

22:11

um whatever it may be but

22:13

um if we just click on the search button

22:15

here and view the workflow search button

22:18

you can see really we're just it's only

22:20

just one step involved and I'm not sure

22:22

if you guys have seen my other video of

22:25

this of the I'm doing this without you

22:27

know a back end or another framework you

22:29

know you would have to essentially have

22:31

all of this logic this functionality in

22:33

bubble which would just be a pain in the

22:35

ass to do so again you know rather than

22:39

obviously hard coding what we want to

22:41

respond with we would put the value of

22:43

the input which is whatever the user

22:45

would type in here and then from that we

22:47

would just simply set the state of the

22:49

response

22:50

um so if we just click this here we can

22:53

see that we've created a custom State

22:55

completion that's a Text data type and

23:00

then you know whatever response it gets

23:02

back it's going to set it to that so we

23:05

come back to our application we can say

23:07

please

23:09

explain proof of work to me

23:13

and when we click search it's going to

23:16

hit that endpoint to our back end where

23:18

all of our logic is handled such as the

23:22

querying and um you know doing a

23:25

similarity search on our data stored in

23:27

our pine cone index and if we come back

23:30

you can see we'll get a response

23:33

um

23:34

proof of work is used to implement a

23:37

distributed timestamp server yada yada

23:39

you guys get the rest so yeah you can

Outro

23:41

see now how easy it is to do all this

23:43

with a framework like Lane chain and a

23:46

back-end framework like this now

23:48

obviously there was a bit of

23:51

um you know setup and con configuration

23:53

involved and uh you know my team were

23:55

actually developing a tool to you know

23:59

simply plug and play tool that you can

24:01

just sign up with and you know add your

24:04

data you don't have to do any of this

24:05

configuration here and we'll actually

24:08

have it as workflows as well so you

24:10

won't even need to deploy it and then

24:13

you know set up all the endpoints you

24:15

can simply have it as a workflow if you

24:17

guys are interested in that and this

24:19

will actually handle authentication as

24:21

well so you can make it very robust for

24:23

whatever your use case may be so you

24:26

know obviously you know if you have a

24:28

lot of users we can now segment the data

24:30

kind of as we talked about with the

24:31

different namespaces all this kind of

24:33

comes ready outside the box so if you

24:35

guys are interested in that I'm going to

24:36

leave a type form down below this will

24:38

be a paid solution but for the first 100

24:41

users we're going to make this uh 50 off

24:45

for kind of the early birds and it's

24:47

going to be a 60-day money-back

24:50

guarantee so if you guys are just

24:51

interested in that leave your email

24:54

there and we'll add you to the list but

24:56

yeah guys I hope you enjoyed this and

24:58

um yeah I I hope to keep continue making

25:01

these Style videos maybe adding more

25:05

agent-based solutions I can also kind of

25:07

talk about our work with our clients the

25:09

use cases that we're seeing with what's

25:11

working and what's not in in production

25:14

so yeah guys in the comments let me know

25:16

any questions you may have I'm going to

25:18

try and answer all of them to the best

25:20

of my ability so yeah definitely uh I

25:23

hope you enjoyed this and if you guys

25:24

could like And subscribe that I'd

25:26

appreciate that a lot I'd keep making

25:28

these videos so thank you guys


bubble Io


Top 5 Bubble Alternatives for Building Web-apps


Top 5 Bubble Alternatives for Building Web-apps



ALL 5 STAR AI.IO PAGE STUDY

How AI & IoT Are Creating An Impact On Industries Today


Our  NEW Site  OFFERS FREE LINKS & FREE STUDIES To SITES With  5-STAR Artificial  Intelligence TOOLS That Will HELP YOU Run YOUR BUSINESS Quickly & Efficiently & Increase YOUR SALES 

Hello and welcome to our new site that shares with you the most powerful web platforms and tools available on the web today

All platforms, websites and tools have artificial intelligence AI and have a 5-star rating

All platforms, websites and tools are free and Pro paid

The platforms, websites and the tool's  are the best  for growing your business in 2022/3

שלום וברוכים הבאים לאתר החדש שלנו המשתף אתכם בפלטפורמות האינטרנט והכלים החזקים ביותר הקיימים היום ברשת. כל הפלטפורמות, האתרים והכלים הם בעלי בינה מלאכותית AI ובעלי דירוג של 5 כוכבים. כל הפלטפורמות, האתרים והכלים חינמיים ומקצועיים בתשלום הפלטפורמות, האתרים והכלים באתר זה הם הטובים ביותר  והמועילים ביותר להצמחת ולהגדלת העסק שלך ב-2022/3 

A Guide for AI-Enhancing YOUR Existing Business Application


A guide to improving your existing business application of artificial intelligence

מדריך לשיפור היישום העסקי הקיים שלך בינה מלאכותית

What is Artificial Intelligence and how does it work? What are the 3 types of AI?

What is Artificial Intelligence and how does it work? What are the 3 types of AI? The 3 types of AI are: General AI: AI that can perform all of the intellectual tasks a human can. Currently, no form of AI can think abstractly or develop creative ideas in the same ways as humans.  Narrow AI: Narrow AI commonly includes visual recognition and natural language processing (NLP) technologies. It is a powerful tool for completing routine jobs based on common knowledge, such as playing music on demand via a voice-enabled device.  Broad AI: Broad AI typically relies on exclusive data sets associated with the business in question. It is generally considered the most useful AI category for a business. Business leaders will integrate a broad AI solution with a specific business process where enterprise-specific knowledge is required.  How can artificial intelligence be used in business? AI is providing new ways for humans to engage with machines, transitioning personnel from pure digital experiences to human-like natural interactions. This is called cognitive engagement.  AI is augmenting and improving how humans absorb and process information, often in real-time. This is called cognitive insights and knowledge management. Beyond process automation, AI is facilitating knowledge-intensive business decisions, mimicking complex human intelligence. This is called cognitive automation.  What are the different artificial intelligence technologies in business? Machine learning, deep learning, robotics, computer vision, cognitive computing, artificial general intelligence, natural language processing, and knowledge reasoning are some of the most common business applications of AI.  What is the difference between artificial intelligence and machine learning and deep learning? Artificial intelligence (AI) applies advanced analysis and logic-based techniques, including machine learning, to interpret events, support and automate decisions, and take actions.  Machine learning is an application of artificial intelligence (AI) that provides systems the ability to automatically learn and improve from experience without being explicitly programmed.  Deep learning is a subset of machine learning in artificial intelligence (AI) that has networks capable of learning unsupervised from data that is unstructured or unlabeled.  What are the current and future capabilities of artificial intelligence? Current capabilities of AI include examples such as personal assistants (Siri, Alexa, Google Home), smart cars (Tesla), behavioral adaptation to improve the emotional intelligence of customer support representatives, using machine learning and predictive algorithms to improve the customer’s experience, transactional AI like that of Amazon, personalized content recommendations (Netflix), voice control, and learning thermostats.  Future capabilities of AI might probably include fully autonomous cars, precision farming, future air traffic controllers, future classrooms with ambient informatics, urban systems, smart cities and so on.  To know more about the scope of artificial intelligence in your business, please connect with our expert.

מהי בינה מלאכותית וכיצד היא פועלת? מהם 3 סוגי הבינה המלאכותית?

מהי בינה מלאכותית וכיצד היא פועלת? מהם 3 סוגי הבינה המלאכותית? שלושת סוגי הבינה המלאכותית הם: בינה מלאכותית כללית: בינה מלאכותית שיכולה לבצע את כל המשימות האינטלקטואליות שאדם יכול. נכון לעכשיו, שום צורה של AI לא יכולה לחשוב בצורה מופשטת או לפתח רעיונות יצירתיים באותן דרכים כמו בני אדם. בינה מלאכותית צרה: בינה מלאכותית צרה כוללת בדרך כלל טכנולוגיות זיהוי חזותי ועיבוד שפה טבעית (NLP). זהו כלי רב עוצמה להשלמת עבודות שגרתיות המבוססות על ידע נפוץ, כגון השמעת מוזיקה לפי דרישה באמצעות מכשיר התומך בקול. בינה מלאכותית רחבה: בינה מלאכותית רחבה מסתמכת בדרך כלל על מערכי נתונים בלעדיים הקשורים לעסק המדובר. זה נחשב בדרך כלל לקטגוריית הבינה המלאכותית השימושית ביותר עבור עסק. מנהיגים עסקיים ישלבו פתרון AI רחב עם תהליך עסקי ספציפי שבו נדרש ידע ספציפי לארגון. כיצד ניתן להשתמש בבינה מלאכותית בעסק? AI מספקת דרכים חדשות לבני אדם לעסוק במכונות, ומעבירה את הצוות מחוויות דיגיטליות טהורות לאינטראקציות טבעיות דמויות אדם. זה נקרא מעורבות קוגניטיבית. בינה מלאכותית מגדילה ומשפרת את האופן שבו בני אדם קולטים ומעבדים מידע, לעתים קרובות בזמן אמת. זה נקרא תובנות קוגניטיביות וניהול ידע. מעבר לאוטומציה של תהליכים, AI מאפשר החלטות עסקיות עתירות ידע, תוך חיקוי אינטליגנציה אנושית מורכבת. זה נקרא אוטומציה קוגניטיבית. מהן טכנולוגיות הבינה המלאכותית השונות בעסק? למידת מכונה, למידה עמוקה, רובוטיקה, ראייה ממוחשבת, מחשוב קוגניטיבי, בינה כללית מלאכותית, עיבוד שפה טבעית וחשיבת ידע הם חלק מהיישומים העסקיים הנפוצים ביותר של AI. מה ההבדל בין בינה מלאכותית ולמידת מכונה ולמידה עמוקה? בינה מלאכותית (AI) מיישמת ניתוח מתקדמות וטכניקות מבוססות לוגיקה, כולל למידת מכונה, כדי לפרש אירועים, לתמוך ולהפוך החלטות לאוטומטיות ולנקוט פעולות. למידת מכונה היא יישום של בינה מלאכותית (AI) המספק למערכות את היכולת ללמוד ולהשתפר מניסיון באופן אוטומטי מבלי להיות מתוכנתים במפורש. למידה עמוקה היא תת-קבוצה של למידת מכונה בבינה מלאכותית (AI) שיש לה רשתות המסוגלות ללמוד ללא פיקוח מנתונים שאינם מובנים או ללא תווית. מהן היכולות הנוכחיות והעתידיות של בינה מלאכותית? היכולות הנוכחיות של AI כוללות דוגמאות כמו עוזרים אישיים (Siri, Alexa, Google Home), מכוניות חכמות (Tesla), התאמה התנהגותית לשיפור האינטליגנציה הרגשית של נציגי תמיכת לקוחות, שימוש בלמידת מכונה ואלגוריתמים חזויים כדי לשפר את חווית הלקוח, עסקאות בינה מלאכותית כמו זו של אמזון, המלצות תוכן מותאמות אישית (Netflix), שליטה קולית ותרמוסטטים ללמידה. יכולות עתידיות של AI עשויות לכלול כנראה מכוניות אוטונומיות מלאות, חקלאות מדויקת, בקרי תעבורה אוויריים עתידיים, כיתות עתידיות עם אינפורמטיקה סביבתית, מערכות עירוניות, ערים חכמות וכן הלאה. כדי לדעת יותר על היקף הבינה המלאכותית בעסק שלך, אנא צור קשר עם המומחה שלנו.

Glossary of Terms


Application Programming Interface(API):

An API, or application programming interface, is a set of rules and protocols that allows different software programs to communicate and exchange information with each other. It acts as a kind of intermediary, enabling different programs to interact and work together, even if they are not built using the same programming languages or technologies. API's provide a way for different software programs to talk to each other and share data, helping to create a more interconnected and seamless user experience.

Artificial Intelligence(AI):

the intelligence displayed by machines in performing tasks that typically require human intelligence, such as learning, problem-solving, decision-making, and language understanding. AI is achieved by developing algorithms and systems that can process, analyze, and understand large amounts of data and make decisions based on that data.

Compute Unified Device Architecture(CUDA):

CUDA is a way that computers can work on really hard and big problems by breaking them down into smaller pieces and solving them all at the same time. It helps the computer work faster and better by using special parts inside it called GPUs. It's like when you have lots of friends help you do a puzzle - it goes much faster than if you try to do it all by yourself.

The term "CUDA" is a trademark of NVIDIA Corporation, which developed and popularized the technology.

Data Processing:

The process of preparing raw data for use in a machine learning model, including tasks such as cleaning, transforming, and normalizing the data.

Deep Learning(DL):

A subfield of machine learning that uses deep neural networks with many layers to learn complex patterns from data.

Feature Engineering:

The process of selecting and creating new features from the raw data that can be used to improve the performance of a machine learning model.

Freemium:

You might see the term "Freemium" used often on this site. It simply means that the specific tool that you're looking at has both free and paid options. Typically there is very minimal, but unlimited, usage of the tool at a free tier with more access and features introduced in paid tiers.

Generative Art:

Generative art is a form of art that is created using a computer program or algorithm to generate visual or audio output. It often involves the use of randomness or mathematical rules to create unique, unpredictable, and sometimes chaotic results.

Generative Pre-trained Transformer(GPT):

GPT stands for Generative Pretrained Transformer. It is a type of large language model developed by OpenAI.

GitHub:

GitHub is a platform for hosting and collaborating on software projects


Google Colab:

Google Colab is an online platform that allows users to share and run Python scripts in the cloud

Graphics Processing Unit(GPU):

A GPU, or graphics processing unit, is a special type of computer chip that is designed to handle the complex calculations needed to display images and video on a computer or other device. It's like the brain of your computer's graphics system, and it's really good at doing lots of math really fast. GPUs are used in many different types of devices, including computers, phones, and gaming consoles. They are especially useful for tasks that require a lot of processing power, like playing video games, rendering 3D graphics, or running machine learning algorithms.

Large Language Model(LLM):

A type of machine learning model that is trained on a very large amount of text data and is able to generate natural-sounding text.

Machine Learning(ML):

A method of teaching computers to learn from data, without being explicitly programmed.

Natural Language Processing(NLP):

A subfield of AI that focuses on teaching machines to understand, process, and generate human language

Neural Networks:

A type of machine learning algorithm modeled on the structure and function of the brain.

Neural Radiance Fields(NeRF):

Neural Radiance Fields are a type of deep learning model that can be used for a variety of tasks, including image generation, object detection, and segmentation. NeRFs are inspired by the idea of using a neural network to model the radiance of an image, which is a measure of the amount of light that is emitted or reflected by an object.

OpenAI:

OpenAI is a research institute focused on developing and promoting artificial intelligence technologies that are safe, transparent, and beneficial to society

Overfitting:

A common problem in machine learning, in which the model performs well on the training data but poorly on new, unseen data. It occurs when the model is too complex and has learned too many details from the training data, so it doesn't generalize well.

Prompt:

A prompt is a piece of text that is used to prime a large language model and guide its generation

Python:

Python is a popular, high-level programming language known for its simplicity, readability, and flexibility (many AI tools use it)

Reinforcement Learning:

A type of machine learning in which the model learns by trial and error, receiving rewards or punishments for its actions and adjusting its behavior accordingly.

Spatial Computing:

Spatial computing is the use of technology to add digital information and experiences to the physical world. This can include things like augmented reality, where digital information is added to what you see in the real world, or virtual reality, where you can fully immerse yourself in a digital environment. It has many different uses, such as in education, entertainment, and design, and can change how we interact with the world and with each other.

Stable Diffusion:

Stable Diffusion generates complex artistic images based on text prompts. It’s an open source image synthesis AI model available to everyone. Stable Diffusion can be installed locally using code found on GitHub or there are several online user interfaces that also leverage Stable Diffusion models.

Supervised Learning:

A type of machine learning in which the training data is labeled and the model is trained to make predictions based on the relationships between the input data and the corresponding labels.

Unsupervised Learning:

A type of machine learning in which the training data is not labeled, and the model is trained to find patterns and relationships in the data on its own.

Webhook:

A webhook is a way for one computer program to send a message or data to another program over the internet in real-time. It works by sending the message or data to a specific URL, which belongs to the other program. Webhooks are often used to automate processes and make it easier for different programs to communicate and work together. They are a useful tool for developers who want to build custom applications or create integrations between different software systems.


מילון מונחים


ממשק תכנות יישומים (API): API, או ממשק תכנות יישומים, הוא קבוצה של כללים ופרוטוקולים המאפשרים לתוכנות שונות לתקשר ולהחליף מידע ביניהן. הוא פועל כמעין מתווך, המאפשר לתוכניות שונות לקיים אינטראקציה ולעבוד יחד, גם אם הן אינן בנויות באמצעות אותן שפות תכנות או טכנולוגיות. ממשקי API מספקים דרך לתוכנות שונות לדבר ביניהן ולשתף נתונים, ועוזרות ליצור חווית משתמש מקושרת יותר וחלקה יותר. בינה מלאכותית (AI): האינטליגנציה שמוצגת על ידי מכונות בביצוע משימות הדורשות בדרך כלל אינטליגנציה אנושית, כגון למידה, פתרון בעיות, קבלת החלטות והבנת שפה. AI מושגת על ידי פיתוח אלגוריתמים ומערכות שיכולים לעבד, לנתח ולהבין כמויות גדולות של נתונים ולקבל החלטות על סמך הנתונים הללו. Compute Unified Device Architecture (CUDA): CUDA היא דרך שבה מחשבים יכולים לעבוד על בעיות קשות וגדולות באמת על ידי פירוקן לחתיכות קטנות יותר ופתרון כולן בו זמנית. זה עוזר למחשב לעבוד מהר יותר וטוב יותר על ידי שימוש בחלקים מיוחדים בתוכו הנקראים GPUs. זה כמו כשיש לך הרבה חברים שעוזרים לך לעשות פאזל - זה הולך הרבה יותר מהר מאשר אם אתה מנסה לעשות את זה לבד. המונח "CUDA" הוא סימן מסחרי של NVIDIA Corporation, אשר פיתחה והפכה את הטכנולוגיה לפופולרית. עיבוד נתונים: תהליך הכנת נתונים גולמיים לשימוש במודל למידת מכונה, כולל משימות כמו ניקוי, שינוי ונימול של הנתונים. למידה עמוקה (DL): תת-תחום של למידת מכונה המשתמש ברשתות עצביות עמוקות עם רבדים רבים כדי ללמוד דפוסים מורכבים מנתונים. הנדסת תכונות: תהליך הבחירה והיצירה של תכונות חדשות מהנתונים הגולמיים שניתן להשתמש בהם כדי לשפר את הביצועים של מודל למידת מכונה. Freemium: ייתכן שתראה את המונח "Freemium" בשימוש לעתים קרובות באתר זה. זה פשוט אומר שלכלי הספציפי שאתה מסתכל עליו יש אפשרויות חינמיות וגם בתשלום. בדרך כלל יש שימוש מינימלי מאוד, אך בלתי מוגבל, בכלי בשכבה חינמית עם יותר גישה ותכונות שהוצגו בשכבות בתשלום. אמנות גנרטיבית: אמנות גנרטיבית היא צורה של אמנות שנוצרת באמצעות תוכנת מחשב או אלגוריתם ליצירת פלט חזותי או אודיו. לרוב זה כרוך בשימוש באקראיות או בכללים מתמטיים כדי ליצור תוצאות ייחודיות, בלתי צפויות ולעיתים כאוטיות. Generative Pre-trained Transformer(GPT): GPT ראשי תיבות של Generative Pre-trained Transformer. זהו סוג של מודל שפה גדול שפותח על ידי OpenAI. GitHub: GitHub היא פלטפורמה לאירוח ושיתוף פעולה בפרויקטי תוכנה

Google Colab: Google Colab היא פלטפורמה מקוונת המאפשרת למשתמשים לשתף ולהריץ סקריפטים של Python בענן Graphics Processing Unit(GPU): GPU, או יחידת עיבוד גרפית, הוא סוג מיוחד של שבב מחשב שנועד להתמודד עם המורכבות חישובים הדרושים להצגת תמונות ווידאו במחשב או במכשיר אחר. זה כמו המוח של המערכת הגרפית של המחשב שלך, והוא ממש טוב לעשות הרבה מתמטיקה ממש מהר. GPUs משמשים סוגים רבים ושונים של מכשירים, כולל מחשבים, טלפונים וקונסולות משחקים. הם שימושיים במיוחד למשימות הדורשות כוח עיבוד רב, כמו משחקי וידאו, עיבוד גרפיקה תלת-ממדית או הפעלת אלגוריתמים של למידת מכונה. מודל שפה גדול (LLM): סוג של מודל למידת מכונה שאומן על כמות גדולה מאוד של נתוני טקסט ומסוגל ליצור טקסט בעל צליל טבעי. Machine Learning (ML): שיטה ללמד מחשבים ללמוד מנתונים, מבלי להיות מתוכנתים במפורש. עיבוד שפה טבעית (NLP): תת-תחום של AI המתמקד בהוראת מכונות להבין, לעבד וליצור שפה אנושית רשתות עצביות: סוג של אלגוריתם למידת מכונה המבוססת על המבנה והתפקוד של המוח. שדות קרינה עצביים (NeRF): שדות קרינה עצביים הם סוג של מודל למידה עמוקה שיכול לשמש למגוון משימות, כולל יצירת תמונה, זיהוי אובייקטים ופילוח. NeRFs שואבים השראה מהרעיון של שימוש ברשת עצבית למודל של זוהר תמונה, שהוא מדד לכמות האור שנפלט או מוחזר על ידי אובייקט. OpenAI: OpenAI הוא מכון מחקר המתמקד בפיתוח וקידום טכנולוגיות בינה מלאכותית שהן בטוחות, שקופות ומועילות לחברה. Overfitting: בעיה נפוצה בלמידת מכונה, שבה המודל מתפקד היטב בנתוני האימון אך גרועים בחדשים, בלתי נראים. נתונים. זה מתרחש כאשר המודל מורכב מדי ולמד יותר מדי פרטים מנתוני האימון, כך שהוא לא מכליל היטב. הנחיה: הנחיה היא פיסת טקסט המשמשת לתכנון מודל שפה גדול ולהנחות את הדור שלו Python: Python היא שפת תכנות פופולרית ברמה גבוהה הידועה בפשטות, בקריאות ובגמישות שלה (כלי AI רבים משתמשים בה) למידת חיזוק: סוג של למידת מכונה שבה המודל לומד על ידי ניסוי וטעייה, מקבל תגמולים או עונשים על מעשיו ומתאים את התנהגותו בהתאם. מחשוב מרחבי: מחשוב מרחבי הוא השימוש בטכנולוגיה כדי להוסיף מידע וחוויות דיגיטליות לעולם הפיזי. זה יכול לכלול דברים כמו מציאות רבודה, שבה מידע דיגיטלי מתווסף למה שאתה רואה בעולם האמיתי, או מציאות מדומה, שבה אתה יכול לשקוע במלואו בסביבה דיגיטלית. יש לו שימושים רבים ושונים, כמו בחינוך, בידור ועיצוב, והוא יכול לשנות את האופן שבו אנו מתקשרים עם העולם ואחד עם השני. דיפוזיה יציבה: דיפוזיה יציבה מייצרת תמונות אמנותיות מורכבות המבוססות על הנחיות טקסט. זהו מודל AI של סינתזת תמונות בקוד פתוח הזמין לכולם. ניתן להתקין את ה-Stable Diffusion באופן מקומי באמצעות קוד שנמצא ב-GitHub או שישנם מספר ממשקי משתמש מקוונים הממנפים גם מודלים של Stable Diffusion. למידה מפוקחת: סוג של למידת מכונה שבה נתוני האימון מסומנים והמודל מאומן לבצע תחזיות על סמך היחסים בין נתוני הקלט והתוויות המתאימות. למידה ללא פיקוח: סוג של למידת מכונה שבה נתוני האימון אינם מסומנים, והמודל מאומן למצוא דפוסים ויחסים בנתונים בעצמו. Webhook: Webhook הוא דרך של תוכנת מחשב אחת לשלוח הודעה או נתונים לתוכנית אחרת דרך האינטרנט בזמן אמת. זה עובד על ידי שליחת ההודעה או הנתונים לכתובת URL ספציפית, השייכת לתוכנית האחרת. Webhooks משמשים לעתים קרובות כדי להפוך תהליכים לאוטומטיים ולהקל על תוכניות שונות לתקשר ולעבוד יחד. הם כלי שימושי למפתחים שרוצים לבנות יישומים מותאמים אישית או ליצור אינטגרציות בין מערכות תוכנה שונות.

WELCOME TO THE

5 STAR AI.IO

TOOLS

FOR YOUR BUSINESS

TRANSCRIPT

PART - 1 

PART - 2