From the course: Vibe Coding with Bolt.new
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Creating back-end APIs with BoltDatabase - Bolt Tutorial
From the course: Vibe Coding with Bolt.new
Creating back-end APIs with BoltDatabase
Now, let's add some AI into our task tracker. We're going to incorporate a task prioritizer using an OpenAI model. So let's go back into Bolt, and go through an outline of what we're going to do. Let's click on the settings icon here at the top, and go into secrets. So what we're going to do is we're going to add an OpenAI API key which will let us access the models. Once we add this in, we're going to deploy something called a server function. This server function will allow us to call the OpenAI API to retrieve our AI result. We want to deploy a server function because we don't want to put our OpenAI API key into our frontend. Let me show you what that means. If we exit and go back to our task tracker, I can right-click and click Inspect on Chrome. If I go into Console, Elements or Sources, I can see the HTML and the JavaScript that's been generated. Now, if my OpenAI API key is in here, that means any user who's using my application will be able to pull this information out and use…
Contents
-
-
-
Defining our project: Productivity tracker1m 49s
-
(Locked)
Building our main page5m 1s
-
(Locked)
Making style changes and adding animations4m 53s
-
(Locked)
Adding streaks and sessions with a database2m 31s
-
(Locked)
Creating back-end APIs with BoltDatabase9m 19s
-
(Locked)
Adding user authentication with BoltDatabase5m 7s
-
-
-