# zeinab818/afaq-explore-the-universe- architecture

> Architecture diagram of the GitHub repository zeinab818/afaq-explore-the-universe-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zeinab818/afaq-explore-the-universe-
- Repository: https://github.com/zeinab818/afaq-explore-the-universe-

## Overview

Āfāq is an interactive astronomy platform. Visitors explore solar-system and deep-space topics, follow missions and astronomical events, access live space information and research, and can save discoveries locally. The homepage composition, solar calculations, constellation data, and selected API integrations are supported by sampled source; other feature branches reflect README descriptions and repository routes. Several unsampled subsystems are represented at their existing route or feature paths, so their internal calls are not inferred.

Main entry points: [`app/(pages)/api`](https://github.com/zeinab818/afaq-explore-the-universe-/tree/master/app/(pages)/api) (Space Data APIs), [`app/page.tsx`](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/page.tsx) (Home Experience), [`components/ui/Sections/CosmicOverview/CosmicOverview.tsx`](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/components/ui/Sections/CosmicOverview/CosmicOverview.tsx) (Cosmic Overview), [`components/discover/constellations/ConstellationsExplorer.tsx`](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/components/discover/constellations/ConstellationsExplorer.tsx) (Constellation Explorer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_explore["Cosmic Exploration"]
  node_home["Home Experience<br/>[page.tsx]"]
  node_hero["Hero<br/>[page.tsx]"]
  node_overview["Cosmic Overview<br/>[CosmicOverview.tsx]"]
  node_solar["Solar System"]
  node_deep["Deep Space<br/>[page.tsx]"]
  node_constellations["Constellation Explorer"]
  node_constellationdata["Constellation Data<br/>[constellations.ts]"]
  node_missions["Mission Explorer"]
  node_events["Astronomy Events<br/>[page.tsx]"]
end

subgraph group_learn["Learning Content"]
  node_research["Research<br/>[page.tsx]"]
  node_quran["Space &amp; Quran<br/>[page.tsx]"]
  node_contentdata["Topic Datasets"]
end

subgraph group_live["Live Astronomy"]
  node_live["Live Space<br/>[page.tsx]"]
end

subgraph group_services["Data Services"]
  node_api["Space Data APIs"]
  node_moonapi["Moon Calendar API<br/>[route.ts]"]
  node_sunapi["Sun Position API<br/>[route.ts]"]
  node_suntimes["Sun Times API<br/>[route.ts]"]
  node_solarcalc["Solar Calculations"]
  node_apod["Picture of Day API<br/>[route.ts]"]
  node_nasa["NASA APOD Service"]
  node_planetapi["Planet Data API<br/>[route.ts]"]
  node_ninjas["API Ninjas"]
end

subgraph group_state["Saved Exploration"]
  node_saved["Saved Items<br/>[storage.ts]"]
  node_localstorage[("Browser Local Storage")]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_home
node_home -->|"renders"| node_hero
node_home -->|"renders"| node_overview
node_overview -->|"uses data"| node_contentdata
node_visitor -->|"explores"| node_solar
node_visitor -->|"explores"| node_deep
node_visitor -->|"explores"| node_constellations
node_constellations -->|"reads"| node_constellationdata
node_visitor -->|"explores"| node_missions
node_visitor -->|"explores"| node_events
node_visitor -->|"explores"| node_research
node_visitor -->|"explores"| node_quran
node_quran -.->|"presents verses"| node_contentdata
node_visitor -->|"accesses"| node_live
node_live -.->|"accesses data"| node_api
node_api -->|"exposes"| node_moonapi
node_api -->|"exposes"| node_sunapi
node_api -->|"exposes"| node_suntimes
node_sunapi -->|"calculates with"| node_solarcalc
node_suntimes -->|"calculates with"| node_solarcalc
node_api -->|"exposes"| node_apod
node_apod -->|"fetches from"| node_nasa
node_api -->|"exposes"| node_planetapi
node_planetapi -->|"fetches from"| node_ninjas
node_visitor -->|"saves discoveries"| node_saved
node_saved -->|"reads and writes"| node_localstorage

click node_home "https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/page.tsx"
click node_hero "https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/hero/page.tsx"
click node_overview "https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/components/ui/Sections/CosmicOverview/CosmicOverview.tsx"
click node_solar "https://github.com/zeinab818/afaq-explore-the-universe-/tree/master/app/(pages)/solarSystem"
click node_deep "https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/galaxies/page.tsx"
click node_constellations "https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/components/discover/constellations/ConstellationsExplorer.tsx"
click node_constellationdata "https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/lib/astronomy/constellations.ts"
click node_missions "https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/missions/MissionExplorer.tsx"
click node_events "https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/events/page.tsx"
click node_research "https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/research/page.tsx"
click node_quran "https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/quran/page.tsx"
click node_contentdata "https://github.com/zeinab818/afaq-explore-the-universe-/tree/master/data"
click node_live "https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/live/page.tsx"
click node_api "https://github.com/zeinab818/afaq-explore-the-universe-/tree/master/app/(pages)/api"
click node_moonapi "https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/api/moon/route.ts"
click node_sunapi "https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/api/sun/route.ts"
click node_suntimes "https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/api/sun-times/route.ts"
click node_solarcalc "https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/lib/solar/solar-calculations.ts"
click node_apod "https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/api/picOfDay/route.ts"
click node_planetapi "https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/api/planets/route.ts"
click node_saved "https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/lib/exploration/storage.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_home,node_hero,node_overview,node_solar,node_deep,node_constellations,node_constellationdata,node_missions,node_events toneBlue
class node_research,node_quran,node_contentdata toneAmber
class node_live toneMint
class node_api,node_moonapi,node_sunapi,node_suntimes,node_solarcalc,node_apod,node_nasa,node_planetapi,node_ninjas toneRose
class node_saved,node_localstorage,node_visitor toneIndigo
```

## Components

### Cosmic Exploration

- [Home Experience](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/page.tsx): `app/page.tsx`
- [Hero](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/hero/page.tsx): `app/(pages)/hero/page.tsx`
- [Cosmic Overview](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/components/ui/Sections/CosmicOverview/CosmicOverview.tsx): `components/ui/Sections/CosmicOverview/CosmicOverview.tsx`
- [Solar System](https://github.com/zeinab818/afaq-explore-the-universe-/tree/master/app/(pages)/solarSystem): `app/(pages)/solarSystem`
- [Deep Space](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/galaxies/page.tsx): `app/(pages)/galaxies/page.tsx`
- [Constellation Explorer](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/components/discover/constellations/ConstellationsExplorer.tsx): `components/discover/constellations/ConstellationsExplorer.tsx`
- [Constellation Data](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/lib/astronomy/constellations.ts): `lib/astronomy/constellations.ts`
- [Mission Explorer](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/missions/MissionExplorer.tsx): `app/(pages)/missions/MissionExplorer.tsx`
- [Astronomy Events](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/events/page.tsx): `app/(pages)/events/page.tsx`

### Learning Content

- [Research](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/research/page.tsx): `app/(pages)/research/page.tsx`
- [Space & Quran](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/quran/page.tsx): `app/(pages)/quran/page.tsx`
- [Topic Datasets](https://github.com/zeinab818/afaq-explore-the-universe-/tree/master/data): `data`

### Live Astronomy

- [Live Space](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/live/page.tsx): `app/(pages)/live/page.tsx`

### Data Services

- [Space Data APIs](https://github.com/zeinab818/afaq-explore-the-universe-/tree/master/app/(pages)/api): `app/(pages)/api`
- [Moon Calendar API](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/api/moon/route.ts): `app/(pages)/api/moon/route.ts`
- [Sun Position API](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/api/sun/route.ts): `app/(pages)/api/sun/route.ts`
- [Sun Times API](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/api/sun-times/route.ts): `app/(pages)/api/sun-times/route.ts`
- [Solar Calculations](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/lib/solar/solar-calculations.ts): `lib/solar/solar-calculations.ts`
- [Picture of Day API](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/api/picOfDay/route.ts): `app/(pages)/api/picOfDay/route.ts`
- **NASA APOD Service**
- [Planet Data API](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/app/(pages)/api/planets/route.ts): `app/(pages)/api/planets/route.ts`
- **API Ninjas**

### Saved Exploration

- [Saved Items](https://github.com/zeinab818/afaq-explore-the-universe-/blob/master/lib/exploration/storage.ts): `lib/exploration/storage.ts`
- **Browser Local Storage**

### Other components

- **Visitor**

## Connections

- Visitor → Home Experience: opens (evidence: `README.md`)
- Home Experience → Hero: renders (evidence: `app/page.tsx`)
- Home Experience → Cosmic Overview: renders (evidence: `app/page.tsx`)
- Cosmic Overview → Topic Datasets: uses data (evidence: `components/ui/Sections/CosmicOverview/CosmicOverview.tsx`)
- Visitor → Solar System: explores (evidence: `README.md`)
- Visitor → Deep Space: explores (evidence: `README.md`)
- Visitor → Constellation Explorer: explores (evidence: `README.md`)
- Constellation Explorer → Constellation Data: reads (evidence: `components/discover/constellations/ConstellationsExplorer.tsx`)
- Visitor → Mission Explorer: explores (evidence: `README.md`)
- Visitor → Astronomy Events: explores (evidence: `README.md`)
- Visitor → Research: explores (evidence: `README.md`)
- Visitor → Space & Quran: explores (evidence: `README.md`)
- Space & Quran → Topic Datasets: presents verses
- Visitor → Live Space: accesses (evidence: `README.md`)
- Live Space → Space Data APIs: accesses data
- Space Data APIs → Moon Calendar API: exposes (evidence: `README.md`)
- Space Data APIs → Sun Position API: exposes (evidence: `README.md`)
- Space Data APIs → Sun Times API: exposes (evidence: `README.md`)
- Sun Position API → Solar Calculations: calculates with (evidence: `app/(pages)/api/sun/route.ts`)
- Sun Times API → Solar Calculations: calculates with (evidence: `app/(pages)/api/sun-times/route.ts`)
- Space Data APIs → Picture of Day API: exposes (evidence: `README.md`)
- Picture of Day API → NASA APOD Service: fetches from (evidence: `app/(pages)/api/picOfDay/route.ts`)
- Space Data APIs → Planet Data API: exposes (evidence: `README.md`)
- Planet Data API → API Ninjas: fetches from (evidence: `app/(pages)/api/planets/route.ts`)
- Visitor → Saved Items: saves discoveries (evidence: `README.md`)
- Saved Items → Browser Local Storage: reads and writes (evidence: `lib/exploration/storage.ts`)
