What If?

blue sky architecture

In my previous post, I discussed various issues I had with npm and node. And I didn’t even mention the weird SQLite “code of conduct/ethics” thing.

The only reason npm and node are needed for StoreBoss is due to the fact that JS cannot communicate with SQLite lite except via (a) a server (node.js), and (b) a driver (the SQLite3 module that’s on npm) that binds node.js to SQLite.

But hang on a minute: what if I dispensed with SQLite entirely?

What if I stored the Stripe data on IndexDB (or actually Dexie)?

Well, I would still need a server to get to the Stripe REST API in order to download transaction data.

And of course, I would have to figure out how to query what in effect would be my (no dependencies, except for Dexie) browser database efficiently, and in a user-friendly fashion — perhaps by setting up a set of canned, parametrized filters.

Hmm… this might be worth exploring — if Deno is stable at this point enough for something as simple as this. I know from hands-on experience running a Woo store that the queries from Stripe are 95 percent predictable, If you offered StoreBoss end users a way to output to CSV, then they could Excel or PowerBI for whatever funky proprietary formula they might want to apply to their data. Meanwhile, if I also developed a simple facility to upload daily settlement data to the Woo/DSS environment on a WP server, then Bob’s your uncle, mate.

It all sounds blue sky risky, but why not try it?

I think I will.

My whole reason for doing StoreBoss is to do something new, not repeat what has been done a million times before – while still providing useful functionality to the Woo store owner.

100 Stripe transactions take up on about 20Kb in CSV format  JSON is half as compact as CSV, so there still should be plenty of disk space available on a desktop machine that’s not radically clogged up.

I might even try this idea out in Typescript, just for the fun of it. After all, I wouldn’t be as bad as developing the app in C++ and linking directly to SQLite (which I used to do back in my Wall Street days with Sybase back in the day).

So in this more interesting, lean scenario, you get the benefits of a strongly-typed version of JS.

If if it doesn’t work, then I can always fall back to the bloated, fundamentally insecure, Vulture Capital powered npm/node/sqlite stack.

Let’s see how it goes.

I’ll prototype in JS first, then if it shows any promise at all, go to Typescript.

Meanwhile, I still have to do my homework re Sigma, as I have only 19 days of my free trial on that platform.

I have to make sure I devote enough time to doing the requisite data modeling of the Stripe schema.