Skip to content
AppHaven.

Tutorial

How to Build Your Own Invoice App with AI

Build a real business application with Claude Code.

Reading time
15 min read · about 2 hours to build
Difficulty
Beginner
Last updated
Updated
Tools used
Claude Code
Claude Design
PostgreSQL
AppHaven
The finished app: revenue, outstanding invoices and recent activity for a small design studio. Your version will look different, because you decide what it does.

In this tutorial you build an invoicing app for your own business with Claude Code. You will not write the code yourself. You make the decisions: what the app does, how it looks, and whether it works. The tutorial follows six steps that work for any app you build with AI, not only this one:

  1. Discover Claude interviews you and writes a short brief.
  2. Design See and adjust the app before any code exists.
  3. Build One prompt turns the brief and design into an app.
  4. Review Try the real tasks and fix what does not fit.
  5. Deploy Live, private and backed up, from one prompt.
  6. Improve Try every change on a test version first.

What you'll build

The example is an invoicing app for a small design studio, with five parts:

  • Customer management

    Contact details, billing addresses and VAT numbers in one place.

  • Quotes and invoices

    Line items, VAT and totals, with an accepted quote turned into an invoice in one click.

  • PDF generation

    A printable PDF for every quote and invoice, ready to email.

  • Payment status tracking

    Draft, sent, paid and overdue, updated as payments arrive.

  • Revenue dashboard

    Revenue per month, outstanding amounts and your biggest customers at a glance.

Yours does not have to look like it. In every step you can leave out what you do not need, or add what is missing: a time log per project, a reminder for late payers, invoices in two languages. That freedom is the point of building it yourself.

Step 0, Set up: Get your tools ready

You need two accounts:

  • A Claude subscription

    Any paid plan, such as Pro. It includes Claude Code, which builds the app, and Claude Design. The free plan does not include Claude Code.

    Compare Claude plans
  • A GitHub account

    Your code is stored in a GitHub repository, so every change is saved and you can always go back.

    Create a free GitHub account

And Claude Code running in your terminal. Never used it before? Our setup guide walks you through installing it and lets Claude set up the rest of your computer: Git, GitHub, and Docker to run the app on your own machine.

Setup guide · 10 min How to set up Claude Code on your computer Install Claude Code, open it in your terminal, and let it set up the rest.

Step 1, Discover: Let Claude ask the questions first

An AI-built app usually disappoints for one reason: nobody worked out what it should do. So before anything is designed or built, let Claude interview you. Create an empty folder, open Claude Code in it, and start with this:

Prompt

Let Claude interview you

Claude asks about how you work today, one question at a time, and turns your answers into a short brief.

I want to build an invoicing app for my business. Before you design or build anything, interview me about how I work today. Ask one question at a time, and wait for my answer before you ask the next one. Cover: - who my customers are and how many I have - how I make quotes and invoices now, how they are numbered, and what goes wrong - VAT, payment terms and how I check whether I have been paid - who else needs to use the app, for example a bookkeeper When you have enough, write a short product brief to BRIEF.md: who uses the app, the main workflows, the data it stores, and what is out of scope for the first version. Do not write any code yet.

What you should see: About ten questions, one at a time. Answer them as you would explain your work to a new colleague. At the end, Claude writes BRIEF.md and shows it to you.

Claude asks, you answer. Questions about deposits or a bookkeeper's access are easy to answer now and expensive to discover later.

Read the brief carefully. Anything in it will end up in the app, and anything missing will not. Correct it in plain language, for example "we never give discounts, leave that out", until it describes your business.

Step 2, Design: Design and refine your screens

Changing a design costs one sentence. Changing a built app costs a lot more. So look at the screens before any code exists. In the same Claude Code session, start Claude Design with /design and point it at your brief:

Prompt

Design the screens from your brief

Claude Design opens with a first version of each screen, which you can adjust on the canvas or by asking.

/design Design the invoicing app described in BRIEF.md. Screens: dashboard, customer list, invoice editor, and the PDF version of an invoice. Style: calm and professional, with plenty of whitespace. Use realistic example data for a small design studio with about 30 customers.

What you should see: Designs for the four screens. Ask for changes in plain language, such as “make the totals stand out more” or “add a notes field”, until it feels right.

A design of the invoice editor. Nothing works yet, which is the point: it is quick to change.

Make it yours

The first designs use neutral colours. If your business has a website, Claude can take your logo and colours from it, so the app and the invoices you send look like they come from you:

Prompt

Use your own logo and colours

Replace the address with your own website.

Make the designs look like my business. Take the logo, colours and fonts from my website at https://www.example.com and use them on all four screens, including the invoice PDF.

What you should see: The same screens in your colours, with your logo in the app and on the invoice. No website? Put your logo file in the project folder and name your colours in the prompt instead.

Step 3, Build: Build the first version

Now Claude builds the real app from your brief and your design. This prompt adds the technical rules that matter for an application that handles money:

Prompt

Build the app from the brief and the design

Your brief says what the app does. This adds how it should be built, and asks for a plan before any code is written.

Build the app described in BRIEF.md, using the design we made with /design. Store the data in PostgreSQL and run everything with Docker, so it works the same on my computer and online. Money amounts must always add up exactly, and the database must be able to change later without losing data. Show me your plan first and wait for my go-ahead. When it is built, start it on my computer and give me the address to open.

What you should see: A plan and a list of database tables. Ask about anything unclear, then approve it. Building takes 10 to 20 minutes, while Claude writes code, runs tests and fixes what fails. At the end it gives you an address such as http://localhost:3000.

Claude Code working through its plan. It shows each file it writes and each test it runs.

