P-03 · How I built it

Pocket

Private app · for my own use

Pocket is a private money app I built for myself. It shows what is left to spend this month, where the money went and how my savings are doing, and it makes a clean monthly report as a PDF.

Why I built it

I wanted one calm place for my money that answers the questions I actually ask: how much can I spend today, did anything change, and are my savings doing what they should. I also wanted to decide what each number means, and to keep my data with me.

It’s private: it isn’t in any app store, and there is nothing to download.

Screens

All numbers, shops and cards in these screenshots are made up.

The Pocket home screen with made-up figures for the month and a spending chart.
The month at a glance.
The Pocket budget screen showing how a made-up month adds up.
How the month adds up.
A list of made-up purchases in Pocket, filtered by month.
Where the money went.

Hard moments

  1. A PDF report that has to work on a phone, in Hebrew

    What I wanted
    A clean monthly report as a PDF, in Hebrew, that I can share straight from my phone.
    Where it got stuck
    An app added to the iPhone’s home screen can’t use the browser’s print function, so “print to PDF” simply does nothing there. And Hebrew is written right to left, with numbers and signs inside the text, which is easy to get visually wrong.
    What didn’t work
    Printing the page, and building the PDF with ordinary PDF text tools, which handle right-to-left text badly.
    What fixed it
    I build each page as a normal web page, draw it to a picture, and put the pictures into a PDF file, all on the phone. The PDF is always Hebrew and right to left, whatever language the app is set to, and numbers stay in one piece with their sign.
    What I learned
    When the platform won’t give you the tool, build the smallest thing that gets the result, and test it on the real device.
  2. A report that looked fine but was cut off

    What I wanted
    A report where nothing is ever hidden.
    Where it got stuck
    I had made every page a fixed A4 size with the content inside it. It looked right on my sample, but with real data a long table ran past the bottom of the page and was simply cut off.
    What didn’t work
    Shrinking fonts and spacing until it fit. It fixed one report and broke the next.
    What fixed it
    I stopped fixing the content to the page. Now the page is built first, then measured. What doesn’t fit moves to a new page with the same header. A long table is cut between its rows, with its header row repeated, and a heading never stays alone at the bottom of a page. I check it by looking at every page of the real output.
    What I learned
    Content that varies needs a layout that measures. And look at every page, not just the first one.
  3. Reports that must add up

    What I wanted
    My savings statements, turned into numbers I can trust.
    Where it got stuck
    The statements are PDFs where the text can come out in pieces, letters one by one, Hebrew reversed, and a single spelling difference in a label can make a number disappear. Several times a value was read as something else, without any error.
    What didn’t work
    Trusting that a line was right because it was found.
    What fixed it
    Every statement has to add up on its own terms: the opening balance, plus what was deposited, plus the profit, minus the fees, has to equal the closing balance. If it doesn’t, it’s refused and kept as a file so I can see why. I also added a test for each odd shape I met.
    What I learned
    A simple check is worth more than clever parsing. Make the data prove itself.
  4. A month view that was empty almost everywhere

    What I wanted
    A balance and a profit for every month of my savings.
    Where it got stuck
    Only one month had a number. A month counted only when every account had numbers for it, and one empty, closed account was enough to blank all the others. The statements also give only the end of a quarter or a year, not every month.
    What didn’t work
    Filling the gaps with the last known value. That is quietly wrong.
    What fixed it
    Empty accounts are left out. Quarter and year ends from the statements count as exact. The months in between are worked out from what was deposited and the profit between two known balances, and they’re marked with an “about” sign and explained on the screen.
    What I learned
    When you must estimate, say so on the screen, in the same place as the number.
  5. Making it calmer

    What I wanted
    To understand at a glance what I’m looking at.
    Where it got stuck
    Every feature I added made the screens busier. The same savings number showed up in several places, and a few numbers needed explaining that I had forgotten myself.
    What fixed it
    The home screen says “Nothing needs your attention” when that’s true. Sections I don’t need all the time stay closed until I open them. The month is chosen in one place, related screens became one section with fewer tabs, and confusing numbers have a dotted underline: a tap opens a short explanation.
    What I learned
    Hiding things is a design feature. Put the explanation behind a tap, not on the screen.

What it’s made of

Behind the scenes
Node.js with TypeScript and a small SQLite database.
On the phone
Plain JavaScript, no framework, installed on the phone as a web app.
The PDF report
Made on the phone itself: each page is drawn as a picture and put into a PDF.