DEV Community

Cover image for Vibe Coding for Beginners: How to Build Your First App
Martin Tonev
Martin Tonev

Posted on

Vibe Coding for Beginners: How to Build Your First App

Vibe Coding for Beginners: How to Build Your First App

Build and publish a habit tracker with Vibe Coder Planner, one task at a time.

Your first app is ready when you can use it without the AI chat open. In this guide, you’ll build a habit tracker that lets you add a habit, mark it done for today, and refresh the page without losing your progress. Then you’ll publish it and open it on your phone.

The app uses three files. HTML defines the page, CSS handles the layout, and JavaScript makes the buttons work. The browser saves your habits using local storage. That keeps the project small enough to finish in a few tasks. Your laptop and phone will each have their own habit list.

What you’re building

Imagine opening the tracker in the morning. You add “Drink water” and “Read 10 pages.” When you finish reading, you check that habit and see 1 of 2 done today. If you close the tab and come back later that day, your progress is still there. When you open it tomorrow, both habits are ready to check again.

That single walkthrough is your definition of a working first release. Write it before you open a coding agent. When a new idea comes up, ask whether you need it to finish that walkthrough. Reminders and streaks can go on the backlog while you finish the daily flow.

1. Turn the idea into a project plan

Open Vibe Coder Planner, create a project called Daily Habit Tracker, and paste this brief into the project description.

Build a one-page habit tracker for someone tracking three daily habits.

Let the user add a habit, mark it done or undo it for today, and
remove it. Show the number completed today out of the total.
Trim habit names and reject entries that are blank after trimming.

Save habits and completion dates in browser localStorage. Use the
device's local calendar date. Habits should survive a refresh
and appear unchecked on a new day.

Use plain HTML, CSS, and JavaScript with no dependencies. Put
index.html, styles.css, and app.js in the repository root.
Use relative asset paths so the app works on GitHub Pages.
Leave accounts, cloud sync, reminders, and streaks for later.

Break the work into small tasks in dependency order. Give each
task a coding prompt and a manual test I can run in a browser.
Enter fullscreen mode Exit fullscreen mode

Generate the plan and open the Kanban board. Read the cards before running them. If the plan proposes a login screen or a database, leave those tasks for a later version. If one card says “Build the habit tracker,” split it into smaller pieces you can verify independently. AI project planning

Put the tasks in the order you can test them

Start with the screen, then add the form behavior. Once you can add and remove habits reliably, connect the list to browser storage. Save mobile testing and publishing for the last card. The first screen gives you a place to test the form, and the form gives you real data to test saving.

Open each card and look for a concrete result. “Implement persistence” is hard to check if you’re new to coding. “Add two habits, check one, refresh, and confirm the screen still says 1 of 2” gives both you and the agent a clear test. If the generated prompt lacks a test, add one before you start the task.

2. Choose where to run the tasks

If you already use Cursor or another coding agent that edits files, open your project folder in that editor. Copy the first task’s prompt from Vibe Coder Planner into the agent. Work in the same folder for each card. To publish using GitHub Pages, push your verified files to a GitHub repository.

To run tasks in Vibe Coder Planner, create a GitHub repository called daily-habit-tracker. Initialize it with a README so it has a default branch. Connect GitHub in Vibe Coder Planner, link the repository to your project, and configure a supported coding model. Pro includes a model you can use without supplying a separate API key. GitHub integration · AI task execution

With execution configured, moving a card to In Progress can start the agent. It works on a branch and opens a pull request, which is a proposed change to your repository. Review and test that branch before moving the card to Completed, since doing so can merge its pull request. Wait for the merge before starting the next dependent task. Kanban workflow

Keep the next task on the latest version

If you use an editor and Git, commit each working task before starting the next one. Use a short commit message like “Add habit form and removal.” If a later change breaks the app, you’ll have a version you can inspect and compare against.

If you run tasks from the board, open the pull request’s Files changed view. For the first task, expect the three app files. If the agent added a package manager, a database configuration, or extra screens, send the card back with the original scope. Once the files look right, preview the branch as described below, then mark the task complete.

3. Build the first screen and preview it

Run the first card. If the prompt tries to implement everything, add these instructions.

Build only the first screen. Create index.html, styles.css,
and app.js. Show a labeled habit input, an Add button, an
empty-list message, and a "0 of 0 done today" counter.
Use relative paths for CSS and JavaScript. Leave adding and
saving habits for later. Tell me how to preview the screen.
Enter fullscreen mode Exit fullscreen mode

If you used the GitHub workflow, open the repository, select the pull request’s branch, and choose Code → Download ZIP. Extract it. If you worked in an editor, use the files in your project folder.

Open a terminal in the folder containing index.html. If Python 3 is installed, run the command below and visit http://127.0.0.1:8000. Your editor’s local preview server also works. Use the same address and port each time you test storage.

python3 -m http.server 8000 --bind 127.0.0.1
Enter fullscreen mode Exit fullscreen mode

Check that the form, empty message, and counter appear. Shrink the browser window and make sure the page still fits. The Add button starts working in the next task.

4. Add and remove habits