Why PostgreSQL?

Invoices are records you have to keep, often for seven years or more. The data has to survive every update you make to the app, which is why the prompt asks for PostgreSQL and a database that can change without losing data, instead of a file on disk. On your computer, Docker runs the database next to the app. Online, your hosting platform provides it.

Step 4, Review: Test the workflows and improve

Claude's tests check the code. Only you can check whether the app does the job. Go through the tasks you will do every week, with real-looking data:

  1. Create a customer, then a quote for that customer.
  2. Turn the quote into an invoice and download the PDF.
  3. Mark the invoice as paid and check that the dashboard updates.
  4. Ask Claude to restart everything, and check that your data is still there.

Prompt

Check that your data survives a restart

Stop the app and its database completely, start them again, and tell me when I can check that my data is still there.

What you should see: The app comes back with every customer and invoice you created. If anything is missing, tell Claude: that is a problem to fix before you go further.

Write down what goes wrong or feels awkward, and hand the whole list to Claude:

Prompt

Fix what you found

Describe each problem as what you did, what you expected and what happened. That is all Claude needs.

I tested the app and found these problems: - [what I did, what I expected, what happened instead] - [...] Fix them one at a time. Add a test where it makes sense, and tell me what you changed.

What you should see: Each problem fixed in turn, with a short explanation. Repeat your test run to confirm.

This is also where an app you build yourself pays off: anything that does not fit how you work is one prompt away from fixed. For example, if some of your work has a different VAT rate:

Prompt

Adjust the app to your business

Invoices need a VAT rate per line: 21%, 9% or 0% (reverse charge). Show a VAT breakdown per rate on the invoice and in the PDF. Also add payment terms per customer, 14 days by default, and use them to set the due date.

What you should see: A VAT rate per line in the invoice editor, and a VAT breakdown on the PDF, like the one below.

The generated PDF, with your business details and payment instructions.

Step 5, Deploy: Put it online with AppHaven

An invoicing app is only useful if you can reach it from anywhere, and only safe if nobody else can. On AppHaven the app runs in a European datacenter with its own database, daily backups and access limited to people you invite.

Add the AppHaven plugin

Plugins teach Claude Code new skills. The AppHaven plugin tells Claude how to put an app online on AppHaven, and how to read its logs when something goes wrong. Run these two lines inside Claude Code:

Inside Claude Code

/plugin marketplace add apphaven-eu/claude-plugins
/plugin install apphaven

Ask Claude to deploy

Prompt

Put the app online

Claude adds what AppHaven needs, deploys the app and checks that the build succeeds.

Put this app live on AppHaven, with its PostgreSQL database. It must stay private: only people I invite can open it. Set up access to my AppHaven account first if you need to.

What you should see: Claude asks you to approve access to your AppHaven account in your browser, then deploys. A few minutes later it gives you the app's address.

Your app on AppHaven: running, backed up and private. Invite your bookkeeper from the console when you want to share it.

Step 6, Improve: Keep improving without risking your invoices

Your app now holds real invoices, and you will keep thinking of things to add. You want to see a change working before it reaches the version you use every day. On AppHaven, Claude can put every change on a preview: a test version of your app with its own address and its own test data. You try it, and only when you are happy does it go live.

Switch on preview deployments once, in your app's settings in the AppHaven console. Then ask for a change and say you want to see it first:

Prompt

Ask for a change and see it first

Claude makes the change on a separate branch, pushes it, and waits for AppHaven to start the preview.

Add recurring invoices. Let me mark an invoice as monthly or quarterly, and create the next one as a draft on the right date. Never send anything automatically. Put the change on a preview branch, so I can try it without touching the live app, and give me the address of the preview when it is ready.

What you should see: A message from Claude with the preview's address. Sign in and try recurring invoices with test data. Your live app and its invoices are untouched.

Your live app and a preview side by side. Each has its own address and its own data.

When the change works the way you want, tell Claude to publish it:

Prompt

Publish the change

Recurring invoices work. Publish them to the live app, and clean up the preview when that is done.

What you should see: Your live app updates with recurring invoices, and the preview and its test data are removed.

That is how every change goes from now on: ask for it, try it on a preview, publish it. Two more ideas to try it with:

Prompt

Add a customer revenue report

Add a report page with revenue per customer for a period I choose: invoiced, paid, outstanding and overdue, with a CSV export I can send to my accountant. Put it on a preview first and give me the address.

Prompt

Customize the PDF invoice design

Restyle the PDF invoice to match my brand: my logo from public/logo.svg, #1E3A5F for headings and totals, and a footer with my Chamber of Commerce and VAT numbers. Keep it on one A4 page for up to 15 lines. Put it on a preview first and give me the address.

Troubleshooting

Claude says it cannot reach Docker

Open Docker Desktop and wait until it shows that the engine is running, then ask Claude to try again. Docker Desktop has to be running whenever you work on the app on your own computer.

The app works on my machine, but the build fails on AppHaven

Ask Claude why the build failed. With the AppHaven plugin it reads the build log itself and usually fixes the cause. Common causes are a file that was never committed, or a dependency that is only installed on your own computer.

The app starts, but shows a database connection error

The app is probably still using the database address from your own computer. Ask Claude to check the app's logs on AppHaven and make sure the app reads DATABASE_URL instead of a fixed address.

My change does not get its own preview

Check that preview deployments are switched on in your app's settings in the AppHaven console. Then ask Claude to check the app with the AppHaven plugin: it can see which branch names get a preview and whether you have reached the maximum number of previews.

Build the tools your business runs on.

AppHaven runs the apps you build with AI, with a managed database, private access and backups, in European datacenters.