# toosynxed/angularbibleguesser architecture

> Architecture diagram of the GitHub repository toosynxed/angularbibleguesser, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/toosynxed/angularbibleguesser
- Repository: https://github.com/toosynxed/angularbibleguesser

## Overview

Better Bible Guesser is an Angular Bible-passage guessing game with scored standard and custom play, daily challenges, multiplayer, and quest-based activities. Players enter through the app, choose a mode, answer passage-location questions, and view results; profiles, leaderboards, and progression support continued play. The README and tree establish the product branches, while sampled source confirms Firebase-backed authentication and stats, local settings/offline services, and the callable Gemini chat function. Most feature component implementations were not sampled, so uncertain component-to-service wiring is omitted.

Main entry points: [`src/app/home/home.component.ts`](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/home/home.component.ts) (Home and mode choice), [`src/app/game/game.component.ts`](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/game/game.component.ts) (Standard game), [`src/app/quest-mode/quest-mode.component.ts`](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/quest-mode/quest-mode.component.ts) (Quest activities), [`src/app/auth.service.ts`](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/auth.service.ts) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_app["App shell<br/>[app.component.ts]"]
  node_routing["App routing"]
  node_home["Home and mode choice<br/>[home.component.ts]"]
end

subgraph group_play["Game play"]
  node_game["Standard game<br/>[game.component.ts]"]
  node_custom["Custom games"]
  node_create["Shared game creation"]
  node_daily["Daily challenge"]
  node_results["Scoring and results"]
  node_bible["Passage data<br/>[bible.service.ts]"]
end

subgraph group_social["Social modes"]
  node_multi["Multiplayer lobbies<br/>[lobby.component.ts]"]
  node_leaderboards["Leaderboards"]
end

subgraph group_progress["Profiles and quests"]
  node_quest["Quest activities"]
  node_academy["Video academy"]
  node_racetrack["Racetrack"]
  node_market["Scroll marketplace"]
  node_profile["Player profile"]
end

