Reorganize repository into monorepo structure

Restructured the project to support multiple frontend applications:
- Move web app to web/ directory
- Create pezkuwi-sdk-ui/ for Polkadot SDK clone (planned)
- Create mobile/ directory for mobile app development
- Add shared/ directory with common utilities, types, and blockchain code
- Update README.md with comprehensive documentation
- Remove obsolete DKSweb/ directory

This monorepo structure enables better code sharing and organized
development across web, mobile, and SDK UI projects.
This commit is contained in:
Claude
2025-11-14 00:46:35 +00:00
parent bb3d9aeb29
commit c48ded7ff2
206 changed files with 502 additions and 4 deletions
@@ -1,3 +0,0 @@
{
"type": "module"
}
+208 -1
View File
@@ -1 +1,208 @@
# DKSweb
# Pezkuwi Web App Projects
Unified repository for all Pezkuwi blockchain frontend applications and shared resources.
## 🏗️ Project Structure
```
pezkuwi-web-app-projects/
├── web/ # Main web application
├── pezkuwi-sdk-ui/ # Polkadot SDK UI (branded clone)
├── mobile/ # Mobile application
├── shared/ # Shared code and utilities
└── README.md # This file
```
## 📁 Directories
### 1. `web/` - Main Web Application
**Status:** ✅ ~90% Complete - Production Ready
The primary web interface for Pezkuwi blockchain at [pezkuwichain.app](https://pezkuwichain.app)
**Tech Stack:**
- React 18 + TypeScript
- Vite build tool
- Polkadot.js API
- Supabase (Auth & Database)
- Tailwind CSS + shadcn/ui
- i18next (Multi-language support)
**Features:**
- ✅ Wallet integration (Polkadot.js extension)
- ✅ Live blockchain data
- ✅ Staking dashboard
- ✅ DEX/Swap interface
- ✅ Transaction history
- ✅ Multi-language support (EN, TR, KMR, CKB, AR, FA)
- ⏳ Governance dropdown (pending - live blockchain integration)
**Get Started:**
```bash
cd web
npm install
npm run dev
```
### 2. `pezkuwi-sdk-ui/` - Polkadot SDK UI Clone
**Status:** 🚧 Planned - Not Yet Implemented
Branded version of Polkadot.js Apps for Pezkuwi blockchain.
**Purpose:**
- Provide comprehensive blockchain explorer
- Offer advanced developer tools
- Enable direct chain interaction
- Serve as official SDK interface
**Planned Implementation:**
1. Clone Polkadot.js Apps repository
2. Apply Pezkuwi branding
3. Configure chain endpoints
4. Deploy to pezkuwichain.app/sdk
**Resources:**
- See `pezkuwi-sdk-ui/README.md` for details
### 3. `mobile/` - Mobile Application
**Status:** 🚧 In Development - Early Stage (~15% Complete)
Native mobile app for iOS and Android.
**Current Progress:**
- ✅ Welcome screen with language selection
- ✅ Human verification flow
- ✅ Authentication (Sign In/Up)
- ✅ Main dashboard navigation
- ⏳ Wallet integration
- ⏳ Full feature parity with web
**Technology:** TBD (React Native / Flutter / Ionic)
**Get Started:**
- See `mobile/README.md` for current status and plans
### 4. `shared/` - Shared Code
**Status:** ✅ Foundation Ready
Common code, types, and utilities used across all platforms.
**Structure:**
```
shared/
├── types/ # TypeScript type definitions
├── utils/ # Helper functions (formatting, validation)
├── blockchain/ # Blockchain utilities (Polkadot API wrappers)
└── constants/ # App constants and configuration
```
**Usage:**
```typescript
// In web or mobile projects
import { formatAddress } from '../shared/utils';
import { PEZKUWI_NETWORK } from '../shared/blockchain';
import type { WalletAccount } from '../shared/types';
```
## 🎯 Development Roadmap
### Phase 1: Project Organization ✅
- [x] Reorganize repository structure
- [x] Create shared utilities foundation
- [x] Set up placeholder directories
### Phase 2: Polkadot SDK UI (Next)
- [ ] Clone and configure Polkadot.js Apps
- [ ] Apply Pezkuwi branding
- [ ] Set up deployment pipeline
- [ ] Integrate with main web app
### Phase 3: Web App Completion
- [ ] Implement governance dropdown with live data
- [ ] Complete blockchain data integration
- [ ] Production optimization
- [ ] Security audit
### Phase 4: Mobile Development
- [ ] Choose technology stack
- [ ] Implement wallet integration
- [ ] Achieve feature parity with web
- [ ] Beta testing and release
## 🚀 Quick Start
### Prerequisites
- Node.js 18+
- npm or yarn
- Git
### Clone Repository
```bash
git clone https://github.com/pezkuwichain/pezkuwi-web-app-projects.git
cd pezkuwi-web-app-projects
```
### Run Web App
```bash
cd web
npm install
npm run dev
```
### Build for Production
```bash
cd web
npm run build
```
## 🌐 Multi-Language Support
All applications support:
- 🇬🇧 English (EN)
- 🇹🇷 Türkçe (TR)
- Kurdistan Kurdish - Kurmanji (KMR)
- Kurdistan Kurdish - Sorani (CKB)
- 🇸🇦 العربية (AR)
- 🇮🇷 فارسی (FA)
## 📝 Documentation
- **Web App:** See `web/README.md` and inline documentation
- **SDK UI:** See `pezkuwi-sdk-ui/README.md`
- **Mobile:** See `mobile/README.md`
- **Shared Code:** See `shared/README.md`
- **Architecture:** See `web/mimari.txt` for detailed system architecture
## 🔐 Security
Security is our top priority. See `web/SECURITY.md` for:
- Security policies
- Vulnerability reporting
- Multi-signature wallet setup
- Best practices
## 📄 License
See [LICENSE](./LICENSE) file for details.
## 🤝 Contributing
We welcome contributions! Please:
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Submit a pull request
## 📞 Support
- **Website:** [pezkuwichain.app](https://pezkuwichain.app)
- **Issues:** GitHub Issues
- **Documentation:** Project README files
---
**Note:** This is a monorepo structure designed for production-level deployment of Pezkuwi blockchain applications across multiple platforms.
+50
View File
@@ -0,0 +1,50 @@
# Pezkuwi Mobile App
**Status:** 🚧 In Development - Early Stage
Mobile application for Pezkuwi blockchain.
## Current Progress
- ✅ Welcome page with language selection
- ✅ Human verification page
- ✅ Sign in / Sign up pages
- ✅ Main dashboard top navigation
- ⏳ Wallet page (pending - needs Polkadot.js integration)
- ⏳ Additional features
## Technology Stack
**To be determined:**
- React Native
- Flutter
- Ionic/Capacitor
## Planned Features
### Core Functionality
- Wallet management with Polkadot.js extension integration
- Real-time blockchain data (similar to web app)
- Multi-language support (EN, TR, KMR, CKB, AR, FA)
- Biometric authentication
- Push notifications
### Pages/Screens
- Welcome & Language Selection ✅
- Human Verification ✅
- Authentication (Sign In/Up) ✅
- Main Dashboard ✅
- Wallet (Connect to Polkadot.js) ⏳
- Staking
- Governance
- DEX/Swap
- Transaction History
- Settings & Profile
## Development Guidelines
- Use shared code from `../shared/` directory
- Maintain consistency with web app UX
- Follow mobile-first design principles
- Implement proper error handling
- Add comprehensive logging
+26
View File
@@ -0,0 +1,26 @@
# Pezkuwi SDK UI
**Status:** 🚧 Planned - Not yet implemented
This directory will contain the Polkadot SDK UI clone, branded for Pezkuwi.
## Planned Features
- Frontend and backend interface based on Polkadot SDK
- Full branding for Pezkuwichain
- Integration with pezkuwichain.app
- Comprehensive blockchain explorer and interaction tools
## Implementation Plan
1. Clone the official Polkadot.js Apps repository
2. Customize branding (logos, colors, naming)
3. Configure for Pezkuwi blockchain endpoint
4. Add custom features specific to Pezkuwi
5. Deploy to pezkuwichain.app
## Resources
- [Polkadot.js Apps](https://github.com/polkadot-js/apps)
- [Substrate Front-end Template](https://github.com/substrate-developer-hub/substrate-front-end-template)
- Pezkuwi Chain Specs: `../web/src/components/ChainSpecs.tsx`
+30
View File
@@ -0,0 +1,30 @@
# Shared Code
This directory contains code shared between web and mobile applications.
## Structure
- **types/** - TypeScript type definitions and interfaces
- **utils/** - Utility functions and helpers
- **blockchain/** - Blockchain-related utilities (Polkadot API wrappers, transaction helpers)
- **constants/** - Shared constants and configuration values
## Usage
Import shared code in your projects:
```typescript
// Web project
import { SomeType } from '../shared/types';
import { someUtil } from '../shared/utils';
// Mobile project
import { SomeType } from '../shared/types';
```
## Guidelines
- Keep code framework-agnostic when possible
- Add comprehensive JSDoc comments
- Write unit tests for utilities
- Avoid platform-specific dependencies
+10
View File
@@ -0,0 +1,10 @@
/**
* Blockchain utilities and helpers
*
* This module provides common blockchain interaction utilities
* that can be used across web and mobile applications.
*/
export * from './polkadot';
// Add more blockchain utility exports as needed
+32
View File
@@ -0,0 +1,32 @@
/**
* Polkadot/Substrate blockchain utilities
*/
import type { BlockchainNetwork } from '../types/blockchain';
/**
* Pezkuwi blockchain network configuration
*/
export const PEZKUWI_NETWORK: BlockchainNetwork = {
name: 'Pezkuwi',
endpoint: 'wss://pezkuwichain.app:9944',
chainId: 'pezkuwi',
};
/**
* Common blockchain endpoints
*/
export const BLOCKCHAIN_ENDPOINTS = {
pezkuwi: 'wss://pezkuwichain.app:9944',
local: 'ws://127.0.0.1:9944',
} as const;
/**
* Get block explorer URL for a transaction
* @param txHash - Transaction hash
* @returns Block explorer URL
*/
export function getExplorerUrl(txHash: string): string {
// Update with your actual block explorer URL
return `https://explorer.pezkuwichain.app/tx/${txHash}`;
}
+34
View File
@@ -0,0 +1,34 @@
/**
* Shared constants for Pezkuwi Web App Projects
*/
/**
* Application version
*/
export const APP_VERSION = '1.0.0';
/**
* Supported languages
*/
export const SUPPORTED_LANGUAGES = [
{ code: 'en', name: 'English' },
{ code: 'tr', name: 'Türkçe' },
{ code: 'kmr', name: 'Kurdî' },
{ code: 'ckb', name: 'سۆرانی' },
{ code: 'ar', name: 'العربية' },
{ code: 'fa', name: 'فارسی' },
] as const;
/**
* Default language
*/
export const DEFAULT_LANGUAGE = 'en';
/**
* API timeouts (in milliseconds)
*/
export const TIMEOUTS = {
API_REQUEST: 30000,
BLOCKCHAIN_QUERY: 60000,
TRANSACTION: 120000,
} as const;
+26
View File
@@ -0,0 +1,26 @@
/**
* Blockchain-related type definitions
*/
export interface WalletAccount {
address: string;
name?: string;
source?: string;
}
export interface BlockchainNetwork {
name: string;
endpoint: string;
chainId?: string;
}
export interface Transaction {
hash: string;
from: string;
to: string;
amount: string;
timestamp: number;
status: 'pending' | 'success' | 'failed';
}
// Add more blockchain types as needed
+11
View File
@@ -0,0 +1,11 @@
/**
* Shared TypeScript types for Pezkuwi Web App Projects
*
* This file contains common type definitions used across
* web and mobile applications.
*/
// Export blockchain-related types here
export * from './blockchain';
// Add more type exports as needed
+39
View File
@@ -0,0 +1,39 @@
/**
* Formatting utilities
*/
/**
* Format a blockchain address for display
* @param address - Full blockchain address
* @param chars - Number of characters to show at start and end
* @returns Formatted address (e.g., "0x1234...5678")
*/
export function formatAddress(address: string, chars = 4): string {
if (!address) return '';
if (address.length <= chars * 2) return address;
return `${address.slice(0, chars)}...${address.slice(-chars)}`;
}
/**
* Format a number with thousand separators
* @param value - Number to format
* @param decimals - Number of decimal places
* @returns Formatted number string
*/
export function formatNumber(value: number, decimals = 2): string {
return new Intl.NumberFormat('en-US', {
minimumFractionDigits: decimals,
maximumFractionDigits: decimals,
}).format(value);
}
/**
* Format a token amount with proper decimals
* @param amount - Amount in smallest unit
* @param decimals - Token decimals (e.g., 18 for most tokens)
* @returns Formatted token amount
*/
export function formatTokenAmount(amount: string | number, decimals = 18): string {
const value = typeof amount === 'string' ? parseFloat(amount) : amount;
return formatNumber(value / Math.pow(10, decimals), 4);
}
+8
View File
@@ -0,0 +1,8 @@
/**
* Shared utility functions for Pezkuwi Web App Projects
*/
export * from './formatting';
export * from './validation';
// Add more utility exports as needed
+28
View File
@@ -0,0 +1,28 @@
/**
* Validation utilities
*/
/**
* Validate if a string is a valid blockchain address
* @param address - Address to validate
* @returns True if valid, false otherwise
*/
export function isValidAddress(address: string): boolean {
// Basic validation - extend based on your blockchain requirements
if (!address) return false;
// Substrate/Polkadot addresses typically start with specific characters
// and have a specific length
return address.length >= 47 && address.length <= 48;
}
/**
* Validate if a string is a valid amount
* @param amount - Amount to validate
* @returns True if valid, false otherwise
*/
export function isValidAmount(amount: string): boolean {
if (!amount) return false;
const num = parseFloat(amount);
return !isNaN(num) && num > 0;
}
View File
View File
View File
View File
View File
View File

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 148 KiB

Before

Width:  |  Height:  |  Size: 178 KiB

After

Width:  |  Height:  |  Size: 178 KiB

Before

Width:  |  Height:  |  Size: 609 KiB

After

Width:  |  Height:  |  Size: 609 KiB

View File
View File

Some files were not shown because too many files have changed in this diff Show More