TriviaPP uses Angular’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/dreancaste/TriviaPP/llms.txt
Use this file to discover all available pages before exploring further.
RouterModule.forRoot() configured with the PreloadAllModules preloading strategy. Every feature module is lazy-loaded — meaning its JavaScript bundle is only fetched on demand — but Angular begins downloading all lazy modules in the background as soon as the initial page is stable. This gives the app fast first-load times while ensuring that subsequent navigation feels instant. Route protection is applied selectively via AuthGuard using Angular’s canActivate hook: public pages like login, registration, and the wiki are always accessible, while the game’s core features require a verified Amplify session.
Route Table
| Path | Module | Auth Required | Description |
|---|---|---|---|
'' (empty) | — | No | Redirects immediately to /login. Matches when the app is opened with no path. |
login | LoginPageModule | No | User sign-in screen. Entry point for returning players. |
register | RegisterPageModule | No | New account registration with AWS Cognito email confirmation flow. |
home | HomePageModule | Yes (AuthGuard) | Main dashboard. Provides navigation links to all protected features. |
profile | ProfilePageModule | Yes (AuthGuard) | Player profile editor — display name, avatar capture, and haptic settings. |
trivia | TriviaPageModule | Yes (AuthGuard) | 10-question Star Wars trivia session with score tracking. |
ranking | RankingPageModule | Yes (AuthGuard) | Daily Firebase leaderboard showing all submitted scores for today. |
history | HistoryPageModule | Yes (AuthGuard) | Local match history list with cumulative correct-answer statistics. |
wiki | WikiPageModule | No | Star Wars wiki browser — characters, films, and planets sourced from SWAPI. |
Wiki Sub-routes
Thewiki module defines its own child router (WikiPageRoutingModule) using RouterModule.forChild(). The following paths are all nested under the top-level wiki route:
| Full Path | Description |
|---|---|
wiki/ | Wiki home page displaying the three section cards (characters, films, planets). |
wiki/characters | Paginated list of Star Wars characters fetched from SWAPI. |
wiki/films | List of Star Wars films with episode metadata and curiosities. |
wiki/planets | List of planets with climate, terrain, and population data. |
wiki/detail/:type/:id | Entity detail page. :type is one of characters, films, or planets; :id is the SWAPI numeric ID. |
The
wiki route and all of its children are intentionally left without AuthGuard. This allows unauthenticated users to browse Star Wars lore freely — for example, directly following a deep link to a planet detail page — without being redirected to the login screen. Only the game features (trivia, ranking, history, profile) require authentication.Preloading Strategy
PreloadAllModules is applied globally in AppRoutingModule:
PreloadAllModules preloads all lazy modules, including the wiki. If you add a very large third-party dependency inside a single feature module in the future, consider switching to a custom preloading strategy to avoid competing with the initial load.AuthGuard validates sessions at each protected route, see the AuthGuard reference.