Building a LuCI (smb)user configuration frontend

I am using OpenWrt on a NAS box (WD MybookLive), which would benefit tremendously from having a web based NAS user configuration frontend. I got several SMB users and accounts and shares working but had to resort to the console for tools like useradd and smbpasswd.

There is already a share configuration frontend (luci-app-samba4) but this doesn't manage users and passwords. Also, it's a bit cryptic since users have to know mount points and umasks.

I managed to whip something up using whiptail which can be called from a ssh session, but it would be sooo much cooler to have this integrated into LuCI, or even luci-app-samba4.

So: Where should I start digging?
I can speak JS - just Lua would be new, but the syntax looks easy enough.