Usually it's not a good practice to keep your app in a single file except that it's trivial or for educational purposes.
I don't want to reinvent the wheel, so here's links for sample flask project structures, skeletons and other info on the subject:
- Flask: Large App how-to
- https://github.com/italomaia/flask-empty
- How to organize a relatively large Flask application?
- Flask project structure
- How do I Structure My Flask Applications
And, or course, read the awesome flask mega-tutorial - you'll see how your application will grow and split into logical parts step-by-step.