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
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:
- Discover Claude interviews you and writes a short brief.
- Design See and adjust the app before any code exists.
- Build One prompt turns the brief and design into an app.
- Review Try the real tasks and fix what does not fit.
- Deploy Live, private and backed up, from one prompt.
- 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.
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.
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.
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.
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.
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.
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.
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:
- Create a customer, then a quote for that customer.
- Turn the quote into an invoice and download the PDF.
- Mark the invoice as paid and check that the dashboard updates.
- Ask Claude to restart everything, and check that your data is still there.
Prompt
Check that your data survives a restart
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.
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
What you should see: A VAT rate per line in the invoice editor, and a VAT breakdown on the PDF, like the one below.
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.
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.
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.
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.
When the change works the way you want, tell Claude to publish it:
Prompt
Publish the change
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
Prompt
Customize the PDF invoice design
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.
Keep learning
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.