discoverer/api refactor: add app.py; WIP