Probably having the code as modular as possible from the beginning makes sense, so there can be different database backends, no database backends for example for single board computers, cryptography modules for different voting mechanisms, rate limit and/or attack resistance modules etc. Need to look up some best practice examples I suppose.