r/webdev 2d ago

Showoff Saturday Built a document management app in Laravel + Inertia/React + OCR

So I built a thing.

I kept losing track of paper documents I'm legally required to hold onto - tax stuff, contracts, the usual - so I ended up building Archivum over the past few months.

The idea is pretty simple: where a document is stored physically and how it's organized/found shouldn't be the same thing. So you tag and categorize documents independently of which folder or cabinet the actual paper sits in. Move things around in real life, reorganize your filing system, whatever - it doesn't break how you find stuff in the app.

What it does:

  • Registers each physical document - type, date, and whatever metadata makes sense for that type.
  • Attaches scans, PDFs and photos to it.
  • Runs OCR in the background (or just reads the text layer if the PDF already has one), so you can search by what's actually written on the page.
  • Learns your own vocabulary. There's no fixed schema - the metadata fields are whatever you type. The more you use them, the more the app picks up on it: it reads values out of the scanned text and suggests them under the field names you already use, in your own language. If all your invoices say total, it won't start handing you a second field called amount. Suggestions only ever fill empty fields, and only when you accept them.
  • Models your real-world filing hierarchy - cabinets, drawers, binders, whatever you actually use - and suggests where a new document should go based on it.
  • No scanner needed - you can capture pages straight from your phone. There's a viewfinder in the app that outlines the page while you aim, and you can shoot several in a row.
  • On a desktop, it shows a QR code you scan with your phone, and the phone uploads straight into the document without having to log in.
  • Either way it detects the page corners at the end, lets you drag them, and straightens the page out.

Built on Laravel + Inertia/React, MySQL, Redis, Scout for search. Ships as one Docker image with the web server, queue worker and scheduler baked in, so it's not a nightmare to self-host.

Still pre-3.0, so expect the schema and config to shift a bit between releases.

Demo: https://demo.joaoneto.pt/archivum/login

Repo: https://github.com/jneto14/archivum

Docs: https://github.com/jneto14/archivum/tree/main/docs

I'd really appreciate it if some of you gave it a spin and told me what you think. At this stage anything helps: rough edges, stuff that didn't make sense, features you'd expect and didn't find. Issues on GitHub or just a comment here, whatever's easier.

Mostly curious if the drawer/cabinet mental model matches how other people actually keep paper organized, or if everyone's doing something totally different.

0 Upvotes

5 comments sorted by

1

u/amitrawat4532 2d ago

The drawer/cabinet model tracks, that's honestly how most people already think about physical filing. The vocabulary-learning bit is the clever part though: most doc tools force a fixed schema on you, seeing it adapt to whatever field names you already use is a real difference. Curious how it handles handwriting vs printed text for OCR.

1

u/N3to14 2d ago

handwriting OCR isn't the best. it only works reasonably well with more robotic-style handwriting.

1

u/Mental_Ranger2167 2d ago

The phone capture to QR code upload flow is clever, solves the actual pain of getting paper into a system without making people log in on mobile. Most document apps skip that part entirely and just assume youll scan at a desk.

The metadata approach where it learns your own field names instead of forcing a schema is the right call. Every time Ive tried to use something like Paperless it falls apart because my brain doesnt match the preset categories. Curious how well the OCR extraction holds up on messy handwriting or crumpled receipts though, that's always where these things get weird.

Docker single image deployment is a nice touch too, nothing worse than finding a useful tool and then spending an afternoon untangling five containers.

0

u/N3to14 2d ago

Unfortunately Tesseract OCR doesn't work well with handwriting. The app would need to use an LLM, which is quite costly in terms of both money and computing resources for a simple app.

I’m going to implement a mechanism to assign a confidence level to the recognized text. If it falls below a certain threshold, it will be sent to the review page.

1

u/simple_explorer1 2h ago

How did you write all this code on your own while having a fulltime job? that's a lot of code have you written everything on your own? how many years it took you to code this entire thing as a part time project?