Using a standard input method editor (IME) was my first thought, too.
You can create a custom user dictionary in any IME, mapping the abbreviations to one or more full words or phrases, either in bulk beforehand, or one by one while you use the system.
During typing, pressing the space bar brings up a list with the substitutes corresponding to the preceding string. You can select with the up/down arrows and insert by pressing space again.
In practice, most of the time you can convert by pressing space twice in quick succession, because either you have a single candidate, or because the default selection, the top candidate is automatically set to your last, or most frequent selection.
If there's no match, you can add a new abbreviation to your dictionary.
You can turn on/off the system by pressing CTRL-space, or some other key combo.
That's only necessary when you have more than one word abbreviated the same (e.g. "db" could be either "debug" or "database"). Someone here commented that this is a missing feature in OP's solution.
I'm aware of CJK input methods, but it's not immediately clear how/why you could repurpose them for English. Not to mention there are several types.