Whirlwind tour: Build a full-stack app with InstantDB
๐ Hey there!
In this tutorial we'll walk through creating a full-stack app with InstantDB. Within 5-10 minutes you'll have an app that runs on your computer, and if you like, can be deployed into the wild!
What we'll do:
1.Login to Instant in the terminal
2.Install the Instant MCP server
3.Scaffold a starter Instant app
4.Prompt an LLM to build us an app (This is the fun part!)
1. Log in to Instant via instant-cli
As a first step let's make sure you're logged in. Run the following command in the terminal with your favorite package manager.
npx instant-cli login
This will open up a broswer window where you can log in to your Instant account or sign up if you don't have one yet.
2. Install the Instant MCP server
Below are instructions on how to add the remote Instant MCP server. Select your preferred tool and follow the instructions.
If you're on a paid plan, you can add the server via the command line:
claude mcp add instant -s user -t http https://mcp.instantdb.com/mcp
Now you can run through the following:
Run claude in your terminal to start the Claude Code CLI.
Run /mcp to see your list of MCP servers.
See instant listed there!
Select it and go through the auth flow to enable the Instant MCP server in your claude code sessions!
Authentication Required
After adding the MCP server you'll need to go through an OAuth flow to access the tools. Be sure to go through the auth flow to enable the Instant MCP server in your client!
3. Scaffold a starter instant app
Now that you're authenticated any app you make will persist unless you delete the data later โ woohoo!
As a next step we'll use create-instant-app, our CLI tool, which makes it super easy to get started with a new Instant project. Run the following in your terminal.
npx create-instant-app
Go through the prompts to select your framework and llm. Once the app is generated change into the new directory and go on to step 3!
4. Prompt the LLM to build us an app! (This is the fun part!)
Woohoo! Now that we've got everything set up, we're ready to build an app! Fire up your editor (cursor, windsurf, zed, etc.) or your CLI tool (claude, gemini, etc) and type up a prompt. Hit enter and watch the magic happen!
Here are some example prompts for inspiration
Habit Tracker
Create a habit tracking app where users can create habits, mark daily completions, and visualize streaks. Include features for setting habit frequency (daily/weekly), viewing completion calendars, and tracking overall progress percentages.
Keep the code to < 1000 lines.
Seed with 5-6 sample habits like "Exercise", "Read", "Meditate" with 30 days of completion history.
Trivia Game
Use InstantDB to create a trivia game with multiple-choice questions, score tracking, and category selection. Players should see immediate feedback on answers, track their high scores, and compete on a leaderboard.
Keep the code to < 1000 lines.
Seed with 30-40 questions across categories like "Science", "History", "Sports", and "Entertainment".
Job Board
Build a job board app where employers can post jobs and job seekers can browse and save listings. Include filtering by job type, location, and salary range, plus a simple application tracking system.
Keep the code to < 1000 lines.
Seed with 15-20 job listings across categories like "Engineering", "Design", "Marketing" with various companies and locations.
Debugging Common Issues
Run into an issue? Here are solutions to common problems you might encounter:
Huzzah! You've built your first app with Instant! If you're curious, you can go to your Instant dashboard and see all the data you've created in the Explorer tab.
๐
Show off your creation!
We'd love to see what you built! Tweet us @instant_db and we'll amplify your awesome creations to the community.