Go to file
Dustin da9d336817 Store receipts in the database
Rethinking the workflow again.  Requiring the transaction to be present
in Firefly already will be problematic for two very important cases:

* Gas station purchase never show up in Firefly automatically
* HSA purchase show up hours or days later and have no information
  besides the amount

These are arguably the most important cases, since they are the ones
that really need receipts in order to keep the transaction register
correct.  Thus, we need a different way to handle these types of
transactions.

Really, what I need is a way to associate transaction data with an image
I really liked the original idea of storing receipts in Paperless, but
that ended up not working out because the OCR failed miserably and thus
made it impossible to search, so finding a receipt meant looking at each
image individually.  I think, therefore, the best solution is to store
the images along with manually-entered data.

To implement this new functionality, I am using `sqlx`, a SQL toolkit
for Rust.  It's not exactly an ORM, nor does it have a dynamic query
builder like SQLAlchemy, but it does have compile-time checking of
query strings and can produce type-safe query results.  Rocket has
support for managing its connection pools as part of the server state,
so that simplifies usage quite a bit.

On the front-end, I factored out the camera image capture into an HTML
custom element, `camera-input`.  I did not update the original form to
use it, since I imagine that workflow will actually go away entirely.
2025-03-09 19:55:08 -05:00
.sqlx Store receipts in the database 2025-03-09 19:55:08 -05:00
js Store receipts in the database 2025-03-09 19:55:08 -05:00
migrations Store receipts in the database 2025-03-09 19:55:08 -05:00
src Store receipts in the database 2025-03-09 19:55:08 -05:00
templates Store receipts in the database 2025-03-09 19:55:08 -05:00
.containerignore Store receipts in the database 2025-03-09 19:55:08 -05:00
.editorconfig Store receipts in the database 2025-03-09 19:55:08 -05:00
.gitignore Store receipts in the database 2025-03-09 19:55:08 -05:00
.prettierrc Implement basic page navigation w/ mock data 2025-03-08 11:16:35 -06:00
Cargo.lock Store receipts in the database 2025-03-09 19:55:08 -05:00
Cargo.toml Store receipts in the database 2025-03-09 19:55:08 -05:00
Containerfile Store receipts in the database 2025-03-09 19:55:08 -05:00
LICENSE-Apache-2.0.txt Initial commit 2025-03-05 18:02:52 -06:00
LICENSE-MIT.txt Initial commit 2025-03-05 18:02:52 -06:00
createdb.sh Store receipts in the database 2025-03-09 19:55:08 -05:00
firefly.env Fetch transactions from Firefly III 2025-03-08 16:01:08 -06:00
rustfmt.toml Initial commit 2025-03-05 18:02:52 -06:00
start-firefly.sh Fetch transactions from Firefly III 2025-03-08 16:01:08 -06:00
start-postgresql.sh Store receipts in the database 2025-03-09 19:55:08 -05:00
static Fix path to static resources 2025-03-08 20:08:45 -06:00