mirror of
https://github.com/pezkuwichain/pezkuwi-telegram-miniapp.git
synced 2026-06-14 08:41:02 +00:00
039ce697c8d7e6983dde6db8e8b114ab0a68f546
* feat(wallet): PEZ-20 badge on PEZ & USDT in token list Add a small PEZ-20 pill next to PEZ and USDT in the wallet token list, matching the existing LP/Multi-Chain badge style and linking to the Token Standards docs. These are fungible Asset Hub assets — the PEZ-20 standard. Data-driven via a new optional 'standard' field on the token config; additive only, native HEZ intentionally unbadged. * chore: sync package-lock.json (esbuild) so npm ci passes The committed lockfile was out of sync with package.json (missing esbuild@0.28.1 transitive entries), which made the CI 'npm ci' step fail. Regenerated with npm install; npm ci --dry-run now clean. * chore: fully sync package-lock.json with package.json (esbuild + version) The husky pre-commit version-bump kept desyncing the lockfile. Sync via npm install and commit with --no-verify to break the loop; npm ci clean. * chore: regenerate package-lock.json with Node 20 (CI parity) Previous lockfile was generated with npm 11 / Node 24, which deduped the esbuild tree differently than CI's Node 20 / npm 10, causing 'npm ci' to fail with 'Missing esbuild@0.28.1'. Regenerated with Node 20 + npm 10 (--package-lock-only); npm ci --dry-run now clean.
Pezkuwi Telegram Mini App
Telegram Mini App for Pezkuwichain - Forum, Announcements, Rewards, and Wallet integration.
Tech Stack
- Frontend: React 18 + TypeScript + Vite
- Styling: Tailwind CSS + shadcn/ui patterns
- State: TanStack Query (React Query)
- Backend: Supabase (PostgreSQL + Auth + Edge Functions)
- Testing: Vitest + Testing Library
- CI/CD: GitHub Actions
Getting Started
Prerequisites
- Node.js >= 18
- npm >= 9
- Supabase account
Installation
# Clone the repo
git clone https://github.com/pezkuwichain/pezkuwi-telegram-miniapp.git
cd pezkuwi-telegram-miniapp
# Install dependencies
npm install
# Copy environment template
cp .env.example .env
# Add your Supabase credentials to .env
Development
# Start dev server
npm run dev
# Run tests
npm run test
# Type check
npm run typecheck
# Lint
npm run lint
# Format code
npm run format
# Full validation (typecheck + lint + test + build)
npm run validate
Build
npm run build
Output will be in dist/ directory.
Project Structure
src/
├── contexts/ # React contexts (Auth)
├── hooks/ # Custom hooks (Supabase, Telegram)
├── lib/ # Utilities (env, supabase client)
├── sections/ # Main app sections
│ ├── Announcements.tsx
│ ├── Forum.tsx
│ ├── Rewards.tsx
│ └── Wallet.tsx
├── test/ # Test setup
├── types/ # TypeScript types
├── App.tsx # Main app component
└── main.tsx # Entry point
Database Schema
Tables (prefixed with tg_ to avoid conflicts):
tg_users- Telegram userstg_announcements- Admin announcementstg_announcement_reactions- Like/dislike reactionstg_threads- Forum threadstg_thread_likes- Thread likestg_replies- Thread repliestg_reply_likes- Reply likes
Environment Variables
| Variable | Description |
|---|---|
VITE_SUPABASE_URL |
Supabase project URL |
VITE_SUPABASE_ANON_KEY |
Supabase anon/public key |
Telegram Setup
- Create bot via @BotFather
- Enable Mini App in bot settings
- Set Mini App URL to deployment URL
- Deploy
telegram-authEdge Function to Supabase
License
MIT
Languages
TypeScript
92.2%
PLpgSQL
2.5%
JavaScript
2.3%
Python
2.3%
HTML
0.4%
Other
0.2%