Skip to main content

Documentation 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.

TriviaPP is a Star Wars trivia mobile application built with Ionic 8, Angular 17, and Capacitor 7. It combines a curated bank of Star Wars lore questions with live data fetched from the SWAPI API to generate dynamic, never-repeating quiz questions. User authentication is handled by AWS Amplify (Cognito), while online leaderboard scores are persisted in Firebase Firestore. The app is packaged as a native Android application through Capacitor, giving it access to device-native capabilities such as the camera and haptic feedback engine.

What TriviaPP Does

TriviaPP guides players through a complete trivia experience from account creation to score submission:
  1. Sign up & confirm — Players register with an email and password through AWS Cognito. A confirmation code is sent to their inbox and must be verified before they can log in.
  2. Play trivia — Each game round presents a series of multiple-choice questions. Questions are drawn from a built-in lore bank (60% of questions) or generated on-the-fly from SWAPI data on characters, planets, and films (40% of questions). SWAPI-sourced answers are automatically translated from English to Spanish via the MyMemory API.
  3. View the leaderboard — After finishing a game, the player’s score is submitted to Firebase Firestore and appears on the daily online ranking. A local ranking stored in the browser is also maintained and resets automatically every 24 hours.
  4. Browse the Star Wars wiki — A built-in wiki section lets users explore Star Wars lore, characters, and universe content — no login required.
  5. Manage a profile — Players can set a display name and upload a profile photo using the Capacitor Camera plugin. Cumulative game statistics (games played, correct answers, maximum score) are tracked locally.

Tech Stack

TechnologyVersionRole
Ionic8.4UI framework and component library
Angular17.3Application framework (SPA)
Capacitor7.4Native runtime (Android)
AWS Amplify / Cognito6.17User authentication
Firebase Firestore11.6Online daily ranking
SWAPILive Star Wars data (swapi.py4e.com/api)
MyMemory Translation APIEN → ES translation of SWAPI answers
Capacitor Camera7.0Profile photo capture
Capacitor Haptics7.0Vibration on wrong answers

Key Features

Trivia Gameplay

Multi-choice questions drawn from a static lore bank (60%) and dynamically generated from live SWAPI data on characters, planets, and films (40%). Questions never repeat within a single session.

Star Wars Wiki

An in-app wiki lets players explore the Star Wars universe between games. Wiki pages are available without authentication, making the content accessible to anyone who opens the app.

Live Leaderboard

Scores are submitted to Firebase Firestore after every game and displayed on a daily online leaderboard. The board resets each day so every player has a fresh chance to reach the top.

Game History

Every completed game is recorded locally (score, correct answers, date) so players can review their past performance and track improvement over time.

Player Profile

Players set a display name and capture a profile photo with the device camera. Lifetime stats — games played, total correct answers, and all-time high score — are persisted across sessions.

Haptic Feedback

When a player selects a wrong answer, Capacitor Haptics fires a vibration on supported devices. This setting can be toggled off in the player profile.

Project Structure

The source code lives entirely under src/app/ and is organised by concern:
DirectoryContents
src/app/pages/One lazy-loaded Angular module per route: login, register, home, profile, trivia, ranking, history, wiki
src/app/services/Injectable services: AuthService, TriviaService, SwapiService, StorageService, RankingService, TranslationService, WikiContentService
src/app/models/TypeScript interfaces for TriviaQuestion, Profile, RankingItem, HistoryItem
src/app/guards/AuthGuard — redirects unauthenticated users back to the login page
src/app/components/Shared presentational components reused across pages
src/app/data/Static data assets and wiki section configuration
Capacitor Camera and Haptics require a real Android device or a properly configured Android emulator. These plugins are silently unavailable when running the app in a desktop browser. All other features — trivia, ranking, wiki, history, and profile — work fully in the browser.

Build docs developers (and LLMs) love