mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-21 23:47:56 +00:00
docs: Update README for new project structure
This commit is contained in:
@@ -1,251 +1,175 @@
|
|||||||
# Pezkuwi Web App Projects
|
# Pezkuwi Web App Projects (PWAP)
|
||||||
|
|
||||||
Unified repository for all Pezkuwi blockchain frontend applications and shared resources.
|
Monorepo for Pezkuwi blockchain frontend applications.
|
||||||
|
|
||||||
## 🏗️ Project Structure
|
## Project Structure
|
||||||
|
|
||||||
```
|
```
|
||||||
pezkuwi-web-app-projects/
|
pwap/
|
||||||
├── web/ # Main web application
|
├── web/ # Main web application
|
||||||
├── pezkuwi-sdk-ui/ # Polkadot SDK UI (branded clone)
|
├── mobile/ # Mobile application (React Native + Expo)
|
||||||
├── mobile/ # Mobile application
|
├── backend/ # Backend API services
|
||||||
├── shared/ # Shared code and utilities
|
├── shared/ # Shared code and utilities
|
||||||
└── README.md # This file
|
└── package.json # Root package with build scripts
|
||||||
```
|
```
|
||||||
|
|
||||||
## 📁 Directories
|
## Related Repositories
|
||||||
|
|
||||||
|
| Repository | Description | URL |
|
||||||
|
|------------|-------------|-----|
|
||||||
|
| pezkuwi-sdk-ui | Blockchain Explorer & Developer Tools | https://github.com/pezkuwichain/pezkuwi-sdk-ui |
|
||||||
|
| pezkuwi-extension | Browser Wallet Extension | https://github.com/pezkuwichain/pezkuwi-extension |
|
||||||
|
|
||||||
|
## Projects
|
||||||
|
|
||||||
### 1. `web/` - Main Web Application
|
### 1. `web/` - Main Web Application
|
||||||
|
|
||||||
**Status:** ✅ ~90% Complete - Production Ready
|
**Status:** ✅ Production Ready
|
||||||
|
|
||||||
The primary web interface for Pezkuwi blockchain at [pezkuwichain.app](https://pezkuwichain.app)
|
The primary web interface for Pezkuwi blockchain at [pezkuwichain.app](https://pezkuwichain.app)
|
||||||
|
|
||||||
**Tech Stack:**
|
**Tech Stack:**
|
||||||
- React 18 + TypeScript
|
- React 18 + TypeScript
|
||||||
- Vite build tool
|
- Vite
|
||||||
- Polkadot.js API
|
- @pezkuwi/api
|
||||||
- Supabase (Auth & Database)
|
- Supabase (Auth & Database)
|
||||||
- Tailwind CSS + shadcn/ui
|
- Tailwind CSS + shadcn/ui
|
||||||
- i18next (Multi-language support)
|
- i18next
|
||||||
|
|
||||||
**Features:**
|
**Features:**
|
||||||
- ✅ Wallet integration (Polkadot.js extension)
|
- Wallet integration (Pezkuwi Extension)
|
||||||
- ✅ Live blockchain data
|
- Live blockchain data
|
||||||
- ✅ Staking dashboard
|
- Staking dashboard
|
||||||
- ✅ DEX/Swap interface
|
- DEX/Swap interface
|
||||||
- ✅ P2P Fiat Trading with atomic escrow
|
- P2P Fiat Trading with atomic escrow
|
||||||
- ✅ Transaction history
|
- Transaction history
|
||||||
- ✅ Multi-language support (EN, TR, KMR, CKB, AR, FA)
|
- Multi-language support (EN, TR, KMR, CKB, AR, FA)
|
||||||
- ✅ Governance dropdown with live blockchain integration
|
- Governance with live blockchain integration
|
||||||
|
|
||||||
**Get Started:**
|
|
||||||
```bash
|
```bash
|
||||||
cd web
|
cd web
|
||||||
npm install
|
npm install
|
||||||
npm run dev
|
npm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. `pezkuwi-sdk-ui/` - Polkadot SDK UI Clone
|
### 2. `mobile/` - Mobile Application
|
||||||
|
|
||||||
**Status:** 🚧 Planned - Not Yet Implemented
|
**Status:** 🚧 In Development
|
||||||
|
|
||||||
Branded version of Polkadot.js Apps for Pezkuwi blockchain.
|
React Native Expo app for iOS and Android.
|
||||||
|
|
||||||
**Purpose:**
|
**Features:**
|
||||||
- Provide comprehensive blockchain explorer
|
- Welcome screen with language selection
|
||||||
- Offer advanced developer tools
|
- Multi-language support (6 languages with RTL)
|
||||||
- Enable direct chain interaction
|
- Authentication (Sign In/Up)
|
||||||
- Serve as official SDK interface
|
- Main dashboard navigation (5-tab bottom nav)
|
||||||
|
- Wallet integration with @pezkuwi/api
|
||||||
|
- Live blockchain data (HEZ, PEZ, USDT)
|
||||||
|
- Send/receive transactions
|
||||||
|
- Biometric authentication
|
||||||
|
|
||||||
**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 (~50% Complete)
|
|
||||||
|
|
||||||
React Native Expo app for iOS and Android with full blockchain integration.
|
|
||||||
|
|
||||||
**Current Progress:**
|
|
||||||
- ✅ Welcome screen with language selection
|
|
||||||
- ✅ Multi-language support (6 languages with RTL)
|
|
||||||
- ✅ Authentication (Sign In/Up)
|
|
||||||
- ✅ Main dashboard navigation (5-tab bottom nav)
|
|
||||||
- ✅ Wallet integration with Polkadot.js
|
|
||||||
- ✅ Live blockchain data (HEZ, PEZ, USDT)
|
|
||||||
- ✅ Send/receive transactions
|
|
||||||
- ✅ Be Citizen screen
|
|
||||||
- ✅ Referral system integration
|
|
||||||
- ⏳ Full feature parity with web
|
|
||||||
|
|
||||||
**Technology:** React Native + Expo + TypeScript
|
|
||||||
|
|
||||||
**Get Started:**
|
|
||||||
```bash
|
```bash
|
||||||
cd mobile
|
cd mobile
|
||||||
npm install
|
npm install
|
||||||
npm start
|
npm start
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 3. `backend/` - Backend Services
|
||||||
|
|
||||||
|
API services for the applications.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd backend
|
||||||
|
npm install
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
### 4. `shared/` - Shared Code
|
### 4. `shared/` - Shared Code
|
||||||
|
|
||||||
**Status:** ✅ Fully Organized
|
Common code, types, and utilities used across all platforms.
|
||||||
|
|
||||||
Common code, types, and utilities used across all platforms (web, mobile, SDK UI).
|
|
||||||
|
|
||||||
**Structure:**
|
|
||||||
```
|
```
|
||||||
shared/
|
shared/
|
||||||
├── types/ # TypeScript type definitions
|
├── types/ # TypeScript type definitions
|
||||||
│ ├── blockchain.ts # Blockchain types (WalletAccount, Transaction, etc.)
|
├── utils/ # Helper functions
|
||||||
│ └── tokens.ts # Token & DEX types (TokenInfo, PoolInfo, etc.)
|
├── blockchain/ # Blockchain utilities
|
||||||
├── utils/ # Helper functions (formatting, validation)
|
├── constants/ # App constants
|
||||||
├── blockchain/ # Blockchain utilities (Polkadot API wrappers, endpoints)
|
├── images/ # Shared images and logos
|
||||||
├── constants/ # App constants (tokens, colors, languages)
|
└── i18n/ # Internationalization
|
||||||
└── i18n/ # Internationalization (translations for 6 languages)
|
|
||||||
└── locales/ # Translation JSON files
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**Usage:**
|
## Quick Start
|
||||||
```typescript
|
|
||||||
// Token types and constants
|
|
||||||
import { TokenInfo, KNOWN_TOKENS } from '../../../shared/types/tokens';
|
|
||||||
import { KURDISTAN_COLORS, TOKEN_DISPLAY_SYMBOLS } from '../../../shared/constants';
|
|
||||||
|
|
||||||
// Blockchain utilities
|
|
||||||
import { DEFAULT_ENDPOINT, BLOCKCHAIN_ENDPOINTS } from '../../../shared/blockchain/polkadot';
|
|
||||||
|
|
||||||
// i18n
|
|
||||||
import { translations, LANGUAGES, isRTL } from '../../../shared/i18n';
|
|
||||||
|
|
||||||
// Formatting utilities
|
|
||||||
import { formatAddress, formatTokenAmount } from '../../../shared/utils/formatting';
|
|
||||||
```
|
|
||||||
|
|
||||||
## 🎯 Development Roadmap
|
|
||||||
|
|
||||||
### Phase 1: Project Organization ✅
|
|
||||||
- [x] Reorganize repository structure
|
|
||||||
- [x] Create shared utilities foundation
|
|
||||||
- [x] Set up placeholder directories
|
|
||||||
- [x] Centralize common code (i18n, types, constants)
|
|
||||||
|
|
||||||
### Phase 2: Web App Completion ✅
|
|
||||||
- [x] Implement governance dropdown with live data
|
|
||||||
- [x] Complete blockchain data integration
|
|
||||||
- [x] Delegation and proposals pages
|
|
||||||
- [x] Forum with moderation
|
|
||||||
|
|
||||||
### Phase 3: P2P Fiat Trading ✅
|
|
||||||
- [x] P2P marketplace UI (Buy/Sell/My Ads tabs)
|
|
||||||
- [x] Merchant dashboard with offer management
|
|
||||||
- [x] Atomic escrow system with race condition protection
|
|
||||||
- [x] Platform wallet escrow (5DFwqK698v...)
|
|
||||||
- [x] PostgreSQL FOR UPDATE lock for concurrent trades
|
|
||||||
- [x] Trade lifecycle (pending → payment_sent → completed)
|
|
||||||
- [x] Edit/Pause/Resume offer functionality
|
|
||||||
|
|
||||||
### Phase 4: Mobile Development 🚧
|
|
||||||
- [x] Choose technology stack (React Native + Expo)
|
|
||||||
- [x] Implement wallet integration with Polkadot.js
|
|
||||||
- [x] Live blockchain integration (HEZ, PEZ, USDT)
|
|
||||||
- [x] Bottom navigation with 5 tabs
|
|
||||||
- [ ] Connect Be Citizen to citizenship-crypto
|
|
||||||
- [ ] Integrate referral with pallet_referral
|
|
||||||
- [ ] Achieve feature parity with web
|
|
||||||
|
|
||||||
### Phase 5: Polkadot SDK UI (Future)
|
|
||||||
- [ ] Clone and configure Polkadot.js Apps
|
|
||||||
- [ ] Apply Pezkuwi branding
|
|
||||||
- [ ] Set up deployment pipeline
|
|
||||||
- [ ] Integrate with main web app
|
|
||||||
|
|
||||||
## 🚀 Quick Start
|
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
- Node.js 18+
|
- Node.js 18+
|
||||||
- npm or yarn
|
- npm
|
||||||
- Git
|
|
||||||
|
|
||||||
### Clone Repository
|
### Installation
|
||||||
```bash
|
|
||||||
git clone https://github.com/pezkuwichain/pezkuwi-web-app-projects.git
|
|
||||||
cd pezkuwi-web-app-projects
|
|
||||||
```
|
|
||||||
|
|
||||||
### Run Web App
|
|
||||||
```bash
|
```bash
|
||||||
cd web
|
# Clone repository
|
||||||
|
git clone https://github.com/pezkuwichain/pwap.git
|
||||||
|
cd pwap
|
||||||
|
|
||||||
|
# Install all dependencies
|
||||||
npm install
|
npm install
|
||||||
npm run dev
|
|
||||||
|
# Or install individually
|
||||||
|
npm run install:web
|
||||||
|
npm run install:mobile
|
||||||
|
npm run install:backend
|
||||||
```
|
```
|
||||||
|
|
||||||
### Run Mobile App
|
### Build All Projects
|
||||||
```bash
|
|
||||||
cd mobile
|
|
||||||
npm install
|
|
||||||
npm start
|
|
||||||
```
|
|
||||||
|
|
||||||
### Build for Production
|
|
||||||
```bash
|
```bash
|
||||||
cd web
|
|
||||||
npm run build
|
npm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
## 🌐 Multi-Language Support
|
This builds:
|
||||||
|
1. `web` - Vite production build
|
||||||
|
2. `pezkuwi-sdk-ui` - Full SDK UI build (separate repo)
|
||||||
|
3. `mobile` - Expo web export
|
||||||
|
|
||||||
|
### Development
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Run web and mobile in parallel
|
||||||
|
npm run dev
|
||||||
|
|
||||||
|
# Or run individually
|
||||||
|
npm run dev:web
|
||||||
|
npm run dev:mobile
|
||||||
|
```
|
||||||
|
|
||||||
|
## Multi-Language Support
|
||||||
|
|
||||||
All applications support:
|
All applications support:
|
||||||
- 🇬🇧 English (EN)
|
- 🇬🇧 English (EN)
|
||||||
- 🇹🇷 Türkçe (TR)
|
- 🇹🇷 Türkçe (TR)
|
||||||
- ☀️ Kurmancî (KMR) - Kurdish Kurmanji
|
- ☀️ Kurmancî (KMR)
|
||||||
- ☀️ سۆرانی (CKB) - Kurdish Sorani
|
- ☀️ سۆرانی (CKB)
|
||||||
- 🇸🇦 العربية (AR)
|
- 🇸🇦 العربية (AR)
|
||||||
- 🇮🇷 فارسی (FA)
|
- 🇮🇷 فارسی (FA)
|
||||||
|
|
||||||
RTL (Right-to-Left) support for CKB, AR, FA.
|
RTL support for CKB, AR, FA.
|
||||||
|
|
||||||
## 📝 Documentation
|
## Scripts
|
||||||
|
|
||||||
- **Web App:** See `web/README.md` and inline documentation
|
| Command | Description |
|
||||||
- **SDK UI:** See `pezkuwi-sdk-ui/README.md`
|
|---------|-------------|
|
||||||
- **Mobile:** See `mobile/README.md`
|
| `npm run build` | Build all projects |
|
||||||
- **Shared Code:** See `shared/README.md`
|
| `npm run dev` | Start development servers |
|
||||||
- **Architecture:** See `web/mimari.txt` for detailed system architecture
|
| `npm run lint` | Run linters |
|
||||||
|
| `npm run test` | Run tests |
|
||||||
|
| `npm run install:all` | Install all dependencies |
|
||||||
|
|
||||||
## 🔐 Security
|
## Links
|
||||||
|
|
||||||
Security is our top priority. See `web/SECURITY.md` for:
|
- **Website:** https://pezkuwichain.app
|
||||||
- Security policies
|
- **SDK UI:** https://pezkuwichain.app/sdk
|
||||||
- Vulnerability reporting
|
- **Documentation:** https://docs.pezkuwichain.app
|
||||||
- Multi-signature wallet setup
|
|
||||||
- Best practices
|
|
||||||
|
|
||||||
## 📄 License
|
## License
|
||||||
|
|
||||||
See [LICENSE](./LICENSE) file for details.
|
Apache-2.0
|
||||||
|
|
||||||
## 🤝 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.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user