Run the second card. Tell the agent to keep the existing screen, trim the habit name, reject empty input, and give each habit its own ID so removing one targets the correct row. Display habit names as plain text.

Here’s a prompt you can paste into the card if the generated one leaves the form behavior vague.

Keep the existing layout. Make the habit form work with the Add
button and the Enter key. Trim leading and trailing spaces before
adding. If the name is empty, show a short message and leave the
list alone. Clear the input after a successful add.

Render each habit name as text. Use a stable ID for each row so
removing one row leaves the others intact. Update the total and
show the empty-list message again when the last row is removed.
Browser storage and completion controls belong to the next task.
Enter fullscreen mode Exit fullscreen mode

Test the form with specific input so you can tell the agent exactly what failed.

  1. Type Drink water and click Add. One row should appear.
  2. Type Read 10 pages and press Enter. A second row should appear and the counter should say 0 of 2 done today.
  3. Enter only spaces and submit. The list should still contain two rows.
  4. Remove Drink water. Only Read 10 pages should remain.

Now remove the last habit and check that the empty message and 0 of 0 counter return. Add another habit immediately afterward. That catches a common state bug where the app can render the empty screen on first load but can’t get back to it after deleting the last item.

A refresh may clear the list at this stage. Saving is the next task.

5. Save habits and track completion for today

Run the third card. Add these details to its prompt.

Let the user mark a habit done for today and undo it.
Recalculate the count after each change. Save the list to
localStorage on add, remove, and toggle. Restore it on load.

When a habit is checked, store the current local date using the
device's local year, month, and day. A habit is checked only
when its saved completion date matches today's date. Undoing
completion clears that date. Keep the existing add and remove flow.

Tell me the storage key and date field so I can test rollover.
Enter fullscreen mode Exit fullscreen mode

Add two habits, mark one done, and refresh. Both habits should still be there and the counter should say 1 of 2 done today. Undo the checkmark and refresh again. You should see 0 of 2. Remove one habit and refresh one more time. The deleted habit should stay gone.

Test tomorrow without waiting. Check a sample habit. In your browser’s developer tools, open the local storage inspector for the preview site. Find the storage key the agent gave you, change the sample habit’s saved completion date to yesterday, and refresh. The habit should still appear, unchecked.

If the saved list seems to disappear, look at the browser’s address bar first. A preview at localhost:8000 and one at 127.0.0.1:8000 can display the same files while using separate storage. Use the same preview address when checking persistence. When you publish the app, add new test habits on the live URL before you check whether they survive a refresh.

How to fix a bug without starting over

If your habit survives a refresh but its checkmark disappears, paste this into the same task.

Bug: A completed habit appears unchecked after refreshing.
Steps: Add "Drink water", mark it done, confirm 1 of 1, then refresh.
Expected: The habit stays checked on the same date.
Actual: The habit remains, but the counter drops to 0 of 1.

Inspect where completion is saved and restored. Fix the smallest
relevant part, keep add and remove working, and tell me what to retest.
Enter fullscreen mode Exit fullscreen mode

Repeat those steps after the fix, then repeat the add and remove checks. Mark the task complete once all three behaviors work.

6. Publish the app and try it on your phone

Test the complete app at 375 pixels wide using the browser’s responsive view. Add a habit using only the keyboard. Tab through the controls and confirm you can see which one has focus. Check that you can tap Add, Done, and Remove without sideways scrolling.

If a long habit name pushes the controls off the screen, use it to make the mobile task precise. Add “Walk around the park for twenty minutes after lunch” and narrow the preview. The label should wrap inside its row, and you should still be able to check or remove the habit. Ask the agent to fix that row layout, then try the same name again on desktop and mobile.

Once the final files are on your default branch, publish from a public GitHub repository containing the app files.

  1. Open your repository and go to Settings → Pages.
  2. Under Build and deployment, choose Deploy from a branch.
  3. Choose main or your default branch, select /(root), and click Save.
  4. When deployment finishes, click Visit site. GitHub Pages publishing instructions

If the published page opens without styling or the buttons do nothing, look for 404 errors in the browser’s Network tab. Use ./styles.css and ./app.js in index.html so the files load from the project folder on GitHub Pages.

Open the public URL on your phone. The list starts empty because the phone has its own browser storage. Add a habit, mark it done, and refresh. If the habit stays checked on the live site, you’ve shipped a usable first app.

Try the app as a first-time visitor

Send the live URL to one person with this instruction: “Add something you want to do today, mark it done, and reload the page.” Let them figure out where to click. If they pause, ask what they expected the screen to say or do. Turn their observation into one task you can verify. For example, “Show ‘Add your first habit’ below the input when the list is empty” is easier to implement and check than “Make the app more intuitive.”

Record the result on your board. A note like “Tested on my phone: add, check, refresh, undo, refresh” gives you a short checklist to run again after your next change.

For your next card, try Rename a habit. Write the test before asking the agent to code it. Rename “Drink water” to “Drink a glass of water,” then refresh. The new name and the original completion state should both survive.

Start a project in Vibe Coder Planner and use the habit tracker brief above, or swap in your own idea with one screen and one action you can test.

Top comments (0)