feat(web): add network subpages and subdomains listing page

- Add /subdomains page listing all 20 PezkuwiChain subdomains
- Add Back to Home button to Subdomains page
- Create NetworkPage reusable component for network details
- Add 7 network subpages: /mainnet, /staging, /testnet, /beta, /alfa, /development, /local
- Update ChainSpecs network cards to navigate to network subpages
- Add i18n translations for chainSpecs section in en.ts
- Add SDK docs with rebranding support (rebrand-rustdoc.cjs)
- Add generate-docs-structure.cjs for automatic docs generation
- Update shared libs: endpoints, polkadot, wallet, xcm-bridge
- Add new token logos: TYR, ZGR, pezkuwi_icon
- Add new pages: Explorer, Docs, Wallet, Api, Faucet, Developers, Grants, Wiki, Forum, Telemetry
This commit is contained in:
2025-12-11 00:33:47 +03:00
parent 2c6c4f5606
commit 11678fe7cd
976 changed files with 60601 additions and 168 deletions
+44 -8
View File
@@ -42,13 +42,31 @@ export const NETWORK_ENDPOINTS: Record<string, NetworkConfig> = {
description: 'Staging environment for pre-production testing',
},
// Development Testnet
TESTNET: {
name: 'Pezkuwi Testnet',
endpoint: 'https://testnet.pezkuwichain.io',
wsEndpoint: 'wss://testnet.pezkuwichain.io',
// Alfa Testnet
ALFA: {
name: 'Pezkuwi Alfa Testnet',
endpoint: 'https://alfa.pezkuwichain.io',
wsEndpoint: 'wss://alfa.pezkuwichain.io',
type: 'development',
description: 'Development testnet for feature testing',
description: 'Alfa testnet for early feature testing',
},
// Development Environment
DEV: {
name: 'Pezkuwi Development',
endpoint: 'https://dev.pezkuwichain.io',
wsEndpoint: 'wss://dev.pezkuwichain.io',
type: 'development',
description: 'Development environment for feature testing',
},
// Local Development
LOCAL: {
name: 'Local Development',
endpoint: 'http://127.0.0.1:9944',
wsEndpoint: 'ws://127.0.0.1:9944',
type: 'development',
description: 'Local development node',
},
};
@@ -57,8 +75,8 @@ export const NETWORK_ENDPOINTS: Record<string, NetworkConfig> = {
*/
export const DEFAULT_NETWORK =
process.env.NODE_ENV === 'production'
? NETWORK_ENDPOINTS.BETA // Currently using Beta for production
: NETWORK_ENDPOINTS.TESTNET;
? NETWORK_ENDPOINTS.BETA // Currently using Beta for production
: NETWORK_ENDPOINTS.DEV;
/**
* Port Configuration
@@ -98,6 +116,23 @@ export function getAllNetworks(): NetworkConfig[] {
return Object.values(NETWORK_ENDPOINTS);
}
/**
* Get the current network configuration based on the VITE_NETWORK environment variable.
* This serves as the single source of truth for the application's network configuration.
* @returns {NetworkConfig} The active network configuration.
*/
export const getCurrentNetworkConfig = (): NetworkConfig => {
const networkName = (import.meta.env.VITE_NETWORK || 'local').toUpperCase();
const validNetworkKeys = Object.keys(NETWORK_ENDPOINTS);
if (validNetworkKeys.includes(networkName)) {
return NETWORK_ENDPOINTS[networkName as keyof typeof NETWORK_ENDPOINTS];
}
// Fallback to a default or local configuration if the name is invalid
return NETWORK_ENDPOINTS.LOCAL;
};
/**
* Check if endpoint is available
*/
@@ -109,3 +144,4 @@ export async function checkEndpoint(endpoint: string): Promise<boolean> {
return false;
}
}
export const NETWORKS = NETWORK_ENDPOINTS;