# nayandas69/np.store architecture

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

- Interactive diagram: https://gitdiagram.com/nayandas69/np.store
- Repository: https://github.com/nayandas69/np.store

## Overview

np.store is a web catalog for projects published by configured accounts across code-hosting and package/extension registries. The expected visitor workflow is to browse catalog listings and open project or repository details. Internally, account configuration is parsed, provider adapters fetch and normalize listings, and a cached catalog combines results. The excerpts confirm those internal calls and sitemap generation; page rendering links are inferred from the route structure, and the README provides no further capability detail.

Main entry points: [`src/lib/providers.ts`](https://github.com/nayandas69/np.store/blob/main/src/lib/providers.ts) (Provider adapters), [`src/lib/catalog.ts`](https://github.com/nayandas69/np.store/blob/main/src/lib/catalog.ts) (Catalog assembly), [`src/components/Catalog.astro`](https://github.com/nayandas69/np.store/blob/main/src/components/Catalog.astro) (Catalog views), [`src/pages/projects/index.astro`](https://github.com/nayandas69/np.store/blob/main/src/pages/projects/index.astro) (Project listings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_landing["Home page<br/>[index.astro]"]
  node_project_listing["Project listings<br/>[index.astro]"]
  node_repository_listing["Repository listings<br/>[index.astro]"]
  node_project_detail["Project details<br/>[&#91;...slug&#93;.astro]"]
  node_repository_detail["Repository details<br/>[&#91;name&#93;.astro]"]
  node_catalog_view["Catalog views<br/>[Catalog.astro]"]
  node_detail_view["Detail view<br/>[Detail.astro]"]
  node_project_card["Project card<br/>[ProjectCard.astro]"]
  node_other_pages["Info and status pages"]
end

subgraph group_catalog["Catalog runtime"]
  node_account_parser["Account parsing<br/>[accounts.ts]"]
  node_catalog_assembly["Catalog assembly<br/>[catalog.ts]"]
  node_catalog_cache["Cached results<br/>[cache.ts]"]
  node_project_types["Project model<br/>[types.ts]"]
end

subgraph group_providers["Provider integrations"]
  node_provider_adapters["Provider adapters<br/>[providers.ts]"]
end

subgraph group_ops["Request support"]
  node_middleware["Request middleware<br/>[middleware.ts]"]
  node_sitemap["Sitemap endpoint<br/>[sitemap.xml.ts]"]
  node_robots["Robots endpoint<br/>[robots.txt.ts]"]
end

node_visitor(("Visitor"))
node_github["GitHub API"]
node_vscode["VS Code Marketplace"]
node_edge["Edge Add-ons"]
node_npm["npm registry"]
node_crates["crates.io"]
node_pypi["PyPI"]

node_visitor -.->|"opens"| node_landing
node_visitor -.->|"browses"| node_project_listing
node_visitor -.->|"browses"| node_repository_listing
node_visitor -.->|"opens"| node_project_detail
node_visitor -.->|"opens"| node_repository_detail
node_account_parser -->|"provides accounts"| node_catalog_assembly
node_catalog_assembly -->|"loads listings"| node_provider_adapters
node_catalog_assembly -->|"creates catalog"| node_catalog_cache
node_catalog_assembly -->|"builds paths"| node_project_types
node_catalog_cache -->|"uses provider errors"| node_provider_adapters
node_provider_adapters -->|"fetches listings"| node_github
node_provider_adapters -->|"fetches listings"| node_vscode
node_provider_adapters -->|"fetches listings"| node_edge
node_provider_adapters -->|"fetches listings"| node_npm
node_provider_adapters -->|"fetches listings"| node_crates
node_provider_adapters -->|"fetches listings"| node_pypi
node_project_listing -.->|"renders"| node_catalog_view
node_repository_listing -.->|"renders"| node_catalog_view
node_project_detail -.->|"renders"| node_detail_view
node_repository_detail -.->|"renders"| node_detail_view
node_catalog_view -.->|"displays"| node_project_card
node_sitemap -->|"gets projects"| node_catalog_assembly

click node_landing "https://github.com/nayandas69/np.store/blob/main/src/pages/index.astro"
click node_project_listing "https://github.com/nayandas69/np.store/blob/main/src/pages/projects/index.astro"
click node_repository_listing "https://github.com/nayandas69/np.store/blob/main/src/pages/repositories/index.astro"
click node_project_detail "https://github.com/nayandas69/np.store/blob/main/src/pages/projects/%5Bsource%5D/%5Bowner%5D/%5B...slug%5D.astro"
click node_repository_detail "https://github.com/nayandas69/np.store/blob/main/src/pages/repositories/%5Bowner%5D/%5Bname%5D.astro"
click node_catalog_view "https://github.com/nayandas69/np.store/blob/main/src/components/Catalog.astro"
click node_detail_view "https://github.com/nayandas69/np.store/blob/main/src/components/Detail.astro"
click node_project_card "https://github.com/nayandas69/np.store/blob/main/src/components/ProjectCard.astro"
click node_other_pages "https://github.com/nayandas69/np.store/tree/main/src/pages"
click node_account_parser "https://github.com/nayandas69/np.store/blob/main/src/lib/accounts.ts"
click node_catalog_assembly "https://github.com/nayandas69/np.store/blob/main/src/lib/catalog.ts"
click node_catalog_cache "https://github.com/nayandas69/np.store/blob/main/src/lib/cache.ts"
click node_project_types "https://github.com/nayandas69/np.store/blob/main/src/lib/types.ts"
click node_provider_adapters "https://github.com/nayandas69/np.store/blob/main/src/lib/providers.ts"
click node_middleware "https://github.com/nayandas69/np.store/blob/main/src/middleware.ts"
click node_sitemap "https://github.com/nayandas69/np.store/blob/main/src/pages/sitemap.xml.ts"
click node_robots "https://github.com/nayandas69/np.store/blob/main/src/pages/robots.txt.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_landing,node_project_listing,node_repository_listing,node_project_detail,node_repository_detail,node_catalog_view,node_detail_view,node_project_card,node_other_pages toneBlue
class node_account_parser,node_catalog_assembly,node_catalog_cache,node_project_types toneAmber
class node_provider_adapters,node_github toneMint
class node_middleware,node_sitemap,node_robots toneRose
class node_visitor,node_vscode,node_edge,node_npm,node_crates,node_pypi toneIndigo
```

## Components

### Web experience

- [Home page](https://github.com/nayandas69/np.store/blob/main/src/pages/index.astro): `src/pages/index.astro`
- [Project listings](https://github.com/nayandas69/np.store/blob/main/src/pages/projects/index.astro): `src/pages/projects/index.astro`
- [Repository listings](https://github.com/nayandas69/np.store/blob/main/src/pages/repositories/index.astro): `src/pages/repositories/index.astro`
- [Project details](https://github.com/nayandas69/np.store/blob/main/src/pages/projects/%5Bsource%5D/%5Bowner%5D/%5B...slug%5D.astro): `src/pages/projects/[source]/[owner]/[...slug].astro`
- [Repository details](https://github.com/nayandas69/np.store/blob/main/src/pages/repositories/%5Bowner%5D/%5Bname%5D.astro): `src/pages/repositories/[owner]/[name].astro`
- [Catalog views](https://github.com/nayandas69/np.store/blob/main/src/components/Catalog.astro): `src/components/Catalog.astro`
- [Detail view](https://github.com/nayandas69/np.store/blob/main/src/components/Detail.astro): `src/components/Detail.astro`
- [Project card](https://github.com/nayandas69/np.store/blob/main/src/components/ProjectCard.astro): `src/components/ProjectCard.astro`
- [Info and status pages](https://github.com/nayandas69/np.store/tree/main/src/pages): `src/pages`

### Catalog runtime

- [Account parsing](https://github.com/nayandas69/np.store/blob/main/src/lib/accounts.ts): `src/lib/accounts.ts`
- [Catalog assembly](https://github.com/nayandas69/np.store/blob/main/src/lib/catalog.ts): `src/lib/catalog.ts`
- [Cached results](https://github.com/nayandas69/np.store/blob/main/src/lib/cache.ts): `src/lib/cache.ts`
- [Project model](https://github.com/nayandas69/np.store/blob/main/src/lib/types.ts): `src/lib/types.ts`

### Provider integrations

- [Provider adapters](https://github.com/nayandas69/np.store/blob/main/src/lib/providers.ts): `src/lib/providers.ts`

### Request support

- [Request middleware](https://github.com/nayandas69/np.store/blob/main/src/middleware.ts): `src/middleware.ts`
- [Sitemap endpoint](https://github.com/nayandas69/np.store/blob/main/src/pages/sitemap.xml.ts): `src/pages/sitemap.xml.ts`
- [Robots endpoint](https://github.com/nayandas69/np.store/blob/main/src/pages/robots.txt.ts): `src/pages/robots.txt.ts`

### Other components

- **Visitor**
- **GitHub API**
- **VS Code Marketplace**
- **Edge Add-ons**
- **npm registry**
- **crates.io**
- **PyPI**

## Connections

- Visitor → Home page: opens
- Visitor → Project listings: browses
- Visitor → Repository listings: browses
- Visitor → Project details: opens
- Visitor → Repository details: opens
- Account parsing → Catalog assembly: provides accounts (evidence: `src/lib/catalog.ts`)
- Catalog assembly → Provider adapters: loads listings (evidence: `src/lib/catalog.ts`)
- Catalog assembly → Cached results: creates catalog (evidence: `src/lib/catalog.ts`)
- Catalog assembly → Project model: builds paths (evidence: `src/pages/sitemap.xml.ts`)
- Cached results → Provider adapters: uses provider errors (evidence: `src/lib/cache.ts`)
- Provider adapters → GitHub API: fetches listings (evidence: `src/lib/providers.ts`)
- Provider adapters → VS Code Marketplace: fetches listings (evidence: `src/lib/providers.ts`)
- Provider adapters → Edge Add-ons: fetches listings (evidence: `src/lib/providers.ts`)
- Provider adapters → npm registry: fetches listings (evidence: `src/lib/providers.ts`)
- Provider adapters → crates.io: fetches listings (evidence: `src/lib/providers.ts`)
- Provider adapters → PyPI: fetches listings (evidence: `src/lib/providers.ts`)
- Project listings → Catalog views: renders
- Repository listings → Catalog views: renders
- Project details → Detail view: renders
- Repository details → Detail view: renders
- Catalog views → Project card: displays
- Sitemap endpoint → Catalog assembly: gets projects (evidence: `src/pages/sitemap.xml.ts`)
