Component-based routing archiecture for single-page applications (SPA)