The design of the user interface in lovable is very inviting in terms of jumping directly into developing
an application, and the fact that even with a simple prompt, we can already get something functional
can give the impression that everything is fast.
Now, actually, just providing a simple prompt is a good idea for a quick test, but if you want to
build a more useful project and do it right, we should provide more detailed instructions.
Remember, in terms of prompt engineering, if you are really investing very little time in your initial
prompt, the output that is coming out is also not going to be very good.
Or you need to go through a lot of iterations to actually get what you want.
And that is also kind of like a waste of time.
Apart from this, you also want to be strategic about the steps we take in terms of building the application.
We don't want to provide a prompt that contains everything that is needed and just a lovable build.
Everything.
So in this lecture we're going to create a few things.
First of all, we're going to use ChatGPT with an initial prompt that will help us create a software
specification or a product requirements document that we will provide loveable.
Based on the specification, we'll also need to create a to do list.
And apart from this, we'll also need this initial prompt because to create a project we cannot create
an empty project in lovable.
We still need to provide an initial prompt, so it's totally up to us if we want to continue this conversation
as it is right now, or if we want to start a new project from scratch.
I'm going to start a new project from scratch.
But first of all, let's focus at creating that PRD document.
So already prepared here a prompt which I'm going to link as a resource to this lecture so that you
can also have access to it.
And in a nutshell this is going a bit more technical.
So if you don't have the technical information in order to create something like this to begin with,
you can have a conversation with ChatGPT in advance to figure out what would be some specific frameworks
or tools or technologies that would make this possible.
now.
In a nutshell, we're asking ChatGPT to write for us a software specification, and we're providing
here a bit of information in terms of what we want to build and a list of features that we consider
important.
And these are relatively simple features, what you can pretty much describe any way, if you're looking
at this board, you can create a task.
You can create a card, you can move that card somewhere else.
And these kind of things in terms of how the application should work.
And we're going to start here with this, because this is something that pretty much everyone should
be able to write, even if it doesn't include the technical language.
But probably the most important thing is this consulting that we're doing first with ChatGPT, just
trying to clarify, is there anything that is missing?
And we're going to get back some follow up questions like user authentication if we need to support
multiple boards, what kind of information do we need in the cards and so on.
So there's a lot of things that need to happen in terms of this.
And these are good questions, and these are relevant questions that we should have in our application.
So this is why it's good to have this conversation here.
So I'm going to answer these questions.
And then I'm going to take a look at what has ChatGPT generated.
So I went ahead through the questions that ChatGPT asked.
And essentially I said I don't need any user authentication.
We don't want to complicate things.
There's only going to be one board.
The cards will only have the title.
There is no need for collaboration in terms of frameworks that we want to use for the UI.
We're just going to use something that's popular.
Doesn't really matter so much.
And we also want to make this mobile optimized.
So this is what we're going to get back in terms of the information that we need for this PRD.
I actually went over this specification and I would say initially I'm happy with what is inside here.
So I'm not going to make any changes.
Instead, I'm going to move on to the second part and that is creating a to do list.
And for that I'm going to use another prompt.
So just assuming that we're happy with this specification, we're going to say, okay, this is the
specification that we want.
And based on this we want to create a to do list.
And we want to build these features in a logical order.
So we want to break down everything that needs to be done into individual steps.
For example I've already given here some ideas like the setup part where we're just setting up the project,
installing project dependencies, creating the layout.
And then we're going to use here a service called Supabase in order to host a database.
And we also need to get into that and do it as a separate step.
And there may be there's some basic functionality and some advanced functionality that needs to be done.
This is just an idea in terms of what needs to be done there.
So just kind of let know ChatGPT break this down into individual parts.
And you're going to see here that's actually going to create more and more parts.
And that's a good thing.
So we're going to say here that we want everything in the markdown format.
Now to simplify things in terms of the to do list, I didn't ask for any acceptance criteria, nor did
I provide any.
And this will make the specification and the to do list less specific and opens the door for more bugs,
in theory at least.
So ideally, each item should also contain a way for the AI to validate if the desired behavior or outcome
has been implemented or not.
If we invest more time into better instructions, also, what we're getting from the AI is going to
be better.
So now we have everything in markdown format.
And this is already very, very nice what we have here.
But there's just one more thing that I need.
And that is the third and final prompt.
We're going to start here with this setup task.
And because we cannot start a project in lovable as an empty project, we always need to provide a prompt.
The idea here is to provide an initial prompt that will help us kick start this project.
Now, lovable is already pretty good at design, so we don't need to get too deep there.
For example, what's coming back here is probably a bit just too detailed, but we're going to see here
in a second if this makes sense or not.
But the main idea is that we need an initial prompt just to create the basic things.
Or we can simply go ahead and provide here the context, and then take the first task that is already
available here in terms of the setup.
This lecture has been a bit more theoretical, and I totally understand that writing the specifications
isn't really the most cool or exciting thing, but what I want you to take from this is that prompt
engineering.
Knowing how to create these specifications is so important and has a tremendous impact on the application
that you're building.
And this is why I'm spending a bit more time on this, just for you to understand how important this
is, to avoid issues later.