subgraph group_platform["Data and integrations"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_stats["Stats service<br/>[stats.service.ts]"]
  node_scrolls["Scrolls service<br/>[scrolls.service.ts]"]
  node_settings["App settings"]
  node_offline["Offline capability"]
  node_chat["Game help chat"]
  node_function["Chat callable<br/>[index.ts]"]
end

node_player(("Player"))
node_firestore[("Firebase services")]
node_gemini["Gemini API"]

node_player -->|"opens"| node_app
node_app -->|"ensures sign-in"| node_auth
node_app -->|"starts navigation"| node_routing
node_routing -->|"dispatches"| node_home
node_home -->|"starts play"| node_game
node_home -->|"configures"| node_custom
node_home -->|"creates game"| node_create
node_home -->|"opens challenge"| node_daily
node_game -->|"uses passages"| node_bible
node_game -->|"finishes rounds"| node_results
node_custom -->|"configures play"| node_game
node_create -->|"shares game"| node_game
node_daily -->|"scores challenge"| node_results
node_home -->|"enters multiplayer"| node_multi
node_multi -->|"offers standings"| node_leaderboards
node_home -->|"opens quests"| node_quest
node_quest -->|"offers activity"| node_academy
node_quest -->|"offers activity"| node_racetrack
node_quest -->|"opens marketplace"| node_market
node_player -->|"customizes"| node_profile
node_auth -->|"reads/writes profiles"| node_firestore
node_auth -->|"merges stats"| node_stats
node_auth -->|"initializes"| node_scrolls
node_stats -->|"reads/writes stats"| node_firestore
node_player -->|"sets preferences"| node_settings
node_player -.->|"uses offline support"| node_offline
node_player -->|"asks for help"| node_chat
node_chat -->|"calls"| node_function
node_function -->|"generates reply"| node_gemini

click node_app "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/app.component.ts"
click node_routing "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/app-routing.module.ts"
click node_home "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/home/home.component.ts"
click node_game "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/game/game.component.ts"
click node_custom "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/custom-settings/custom-settings.component.ts"
click node_create "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/create-game/create-game.component.ts"
click node_daily "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/daily-challenge/daily-challenge.component.ts"
click node_results "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/results/results.component.ts"
click node_bible "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/bible.service.ts"
click node_multi "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/multiplayer/lobby.component.ts"
click node_leaderboards "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/leaderboard/leaderboard.component.ts"
click node_quest "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/quest-mode/quest-mode.component.ts"
click node_academy "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/quest-mode/academy/academy.component.ts"
click node_racetrack "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/quest-mode/racetrack/racetrack.component.ts"
click node_market "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/quest-mode/marketplace.component.ts"
click node_profile "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/profile/profile.component.ts"
click node_auth "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/auth.service.ts"
click node_stats "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/core/stats.service.ts"
click node_scrolls "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/scrolls.service.ts"
click node_settings "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/features/improved-settings/settings.service.ts"
click node_offline "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/features/offline-capabilities/offline-capabilities.service.ts"
click node_chat "https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/chat-bot/chat-bot.component.ts"
click node_function "https://github.com/toosynxed/angularbibleguesser/blob/main/functions/src/index.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_routing,node_home toneBlue
class node_game,node_custom,node_create,node_daily,node_results,node_bible,node_firestore toneAmber
class node_multi,node_leaderboards,node_gemini toneMint
class node_quest,node_academy,node_racetrack,node_market,node_profile toneRose
class node_auth,node_stats,node_scrolls,node_settings,node_offline,node_chat,node_function,node_player toneIndigo
```

## Components

### App entry

- [App shell](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/app.component.ts): `src/app/app.component.ts`
- [App routing](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/app-routing.module.ts): `src/app/app-routing.module.ts`
- [Home and mode choice](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/home/home.component.ts): `src/app/home/home.component.ts`

### Game play

- [Standard game](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/game/game.component.ts): `src/app/game/game.component.ts`
- [Custom games](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/custom-settings/custom-settings.component.ts): `src/app/custom-settings/custom-settings.component.ts`
- [Shared game creation](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/create-game/create-game.component.ts): `src/app/create-game/create-game.component.ts`
- [Daily challenge](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/daily-challenge/daily-challenge.component.ts): `src/app/daily-challenge/daily-challenge.component.ts`
- [Scoring and results](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/results/results.component.ts): `src/app/results/results.component.ts`
- [Passage data](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/bible.service.ts): `src/app/bible.service.ts`

### Social modes

- [Multiplayer lobbies](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/multiplayer/lobby.component.ts): `src/app/multiplayer/lobby.component.ts`
- [Leaderboards](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/leaderboard/leaderboard.component.ts): `src/app/leaderboard/leaderboard.component.ts`

### Profiles and quests

- [Quest activities](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/quest-mode/quest-mode.component.ts): `src/app/quest-mode/quest-mode.component.ts`
- [Video academy](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/quest-mode/academy/academy.component.ts): `src/app/quest-mode/academy/academy.component.ts`
- [Racetrack](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/quest-mode/racetrack/racetrack.component.ts): `src/app/quest-mode/racetrack/racetrack.component.ts`
- [Scroll marketplace](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/quest-mode/marketplace.component.ts): `src/app/quest-mode/marketplace.component.ts`
- [Player profile](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/profile/profile.component.ts): `src/app/profile/profile.component.ts`

### Data and integrations

- [Authentication](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/auth.service.ts): `src/app/auth.service.ts`
- [Stats service](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/core/stats.service.ts): `src/app/core/stats.service.ts`
- [Scrolls service](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/scrolls.service.ts): `src/app/scrolls.service.ts`
- [App settings](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/features/improved-settings/settings.service.ts): `src/app/features/improved-settings/settings.service.ts`
- [Offline capability](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/features/offline-capabilities/offline-capabilities.service.ts): `src/app/features/offline-capabilities/offline-capabilities.service.ts`
- [Game help chat](https://github.com/toosynxed/angularbibleguesser/blob/main/src/app/chat-bot/chat-bot.component.ts): `src/app/chat-bot/chat-bot.component.ts`
- [Chat callable](https://github.com/toosynxed/angularbibleguesser/blob/main/functions/src/index.ts): `functions/src/index.ts`

### Other components

- **Player**
- **Firebase services**
- **Gemini API**

## Connections

- Player → App shell: opens
- App shell → Authentication: ensures sign-in
- App shell → App routing: starts navigation
- App routing → Home and mode choice: dispatches
- Home and mode choice → Standard game: starts play
- Home and mode choice → Custom games: configures
- Home and mode choice → Shared game creation: creates game
- Home and mode choice → Daily challenge: opens challenge
- Standard game → Passage data: uses passages
- Standard game → Scoring and results: finishes rounds
- Custom games → Standard game: configures play
- Shared game creation → Standard game: shares game
- Daily challenge → Scoring and results: scores challenge
- Home and mode choice → Multiplayer lobbies: enters multiplayer
- Multiplayer lobbies → Leaderboards: offers standings
- Home and mode choice → Quest activities: opens quests
- Quest activities → Video academy: offers activity
- Quest activities → Racetrack: offers activity
- Quest activities → Scroll marketplace: opens marketplace
- Player → Player profile: customizes
- Authentication → Firebase services: reads/writes profiles
- Authentication → Stats service: merges stats
- Authentication → Scrolls service: initializes
- Stats service → Firebase services: reads/writes stats
- Player → App settings: sets preferences
- Player → Offline capability: uses offline support
- Player → Game help chat: asks for help
- Game help chat → Chat callable: calls
- Chat callable → Gemini API: generates reply
