It is not illegal, even under Federal law, to build an app to help dispensaries in Washington/Oregon/Colorado/DC manage their local regulatory compliance. Marijuana is illegal under Federal law, but this software, as a tangential service, is not. If it were, no one online could sell grow tents or grow lights or high-nitrogen fertilizer etc., even though it's obvious what market those items are intended for.