1
0
forked from maik/IPFS-portal

fix: bw/stats 404, gateway links, history crash

- swr.ts: remove useBandwidth(), drop bw from useDashboard()
- events/route.ts: skip bandwidth SSE (Kubo 0.28.0 unsupported)
- usage/page.tsx: remove getBWStats call + bw references
- helpers.ts: gatewayLink -> ipfs.maos.dedyn.io (subdomain only)
- upload/page.tsx: fix local gatewayLink (subdomain only)
- storage.ts: update default gatewayUrl, add defensive getHistory()
This commit is contained in:
maikrolf
2026-07-05 16:57:29 +02:00
parent c9432a16ba
commit 99c113b6f5
42 changed files with 10081 additions and 263 deletions
+1
View File
@@ -0,0 +1 @@
{"0": "Portal Layout & Navigation", "1": "Landing & Payment UI", "2": "Payment Smart Contract", "3": "IPFS Gateway & History", "4": "Explorer Components", "5": "NPM Dependencies", "6": "TypeScript Config", "7": "API Routes & Proxy", "8": "File Preview", "9": "Static Server", "10": "Root Layout", "11": "Sidebar Navigation", "12": "Deploy Script", "13": "Next.js Config", "14": "Playwright Config", "15": "PostCSS Config", "16": "E2E Tests"}
+1
View File
@@ -0,0 +1 @@
C:\Users\maik\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\python.exe
+1
View File
@@ -0,0 +1 @@
H:\IPFS-portal
+111
View File
@@ -0,0 +1,111 @@
# Graph Report - . (2026-06-27)
## Corpus Check
- Corpus is ~21,600 words - fits in a single context window. You may not need a graph.
## Summary
- 251 nodes · 401 edges · 17 communities (12 shown, 5 thin omitted)
- Extraction: 100% EXTRACTED · 0% INFERRED · 0% AMBIGUOUS · INFERRED: 2 edges (avg confidence: 0.8)
- Token cost: 0 input · 0 output
## Community Hubs (Navigation)
- [[_COMMUNITY_Portal Layout & Navigation|Portal Layout & Navigation]]
- [[_COMMUNITY_Landing & Payment UI|Landing & Payment UI]]
- [[_COMMUNITY_Payment Smart Contract|Payment Smart Contract]]
- [[_COMMUNITY_IPFS Gateway & History|IPFS Gateway & History]]
- [[_COMMUNITY_Explorer Components|Explorer Components]]
- [[_COMMUNITY_NPM Dependencies|NPM Dependencies]]
- [[_COMMUNITY_TypeScript Config|TypeScript Config]]
- [[_COMMUNITY_API Routes & Proxy|API Routes & Proxy]]
- [[_COMMUNITY_File Preview|File Preview]]
- [[_COMMUNITY_Static Server|Static Server]]
- [[_COMMUNITY_Root Layout|Root Layout]]
- [[_COMMUNITY_Sidebar Navigation|Sidebar Navigation]]
- [[_COMMUNITY_Deploy Script|Deploy Script]]
- [[_COMMUNITY_Next.js Config|Next.js Config]]
## God Nodes (most connected - your core abstractions)
1. `PaymentService` - 31 edges
2. `compilerOptions` - 16 edges
3. `WalletProvider` - 15 edges
4. `apiFetch()` - 12 edges
5. `getInjectedProvider()` - 7 edges
6. `GET()` - 6 edges
7. `formatWeiToETH()` - 6 edges
8. `proxyIPFS()` - 5 edges
9. `POST()` - 5 edges
10. `DELETE()` - 5 edges
## Surprising Connections (you probably didn't know these)
- `AdminPaymentPage()` --calls--> `formatWeiToETH()` [EXTRACTED]
src/app/admin/payment/page.tsx → src/lib/wallet.ts
- `UploadPage()` --calls--> `GatewayLink()` [INFERRED]
src/app/upload/page.tsx → src/app/explorer/components/GatewayLink.tsx
- `PaymentPanel()` --calls--> `formatWeiToETH()` [EXTRACTED]
src/components/PaymentPanel.tsx → src/lib/wallet.ts
- `DirectoryListingProps` --references--> `IPFSEntry` [EXTRACTED]
src/app/explorer/components/DirectoryListing.tsx → src/lib/api.ts
## Import Cycles
- None detected.
## Communities (17 total, 5 thin omitted)
### Community 0 - "Portal Layout & Navigation"
Cohesion: 0.08
Nodes (28): PinBadgeProps, PeerData, PinData, Status, addPin(), apiFetch(), BWStats, checkHealth() (+20 more)
### Community 1 - "Landing & Payment UI"
Cohesion: 0.08
Nodes (30): PaymentPanel(), PaymentPanelProps, TOKEN_ICONS, listUsers(), ERC20_ABI, IPFS_PORTAL_PAYMENT_ABI, MAOSDiscountTier, PriceInfo (+22 more)
### Community 3 - "IPFS Gateway & History"
Cohesion: 0.11
Nodes (21): GatewayLink(), GatewayLinkProps, formatBytes(), HistoryPage(), uploadFile(), addToHistory(), clearHistory(), DEFAULT_SETTINGS (+13 more)
### Community 4 - "Explorer Components"
Cohesion: 0.09
Nodes (13): BreadcrumbSegment, BreadcrumbsProps, CIDInputProps, DirectoryListingProps, FileIconProps, BreadcrumbSegment, ExplorerPage(), ExplorerState (+5 more)
### Community 5 - "NPM Dependencies"
Cohesion: 0.08
Nodes (24): dependencies, clsx, lucide-react, next, postcss, react, react-dom, @tailwindcss/postcss (+16 more)
### Community 6 - "TypeScript Config"
Cohesion: 0.10
Nodes (19): compilerOptions, allowJs, esModuleInterop, incremental, isolatedModules, jsx, lib, module (+11 more)
### Community 7 - "API Routes & Proxy"
Cohesion: 0.44
Nodes (10): DELETE(), GET(), handleHealth(), mapToKuboAPI(), matchRoute(), POST(), proxyIPFS(), proxyResult() (+2 more)
### Community 8 - "File Preview"
Cohesion: 0.38
Nodes (4): detectFileType(), FilePreview(), FilePreviewProps, renderMarkdown()
### Community 9 - "Static Server"
Cohesion: 0.33
Nodes (5): fs, http, MIME, path, ROOT
## Knowledge Gaps
- **79 isolated node(s):** `deploy.sh script`, `nextConfig`, `name`, `version`, `private` (+74 more)
These have ≤1 connection - possible missing edges or undocumented components.
- **5 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
## Suggested Questions
_Questions this graph is uniquely positioned to answer:_
- **Why does `PaymentService` connect `Payment Smart Contract` to `Landing & Payment UI`?**
_High betweenness centrality (0.153) - this node is a cross-community bridge._
- **Why does `http` connect `Static Server` to `Payment Smart Contract`?**
_High betweenness centrality (0.029) - this node is a cross-community bridge._
- **Why does `WalletProvider` connect `Payment Smart Contract` to `Landing & Payment UI`?**
_High betweenness centrality (0.017) - this node is a cross-community bridge._
- **What connects `deploy.sh script`, `nextConfig`, `name` to the rest of the system?**
_79 weakly-connected nodes found - possible documentation gaps or missing edges._
- **Should `Portal Layout & Navigation` be split into smaller, more focused modules?**
_Cohesion score 0.08194905869324474 - nodes in this community are weakly interconnected._
- **Should `Landing & Payment UI` be split into smaller, more focused modules?**
_Cohesion score 0.08305647840531562 - nodes in this community are weakly interconnected._
- **Should `IPFS Gateway & History` be split into smaller, more focused modules?**
_Cohesion score 0.1111111111111111 - nodes in this community are weakly interconnected._
+20
View File
@@ -0,0 +1,20 @@
import json
from pathlib import Path
g = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8'))
nodes = g.get('nodes', [])
edges = g.get('edges', [])
print(f'Nodes: {len(nodes)}, Edges: {len(edges)}')
communities = g.get('communities', g.get('clusters', {}))
if communities:
print(f'Communities: {len(communities)}')
# Show node labels and types
for n in nodes[:40]:
nid = n.get('id', '?')
label = n.get('label', n.get('name', '?'))
ntype = n.get('type', n.get('node_type', '?'))
print(f' {nid}: {label} [{ntype}]')
if len(nodes) > 40:
print(f' ... and {len(nodes)-40} more')
+17
View File
@@ -0,0 +1,17 @@
import json
from pathlib as Path
from collections import Counter
g = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8'))
nodes = g.get('nodes', [])
# Show all unique node labels to understand project structure
types = Counter()
labels = []
for n in nodes:
label = n.get('label', n.get('name', '?'))
labels.append(label)
# Show all labels
for lbl in sorted(labels):
print(lbl)
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"nodes": [{"id": "h_ipfs_portal_deploy_sh", "label": "deploy.sh", "file_type": "code", "source_file": "deploy.sh", "source_location": "L1", "metadata": {"language": "bash", "kind": "file"}}, {"id": "h_ipfs_portal_deploy_sh__entry", "label": "deploy.sh script", "file_type": "code", "source_file": "deploy.sh", "source_location": "L1", "metadata": {"language": "bash", "kind": "bash_entrypoint"}}], "edges": [{"source": "h_ipfs_portal_deploy_sh", "target": "h_ipfs_portal_deploy_sh__entry", "relation": "contains", "confidence": "EXTRACTED", "source_file": "deploy.sh", "source_location": "L1", "weight": 1.0}]}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
{"H:\\IPFS-portal\\deploy.sh":{"size":3276,"mtime_ns":1782335829420010800,"hash":"93155dc8f78a78f135a0687f64636e2bc09b9dd2d7e3f8a3ecf01ddf9aaeba38"},"H:\\IPFS-portal\\package.json":{"size":741,"mtime_ns":1782331693806062100,"hash":"b4d183d0a729b9f4854201b7a3e9a097b30f87d4f5fc666c2e5bebe5f26a3713"},"H:\\IPFS-portal\\tsconfig.json":{"size":768,"mtime_ns":1782305238016408400,"hash":"07d2ec4b6bf62550169c81f9ecd578fd6f3f30c40ae57eb4ee0d57f2dd440ed1"}}
+12
View File
@@ -0,0 +1,12 @@
{
"runs": [
{
"date": "2026-06-27T12:47:45.586275+00:00",
"input_tokens": 0,
"output_tokens": 0,
"files": 37
}
],
"total_input_tokens": 0,
"total_output_tokens": 0
}
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+187
View File
@@ -0,0 +1,187 @@
{
"H:\\IPFS-portal\\deploy.sh": {
"mtime": 1782335829.4200108,
"ast_hash": "c2bab196ff38a17553535fe4f8bbe819",
"semantic_hash": "c2bab196ff38a17553535fe4f8bbe819"
},
"H:\\IPFS-portal\\next.config.ts": {
"mtime": 1782323679.7429354,
"ast_hash": "e4e1a2f09cef4c8973680aada3492e6a",
"semantic_hash": "e4e1a2f09cef4c8973680aada3492e6a"
},
"H:\\IPFS-portal\\package.json": {
"mtime": 1782331693.806062,
"ast_hash": "e27c51334fbc9da00b627bfb435c6f17",
"semantic_hash": "e27c51334fbc9da00b627bfb435c6f17"
},
"H:\\IPFS-portal\\playwright.config.ts": {
"mtime": 1782323985.4343338,
"ast_hash": "6e5fed3d80cb43667faa997526898061",
"semantic_hash": "6e5fed3d80cb43667faa997526898061"
},
"H:\\IPFS-portal\\postcss.config.mjs": {
"mtime": 1782310036.331215,
"ast_hash": "9a944fbda06979be39571bd9bd00b0d9",
"semantic_hash": "9a944fbda06979be39571bd9bd00b0d9"
},
"H:\\IPFS-portal\\serve-static.js": {
"mtime": 1782305384.6641164,
"ast_hash": "bfab69b103dde3ffb47c529b702039c4",
"semantic_hash": "bfab69b103dde3ffb47c529b702039c4"
},
"H:\\IPFS-portal\\src\\app\\admin\\payment\\page.tsx": {
"mtime": 1782329023.8102376,
"ast_hash": "5307f48b701258697597fe94b5556379",
"semantic_hash": "5307f48b701258697597fe94b5556379"
},
"H:\\IPFS-portal\\src\\app\\api\\[...path]\\route.ts": {
"mtime": 1782323547.7908971,
"ast_hash": "f689f8997ccd50c7bf0d288d64658730",
"semantic_hash": "f689f8997ccd50c7bf0d288d64658730"
},
"H:\\IPFS-portal\\src\\app\\api\\payment\\verify\\route.ts": {
"mtime": 1782327091.7359939,
"ast_hash": "5ad06957bde104f5a84f49207516c141",
"semantic_hash": "5ad06957bde104f5a84f49207516c141"
},
"H:\\IPFS-portal\\src\\app\\dashboard\\page.tsx": {
"mtime": 1782323579.6307354,
"ast_hash": "317a7db415a3fe21e9efcd2910a2b571",
"semantic_hash": "317a7db415a3fe21e9efcd2910a2b571"
},
"H:\\IPFS-portal\\src\\app\\explorer\\components\\Breadcrumbs.tsx": {
"mtime": 1782311813.8024487,
"ast_hash": "7a8663d6921b01d4c5c40a4711cb604a",
"semantic_hash": "7a8663d6921b01d4c5c40a4711cb604a"
},
"H:\\IPFS-portal\\src\\app\\explorer\\components\\CIDInput.tsx": {
"mtime": 1782311809.727791,
"ast_hash": "65f143b625b84f2f2e3173e5a501bbc3",
"semantic_hash": "65f143b625b84f2f2e3173e5a501bbc3"
},
"H:\\IPFS-portal\\src\\app\\explorer\\components\\DirectoryListing.tsx": {
"mtime": 1782311847.8061457,
"ast_hash": "6b5535d5f6a9c217c5258cf2237d2d0a",
"semantic_hash": "6b5535d5f6a9c217c5258cf2237d2d0a"
},
"H:\\IPFS-portal\\src\\app\\explorer\\components\\FileIcon.tsx": {
"mtime": 1782311811.8335142,
"ast_hash": "eb56c4a87f86c02072213372fde78c57",
"semantic_hash": "eb56c4a87f86c02072213372fde78c57"
},
"H:\\IPFS-portal\\src\\app\\explorer\\components\\FilePreview.tsx": {
"mtime": 1782311858.0255232,
"ast_hash": "cd32e1869bcc9d2daf246ca28331adf6",
"semantic_hash": "cd32e1869bcc9d2daf246ca28331adf6"
},
"H:\\IPFS-portal\\src\\app\\explorer\\components\\GatewayLink.tsx": {
"mtime": 1782311816.2048059,
"ast_hash": "75c99a0ad5cec3c4a95e9a1b7c629f01",
"semantic_hash": "75c99a0ad5cec3c4a95e9a1b7c629f01"
},
"H:\\IPFS-portal\\src\\app\\explorer\\components\\PinBadge.tsx": {
"mtime": 1782311860.326526,
"ast_hash": "a9cfeed551301ba64baae63ae61af663",
"semantic_hash": "a9cfeed551301ba64baae63ae61af663"
},
"H:\\IPFS-portal\\src\\app\\explorer\\page.tsx": {
"mtime": 1782311882.7185402,
"ast_hash": "54d9d6575bec7bb6d79bdfdd25ed2a91",
"semantic_hash": "54d9d6575bec7bb6d79bdfdd25ed2a91"
},
"H:\\IPFS-portal\\src\\app\\history\\page.tsx": {
"mtime": 1782331561.210468,
"ast_hash": "49dbc35a3ac3741f194a9b669f4a0a22",
"semantic_hash": "49dbc35a3ac3741f194a9b669f4a0a22"
},
"H:\\IPFS-portal\\src\\app\\ipns\\page.tsx": {
"mtime": 1782323444.911427,
"ast_hash": "c1df10e59827567593b103f4d2264cb1",
"semantic_hash": "c1df10e59827567593b103f4d2264cb1"
},
"H:\\IPFS-portal\\src\\app\\layout-portal.tsx": {
"mtime": 1782245653.0417998,
"ast_hash": "d9fc9f177e5a1a6b9b7d3c055a5195d7",
"semantic_hash": "d9fc9f177e5a1a6b9b7d3c055a5195d7"
},
"H:\\IPFS-portal\\src\\app\\layout.tsx": {
"mtime": 1782245634.5082266,
"ast_hash": "5a3014d8d3238f91d605ff08286e614b",
"semantic_hash": "5a3014d8d3238f91d605ff08286e614b"
},
"H:\\IPFS-portal\\src\\app\\page.tsx": {
"mtime": 1782310269.774857,
"ast_hash": "2a7b2f606087627eeb707c544fbf758e",
"semantic_hash": "2a7b2f606087627eeb707c544fbf758e"
},
"H:\\IPFS-portal\\src\\app\\peers\\page.tsx": {
"mtime": 1782245691.6038518,
"ast_hash": "611bdfac279b5c618f8e9463b560661e",
"semantic_hash": "611bdfac279b5c618f8e9463b560661e"
},
"H:\\IPFS-portal\\src\\app\\pins\\page.tsx": {
"mtime": 1782311813.3564186,
"ast_hash": "a5f2b0b8faa633501c87a6bc4750ef9c",
"semantic_hash": "a5f2b0b8faa633501c87a6bc4750ef9c"
},
"H:\\IPFS-portal\\src\\app\\settings\\page.tsx": {
"mtime": 1782335599.9904728,
"ast_hash": "6f75968e308d9c29703232ab04165e8f",
"semantic_hash": "6f75968e308d9c29703232ab04165e8f"
},
"H:\\IPFS-portal\\src\\app\\upload\\page.tsx": {
"mtime": 1782335637.3023176,
"ast_hash": "23a4087203579b7238d395b3f8c48959",
"semantic_hash": "23a4087203579b7238d395b3f8c48959"
},
"H:\\IPFS-portal\\src\\app\\users\\page.tsx": {
"mtime": 1782329529.5074713,
"ast_hash": "1e4c5ee26d4ce72bae3734bed5563ae4",
"semantic_hash": "1e4c5ee26d4ce72bae3734bed5563ae4"
},
"H:\\IPFS-portal\\src\\components\\PaymentPanel.tsx": {
"mtime": 1782325710.1937659,
"ast_hash": "041ebb060c47ebb6b0e6fb5be0ca0f2e",
"semantic_hash": "041ebb060c47ebb6b0e6fb5be0ca0f2e"
},
"H:\\IPFS-portal\\src\\components\\PortalHeader.tsx": {
"mtime": 1782245647.888308,
"ast_hash": "aa2056cf805a28927f51822d2acf1766",
"semantic_hash": "aa2056cf805a28927f51822d2acf1766"
},
"H:\\IPFS-portal\\src\\components\\PortalSidebar.tsx": {
"mtime": 1782331656.858291,
"ast_hash": "d6c679be20bffe1fa35419769c9f7496",
"semantic_hash": "d6c679be20bffe1fa35419769c9f7496"
},
"H:\\IPFS-portal\\src\\lib\\api.ts": {
"mtime": 1782329220.8041124,
"ast_hash": "7a394e3d0aa7f9cd76228bbe83b28137",
"semantic_hash": "7a394e3d0aa7f9cd76228bbe83b28137"
},
"H:\\IPFS-portal\\src\\lib\\payment.ts": {
"mtime": 1782329623.6892607,
"ast_hash": "b90cabcab2fde7b9ac67995822a22c01",
"semantic_hash": "b90cabcab2fde7b9ac67995822a22c01"
},
"H:\\IPFS-portal\\src\\lib\\storage.ts": {
"mtime": 1782331404.7951808,
"ast_hash": "3ad1d14d945bfb9d4febae0cb170ab37",
"semantic_hash": "3ad1d14d945bfb9d4febae0cb170ab37"
},
"H:\\IPFS-portal\\src\\lib\\wallet.ts": {
"mtime": 1782325663.3287177,
"ast_hash": "765b52a55f741e10f2c002d393e191c5",
"semantic_hash": "765b52a55f741e10f2c002d393e191c5"
},
"H:\\IPFS-portal\\tests\\portal.spec.ts": {
"mtime": 1782335736.5423336,
"ast_hash": "b637be3c8e2edfc09f7180a7a0247ebc",
"semantic_hash": "b637be3c8e2edfc09f7180a7a0247ebc"
},
"H:\\IPFS-portal\\tsconfig.json": {
"mtime": 1782305238.0164084,
"ast_hash": "bb6977ff03c7e4d3028e1af49008da2f",
"semantic_hash": "bb6977ff03c7e4d3028e1af49008da2f"
}
}