Following this walkthrough will use about 300K tokens, which stays within the Bolt free plan’s daily limit of 400K tokens. If you’d prefer not to use tokens while you learn, you can simply read along and watch the example videos.
What you’ll need
- A Chrome or Chromium browser (Opera, Brave, Edge, Vivaldi, etc.)
- 10–15 minutes
Part 1: Build your app with your first prompt
You’re about to see Bolt in action for the first time. Follow these steps you’ll have a working app in just a few minutes!- Open Bolt.new in a new tab.
-
In the chatbox, paste this :
Build a pet name picker app with dropdowns that allow people to choose animal types (e.g. dog, cat, bird, lizard, etc.) and name categories (e.g. cute, celebrity puns, movie inspired, etc.) Create user email sign up and log in functionality and the ability to save favorite names when logged in.
- Click the blue and white arrow to submit.
- Sign in or sign up (Google, GitHub, or email:no credit card required). You won’t see this step if you’re already logged in.
- Complete the survey.
-
Wait approximately five minutes while Bolt creates your app.
Because your prompt includes features such as sign-up, login, and favorites, Bolt needs to set up databases, which takes a bit more time. Apps without database features usually build faster.
- Try it out in the Preview window. Pick an animal, pick a category, and generate a name.
Congrats! You just built your first Bolt web app!
Understanding tokens
Bolt uses large language model (LLM) technology to process your prompts and build your site. You don’t need to know the technical details, but it’s helpful to know that LLMs work on a token system, and Bolt’s free and paid plans are based on them. Think of tokens as a measurement of Bolt’s efforts. Bolt “uses” tokens when it:- reads
- thinks
- builds
Part 2: Check token usage and turn on token display in chat
Check how many tokens your initial build used, and turn on the option to display token usage in chat. This helps you see how many tokens each of your prompts uses.- Click your profile icon in the top right of your screen, then click Subscription.
-
View how many tokens you have remaining to calculate how many tokens your build used.
In the example video above, there are 196k tokens remaining, meaning the build used 204k. (Free accounts offer 2.5 million tokens monthly with a 400k per day limit.)
- Next, click General under the Personal Settings menu.
- Toggle on Display token usage in chat.
- Look above your chatbox to view your remaining tokens, which should match what you saw when looking at your subscription information.
Part 3: Try out your app by signing up and saving favorites
Now that your app is built and you have a handle on how tokens work, take a moment to explore what you’ve created. Start by testing the sign-up feature. Use some sample information to create an account and make sure everything works as expected. Once you’re signed in, try saving a few favorites to see how your app handles user data.- Click the Sign Up button.
- Create an account using some dummy data.
- Generate a few names and mark them as favorites.
-
Scroll down to check that your favorites were saved correctly.
If your favorites aren’t showing immediately, try logging out and back in; that should fix the issue.
Part 4: View your database info
One of the reasons Bolt is so powerful is that it includes built-in database creation and management. Many web app builders require you to set up a third-party database and connect it manually, but Bolt handles this for you automatically as part of Bolt Cloud. From your first prompt, Bolt recognized that your app needed databases and created them for you: one for storing user favorites and another for managing authentication data. In this section, you’ll see how to view that information.1
View your databases
- Click the database icon in the top center of your screen.
- Click the favorites table.
- Notice how the names you’ve favorited appear as database entries. This is how Bolt manages the favorites feature: with a database that associates the name, animal type, and category with a user ID.
2
View User Management
Now that you’ve seen the information saved in your favorites database, take a moment to explore User Management to see how Bolt handles user sign-ups.
- Click the gear icon in the top center of your screen, then click All project settings.
- Click User Management.
-
Notice the chart that shows user sign-ups, along with the database table below it that lists information for each registered user.
Note that the
user_id
under User Management will match theuser_id
in your Database favorites table.
Part 5: Use the selector tool to change your app title
Now let’s use the selector tool to update your app’s title. By default, your app was automatically named Pet Name Picker. Let’s change it to PetPick to give it a more personalized touch.- In the chatbox, click the Select icon.
- Click the Pet Name Picker site title.
- In the chatbox, paste the following prompt:
Change the title of the app to PetPick.
- Press Enter or click the blue arrow icon to submit.
- Take note of your remaining tokens. In this example, the total dropped from 196K to 126K, so about 70K tokens were used, which is considerably fewer than the first build.
Nice work! Now you have an understanding of how to change your site after it’s been created, as well as how many tokens it takes to perform an example update.
Part 6: Use Version History to restore an automatic backup
No matter how experienced you are, things don’t always go as planned. At some point, you may make changes to your site that you want to undo. When that happens, the easiest solution is to restore a previous version of your build. In this example, you’ll restore the site to its original color scheme by following the steps below.- In the top left of your screen, click the project title, then click Version history.
- Click the bottom option, which opens its preview mode.
- Click Restore this version in the top-right of your screen.
- Click Restore version to confirm.
Did you notice your token balance didn’t change? Restoring your site to a previous version doesn’t use tokens!
Part 7: Use code view to make changes
While you can do almost everything you need through prompting, it’s helpful to understand how code view works. Code view lets you make changes directly in your app’s code without using any tokens.If you’re new to coding, limit your edits to text and labels at first. It’s easy to break things when working directly in code, and version history doesn’t cover those changes. If something goes wrong, you’ll need to prompt Bolt to help you fix it.
- Click the code view icon in the top center of your screen.
- If you know where to look to make your changes, that’s great. However, a shortcut is to use the search bar to find the text you want to change. To do so, click the Search icon.
- Enter
Pet Name Picker
. - Click the result that appears under
App.tsx
. - Change the name in the code from
Pet Name Picker
toPetPick
. - Click Save in the top right corner of your screen.
- Click the eye icon to return to Preview Mode and verify your changes have taken effect.
- Take note that no tokens were used to complete this name change.
You just made code changes that didn’t require any tokens!
Part 8: Publish your project
Now you’re ready to share your app with others! Follow the steps below to publish it using Bolt’s built-in hosting.- Click Publish in the top-right corner of your screen.
- Click the second Publish button that appears.
- Wait about a minute for Bolt to deploy your site.
- Click the link that appears in the chat window to open your site in a new browser tab.
Awesome! You just published your Bolt web app!