From 894fc316a34258672bf77212789c50870cff0dda Mon Sep 17 00:00:00 2001 From: shell Date: Mon, 27 Oct 2025 18:14:23 +0800 Subject: [PATCH] docs:updata readme and PPT --- RAEDME(en).md | 450 -------------- README-zh.md | 453 ++++++++++++++ README.md | 457 +++++++------- docs/updatalog.md | 1 + package-lock.json | 29 +- public/demoVideo/.gitattributes | 1 - public/demoVideo/ArrowTower_Demo.MP4 | 3 - public/ppt/ppt-zh.html | 892 +++++++++++++++++++++++++++ public/ppt/ppt.html | 264 ++++---- 9 files changed, 1720 insertions(+), 830 deletions(-) delete mode 100644 RAEDME(en).md create mode 100644 README-zh.md delete mode 100644 public/demoVideo/.gitattributes delete mode 100644 public/demoVideo/ArrowTower_Demo.MP4 create mode 100644 public/ppt/ppt-zh.html diff --git a/RAEDME(en).md b/RAEDME(en).md deleted file mode 100644 index 8a4229e..0000000 --- a/RAEDME(en).md +++ /dev/null @@ -1,450 +0,0 @@ -# ArrowTower - -[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/easyshellworld/arrowtower-dapp/blob/main/LICENSE)[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/easyshellworld/arrowtower-dapp/pulls)[![GitHub Repo stars](https://img.shields.io/github/stars/easyshellworld/arrowtower-dapp?style=social)](https://github.com/easyshellworld/arrowtower-dapp/stargazers)[![Open Issues](https://img.shields.io/github/issues/easyshellworld/arrowtower-dapp)](https://github.com/easyshellworld/arrowtower-dapp/issues)[![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/easyshellworld/arrowtower-dapp)](https://github.com/easyshellworld/arrowtower-dapp/pulls?q=is%3Apr+is%3Aclosed)[![Last Commit](https://img.shields.io/github/last-commit/easyshellworld/arrowtower-dapp)](https://github.com/easyshellworld/arrowtower-dapp/commits/main) - -[![Polkadot](https://img.shields.io/badge/Polkadot-Hub_Testnet-E6007A?logo=polkadot)](https://polkadot.network/)[![Solidity](https://img.shields.io/badge/Solidity-363636?logo=solidity&logoColor=white)](https://soliditylang.org/)[![Web3](https://img.shields.io/badge/Web3-wagmi%2Bviem-FF6B35?logo=ethereum)](https://wagmi.sh/)[![Hardhat](https://img.shields.io/badge/Hardhat-FFF100?logo=hardhat&logoColor=black)](https://hardhat.org/) - -[![Next.js](https://img.shields.io/badge/Next.js-15+-black?logo=next.js)](https://nextjs.org/)[![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-3178C6?logo=typescript)](https://www.typescriptlang.org/)[![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-3.0+-06B6D4?logo=tailwindcss)](https://tailwindcss.com/) - -[![Live Demo](https://img.shields.io/badge/demo-live-success)](https://arrowtower.netlify.app/)[![CI/CD](https://img.shields.io/badge/CI%2FCD-GitHub%20Actions-2088FF?logo=githubactions)](https://github.com/easyshellworld/arrowtower-dapp/actions)[![Tests](https://img.shields.io/badge/tests-passing-brightgreen)](https://github.com/easyshellworld/arrowtower-dapp/actions)[![Docker Ready](https://img.shields.io/badge/docker-ready-blue?logo=docker)](https://hub.docker.com/) - - -## 📖 Project Overview - -ArrowTower is a geo-location check-in platform built on the Polkadot ecosystem, supporting one-click platform deployment and multi-scenario applications. Through **zero gas fee** backend proxy minting technology, users can experience Web3 without barriers. The first phase focuses on the rural tourism scenario of Arrow Tower Village. After tourists complete featured route check-ins and interactive tasks, the system automatically distributes unique NFT digital souvenirs, without requiring users to understand gas fees, pay fees, or learn about wallets and signatures. - -![Snapshot](./public/ppt/snapshot.png) - -The platform can be rapidly expanded to **Web3 conference & events**, **urban cultural tourism**, **educational field trips**, **commercial marketing**, **public welfare activities**, and many other business scenarios. Through on-chain identity verification and verifiable digital credentials, it provides innovative user interaction and digital asset solutions for cultural tourism, exhibitions, education, marketing, and other industries. - -* **🌐 Live Demo**: https://arrowtower.netlify.app/ -* **🎬 Demo Video**: [ArrowTower_DEMO](https://www.youtube.com/watch?v=JfxSr21KQvI&list=PLSxG9RE8DA9W12WwKVEyp4oYge_6bhpsO) -* **📖 Business Feasibility Study (Entertainment Edition)**: [Business_Feasibility_Study(Entertainment_Edition).md](./docs/Business_Feasibility_Study(Entertainment_Edition).md) - - -## ✨ Core Features - -- **🎁 Zero Gas Fee Experience**: Based on PolkaVM backend proxy minting technology, users don't need to pay gas fees. -- **🚀 Instant Deployment**: Fork or clone the project, pull up Docker images, and enter the system - truly ready out of the box. -- **🔧 Multiple Deployment Options**: Supports Docker deployment, Kubernetes deployment, and GitHub Actions one-click CI/CD deployment. -- **🔄 Queue Minting Mechanism**: Supports transaction queues and batch NFT minting (queue-minting) to handle high-concurrency scenarios. -- **🖥️ Frontend Contract Deployment**: Frontend management interface directly supports deploying and configuring contract addresses, enabling switching between different NFT contracts without backend modifications. -- **📍 Geo-location + QR Code Check-in Verification**: Supports GPS positioning verification + QR code scanning, with multiple verification layers to ensure check-in validity. -- **🎨 Interactive Task System**: Photo uploads, knowledge quizzes, task check-ins, achievement unlocks, etc., to enhance user engagement. -- **📊 Data Analytics Dashboard**: Real-time statistics on user behavior, task progress, minting volume, check-in numbers, and other on-chain + offline data. -- **🧩 Modular and Reusable**: Task system, check-in system, NFT module, and data analytics module can all be separated and reused. -- **⚡ PolkaVM Powered**: Based on PolkaVM running on Polkadot ecosystem testnet, enjoying high performance + low cost advantages. - - -## 🔑 Core Functional Modules - -1. **User Authentication Module** - - Wallet connection - - Signature authentication + session management (NextAuth) -2. **Geo-location Check-in Module** - - GPS positioning verification - - QR code scanning verification - - Check-in records synchronized to blockchain -3. **Task System Module** - - Create/edit task routes (such as photo uploads, quizzes, check-ins) - - Reward triggers (automatic NFT minting upon task completion) -4. **NFT Minting Module** - - Backend proxy minting (users don't need gas), supports batch queue minting (Queue Minting) - - Frontend configuration of contract address/ABI, supports NFT contract replacement deployment scenarios - - Minting results recorded on-chain, users automatically receive NFTs in their wallets -5. **Data Analytics Module** - - Real-time statistics on user check-ins, task completion, minting volume, activity, participation rate, and other metrics - - Integration of on-chain data + local database data for display - - Chart dashboard for operations personnel to analyze activity effectiveness -6. **Deployment & Operations Module** - - Provides Dockerfile + docker-compose configuration for one-click service startup - - Supports GitHub Actions/GitLab CI one-click build & deployment process - - Supports switching networks (local, testnet, mainnet) and DB configuration (PostgreSQL/SQLite) - -## 🎯 Application Scenarios - -### First Phase Scenario: Arrow Tower Village Rural Tourism - -Tourists browse Arrow Tower Village's featured tourism routes through the dApp. Upon reaching designated locations, they complete check-ins through geo-location verification or QR code scanning, and complete interactive tasks (photo uploads, knowledge quizzes, cultural experiences) to accumulate achievements. After completing the full route, the system automatically mints and sends unique Arrow Tower Village NFT digital souvenirs to the user's wallet (without user operation required). - -**Value**: Enhances tourist tour interest and participation, establishes a digital tourism brand for Arrow Tower Village, and achieves long-term user connection and secondary dissemination through NFTs. - -### Expansion Scenarios - -**🎪 Web3 Conference & Events** -- Conference sign-in check-ins, booth interactions, lecture hall check-ins, social network check-ins -- Automatically distribute different levels of conference attendance certificate NFTs based on check-in completion -- On-chain identity verification ensures attendee authenticity and prevents proxy sign-ins -- Real-time data statistics provide quantifiable effectiveness data for organizers and exhibitors -- Applicable to blockchain summits, Web3 hackathons, industry exhibitions, developer conferences, etc. - -**🏙️ Urban Cultural Tourism** -- Historical and cultural routes, food exploration routes, art and culture routes, city challenges -- Promotes cultural tourism consumption and city brand communication, establishes digital cultural assets for cities - -**📚 Education & Field Trips** -- Campus orienteering, field trip records, practical course check-ins, graduation memoirs -- Enhances learning interest, establishes on-chain educational archives, provides verifiable extracurricular activity certificates - -**🛍️ Commercial Marketing Activities** -- Brand collaboration check-ins, new product launches, membership system upgrades, offline pop-up events -- Increases user store visit rates and interaction rates, creates brand digital assets and Web3 community foundation - -**🤝 Community & Public Welfare Activities** -- Volunteer service records, environmental action check-ins, community activity participation, charity donation records -- Establishes a trustworthy public welfare record system, enhances transparency and credibility of public welfare activities - -## 🛠️ Technical Architecture - -### Tech Stack - -**Frontend** -- **Framework**: Next.js 15+ (App Router) -- **Styling**: Tailwind CSS + shadcn/ui -- **Blockchain Interaction**: wagmi + viem -- **Authentication**: NextAuth.js -- **State Management**: React Hooks - -**Backend** -- **API Layer**: Next.js API Routes -- **Database ORM**: Prisma -- **NFT Minting**: Backend proxy minting (Zero Gas Fee) - -**Blockchain** -- **Virtual Machine**: PolkaVM -- **Test Network**: Polkadot Hub Testnet -- **Smart Contracts**: - - Minter Contract: `0x079098fb8e901DE45AB510fA669bdE793DfEBD50` *(View on blockchain explorer: [Blockscout](https://blockscout-passet-hub.parity-testnet.parity.io/address/0x079098fb8e901DE45AB510fA669bdE793DfEBD50))* - - NFT Contract: `0x9373197B94f4633FBc121532F3cF3948FD4a5a15` *(View on blockchain explorer: [Blockscout](https://blockscout-passet-hub.parity-testnet.parity.io/token/0x9373197B94f4633FBc121532F3cF3948FD4a5a15))* - -![Snapshot](./pic/Snapshot2.PNG) - -### System Architecture - -``` -┌─────────────────────────────────────────┐ -│ User Interface Layer (Next.js) │ -│ React + Tailwind CSS + shadcn/ui │ -└──────────────────┬──────────────────────┘ - │ -┌──────────────────▼──────────────────────┐ -│ Blockchain Interaction (wagmi + viem) │ -│ User Wallet Connection & TX Signing │ -└──────────────────┬──────────────────────┘ - │ -┌──────────────────▼──────────────────────┐ -│ Business Logic (API Routes + NextAuth) │ -│ Geo Verification | Task Mgmt | Analytics│ -└──────────────────┬──────────────────────┘ - │ -┌──────────────────▼──────────────────────┐ -│ Data Persistence (Prisma + Database) │ -│ User Data | Check-in Records | Tasks │ -└──────────────────┬──────────────────────┘ - │ -┌──────────────────▼──────────────────────┐ -│ Blockchain Layer (PolkaVM + Testnet) │ -│ Polkadot Hub Testnet | Smart Contracts │ -└─────────────────────────────────────────┘ -``` - -## 🚀 Quick Start - -### Requirements - -- Node.js 20.x or higher -- Database (PostgreSQL / MySQL / SQLite) - -### Installation Steps - -#### 1. Clone the Project - -```bash -git clone https://github.com/easyshellworld/arrowtower-dapp.git -cd arrowtower-dapp -``` - -#### 2. Smart Contract Deployment & Testing - -**2.1 Enter Contract Directory and Install Dependencies** - -```bash -cd contracts/hardhat-arrowtower -npm install -``` - -**2.2 Configure Contract Environment Variables** - -Create `.env` file and configure the following: - -```env -# Local network private key example -PRIVATE_KEY_LOCAL="0x...." - -# passethub (testnet) private key -PRIVATE_KEY_PA="0x...." -``` - -**2.3 Deploy & Test Contracts** - -```bash -# Local network deployment & testing -npx hardhat run scripts/deploy.ts --network localNode -npx hardhat run scripts/deployandtest.ts --network localNode - -# Deploy & test using passet-hub testnet -npx hardhat run scripts/deploy.ts --network passethub -npx hardhat run scripts/deployandtest.ts --network passethub -``` - -**2.4 Deployment & Testing Feedback** -![](./pic/d1.PNG) -![](./pic/d2.PNG) -![](./pic/d3.PNG) -![](./pic/d4.PNG) -![](./pic/d5.PNG) -![](./pic/d6.PNG) -![](./pic/d7.PNG) -![](./pic/d8.PNG) -![](./pic/d9.PNG) - -**2.5 Return to Project Root Directory** - -```bash -cd ../.. -``` - -#### 3. dApp Installation & Configuration - -**3.1 Install Dependencies** - -```bash -npm install -``` - -**3.2 Configure Application Environment Variables** - -Create `.env` file and configure the following: - -```env -# Database configuration -DATABASE_URL="your_database_url" - -# NextAuth configuration -NEXTAUTH_SECRET="your_nextauth_secret" -NEXTAUTH_URL="http://localhost:3000" - -# Configure website base URL -NEXT_PUBLIC_ARROW_TOWER_BASE_URL="https://arrowtower.netlify.app/" - -# Smart contract addresses -NEXT_PUBLIC_MINTER_CONTRACT="0x079098fb8e901DE45AB510fA669bdE793DfEBD50" -NEXT_PUBLIC_NFT_CONTRACT="0x9373197B94f4633FBc121532F3cF3948FD4a5a15" - -# Backend minting private key (server-side only) -PRIVATE_KEY="your_private_key" - -# Initialization -ADMIN_ADDRESS="admin wallet address" -``` - -**3.3 Initialize Database** - -```bash -npx prisma generate -npx prisma db push -npm run init:db -``` - -**3.4 Start Development Server** - -```bash -npm run dev -``` - -**3.5 Access Application** - -Open your browser and visit [http://localhost:3000](http://localhost:3000) - -## 🐳 Docker One-Click Deployment - -Using Docker Compose, you can quickly start a complete production-grade ArrowTower application stack, including PostgreSQL database and Next.js application. - -### 1. Clone Project - -```bash -git clone https://github.com/easyshellworld/arrowtower-dapp.git -cd arrowtower-dapp -``` - -### 2. Configure Environment Variables - -Create `.env` file and configure the following key parameters: - -```env -# Database configuration -POSTGRES_USER=postgres -POSTGRES_PASSWORD=your_secure_password -POSTGRES_DB=arrowtower -DATABASE_URL="postgresql://postgres:your_secure_password@postgres:5432/arrowtower?schema=public" - -# NextAuth configuration -NEXTAUTH_SECRET="your_nextauth_secret_here" -NEXTAUTH_URL="http://localhost:30000" - -# Website base configuration -NEXT_PUBLIC_ARROW_TOWER_BASE_URL="http://localhost:30000" - -# Smart contract addresses -NEXT_PUBLIC_MINTER_CONTRACT="0x079098fb8e901DE45AB510fA669bdE793DfEBD50" -NEXT_PUBLIC_NFT_ADDRESS="0x9373197B94f4633FBc121532F3cF3948FD4a5a15" - -# Blockchain configuration -PRIVATE_KEY="your_private_key_for_backend_minting" -CHAIN_ID="420420421" -RPC_URL="https://rpc.polkadot-hub-paseo-testnet.polkadot.io" -NETWORK="polkadot-hub-paseo-testnet" - -# Initialization -ADMIN_ADDRESS="admin wallet address" -``` - -### 3. Start Services - -Use Docker Compose to start all services with one command: - -```bash -docker-compose up -d -``` - -This will automatically: -- Pull and start PostgreSQL 16 database -- Build and start Next.js application -- Configure network and data volumes -- Execute health checks - -### 4. Verify Deployment - -Check service status: - -```bash -docker-compose ps -``` - -View application logs: - -```bash -docker-compose logs -f app -``` - -Access application: Open your browser and visit [http://localhost:30000](http://localhost:30000) - -## 📦 Project Structure - -``` -arrowtower-dapp/ -├── contracts/ # Smart contracts (Hardhat project) -│ └── hardhat-arrowtower/ -│ ├── contracts/ # Solidity source code (arrow_tower_minter.sol, arrow_tower_nft.sol, ...) -│ ├── scripts/ # Deployment / testing scripts -│ ├── test/ # Smart contract tests -│ ├── artifacts-pvm/ # Compilation artifacts -│ └── typechain-types/ # TypeChain types -├── prisma/ # Prisma ORM (schema / migrations / client) -│ └── (schema.prisma / migrations / client) -├── src/ # Application source code -│ ├── app/ # Next.js App Router source (pages & API routes) -│ │ ├── admin/ # Admin dashboard pages -│ │ ├── api/ # API routes (server-only) -│ │ │ ├── admin/ -│ │ │ │ └─checkins/ # Admin-related APIs -│ │ │ ├── auth/ -│ │ │ │ ├─signin/ -│ │ │ │ └─[...nextauth]/ -│ │ │ ├── checkins/ -│ │ │ ├── checkmint/ -│ │ │ ├── health/ -│ │ │ ├── metadata/ -│ │ │ │ └─[id]/ -│ │ │ ├── pois/ -│ │ │ ├── route_list/ -│ │ │ └── upload/ -│ │ │ └─photo/ -│ │ ├── maps/ # Map-related pages -│ │ ├── routes/ # Dynamic route pages -│ │ │ └─[id]/ -│ │ ├── testcheckin/ -│ │ └── user/ -│ │ ├─checkmint/ -│ │ └─[poi]/ -│ ├── components/ # Reusable components -│ │ ├─maps/ # Map components -│ │ └─ui/ -│ ├── jobs/ # Batch processing / background tasks (cron / jobs) -│ └── lib/ # Internal utility libraries -│ ├─chains/ # Chain configuration -│ └─db/ # Database wrapper (Prisma client) -├── public/ # Static assets (web-accessible) -│ └── pic/ -│ └── svg_small/ # Small-sized svg assets -├── pic/ # Design/example images -│ ├─svg/ -│ └─svg_small/ -├── scripts/ # Project scripts (deployment, utility scripts) -├── data/ # Sample data / seed data / exports -├── doc/ # Project documentation (release notes / design docs) -├── tests/ # End-to-end or integration test directory -├── .env.example # Environment variable example (ensure sensitive info not in repo) -├── README.md # Project documentation -└── (Configuration files) - ├─tsconfig.json - ├─next.config.js / next.config.ts - ├─tailwind.config.js - ├─postcss.config.js - └─components.json # shadcn/ui configuration -``` - -## 🌐 Deployment - -### Netlify Deployment (Recommended) - -1. Fork this project to your GitHub account -2. Import project in Netlify -3. Configure environment variables -4. Click deploy - -Project demo deployment: https://arrowtower.netlify.app/ - -## 🤝 Contributing - -We welcome all forms of contributions, including but not limited to: - -- 🐛 Submit bug reports -- 💡 Propose new feature suggestions -- 📝 Improve documentation -- 🔧 Submit code fixes -- 🌐 Translate documentation - -## 📄 License - -This project is open source under the MIT License. - -## 📞 Contact - -- **Project Homepage**: https://github.com/easyshellworld/arrowtower-dapp -- **Live Demo**: https://arrowtower.netlify.app/ -- **Issue Reporting**: https://github.com/easyshellworld/arrowtower-dapp/issues -- **Documentation**: - * [Early Project Plan (1.3beta)](docs/1.3beta.md) - * [Business Feasibility Study (Entertainment Edition)](docs/Business_Feasibility_Study(Entertainment_Edition).md) - - -## 🌟 Acknowledgments - -Thanks to all developers and community members who have contributed to this project! - -Special thanks to the Polkadot ecosystem for supporting Web3 infrastructure. - ---- - -**ArrowTower** - Make Every Exploration an Eternal Digital Memory 🗼✨ \ No newline at end of file diff --git a/README-zh.md b/README-zh.md new file mode 100644 index 0000000..5944f56 --- /dev/null +++ b/README-zh.md @@ -0,0 +1,453 @@ +# ArrowTower + +[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/easyshellworld/arrowtower-dapp/blob/main/LICENSE)[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/easyshellworld/arrowtower-dapp/pulls)[![GitHub Repo stars](https://img.shields.io/github/stars/easyshellworld/arrowtower-dapp?style=social)](https://github.com/easyshellworld/arrowtower-dapp/stargazers)[![Open Issues](https://img.shields.io/github/issues/easyshellworld/arrowtower-dapp)](https://github.com/easyshellworld/arrowtower-dapp/issues)[![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/easyshellworld/arrowtower-dapp)](https://github.com/easyshellworld/arrowtower-dapp/pulls?q=is%3Apr+is%3Aclosed)[![Last Commit](https://img.shields.io/github/last-commit/easyshellworld/arrowtower-dapp)](https://github.com/easyshellworld/arrowtower-dapp/commits/main) + +[![Polkadot](https://img.shields.io/badge/Polkadot-Hub_Testnet-E6007A?logo=polkadot)](https://polkadot.network/)[![Solidity](https://img.shields.io/badge/Solidity-363636?logo=solidity&logoColor=white)](https://soliditylang.org/)[![Web3](https://img.shields.io/badge/Web3-wagmi%2Bviem-FF6B35?logo=ethereum)](https://wagmi.sh/)[![Hardhat](https://img.shields.io/badge/Hardhat-FFF100?logo=hardhat&logoColor=black)](https://hardhat.org/) + +[![Next.js](https://img.shields.io/badge/Next.js-15+-black?logo=next.js)](https://nextjs.org/)[![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-3178C6?logo=typescript)](https://www.typescriptlang.org/)[![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-3.0+-06B6D4?logo=tailwindcss)](https://tailwindcss.com/) + +[![Live Demo](https://img.shields.io/badge/demo-live-success)](https://arrowtower.netlify.app/)[![CI/CD](https://img.shields.io/badge/CI%2FCD-GitHub%20Actions-2088FF?logo=githubactions)](https://github.com/easyshellworld/arrowtower-dapp/actions)[![Tests](https://img.shields.io/badge/tests-passing-brightgreen)](https://github.com/easyshellworld/arrowtower-dapp/actions)[![Docker Ready](https://img.shields.io/badge/docker-ready-blue?logo=docker)](https://hub.docker.com/) + + +## 📖 项目简介 + +ArrowTower 是一个基于 Polkadot 生态的地理位置打卡平台,支持一键式平台部署,多场景适用,通过**零 Gas 费**后端代铸造技术,让用户无门槛体验 Web3。首期聚焦箭塔村乡村旅游场景,游客完成特色路线打卡和互动任务后,系统自动发放独特 NFT 数字纪念品,无需用户了解Gas费或支付费用,学习钱包使用与签名。 +![Snapshot](./public/ppt/snapshot.png) + +平台可快速拓展至 **Web3 会展活动**、**城市文旅探索**、**教育研学**、**商业营销**、**公益活动** 等多个商业场景。通过链上身份验证和可验证数字凭证,为文旅、会展、教育、营销等行业提供创新的用户互动和数字资产解决方案。 + +* **🌐 演示网站**:https://arrowtower.netlify.app/ +* **🎬 演示视频**:[ArrowTower_DEMO](https://www.youtube.com/watch?v=JfxSr21KQvI&list=PLSxG9RE8DA9W12WwKVEyp4oYge_6bhpsO) +* **📖 商业可行分析报告**: [Business_Feasibility_Study(Entertainment Edition)](./docs/Business_Feasibility_Study(Entertainment_Edition).md) + +## ✨ 核心特性 + +- **🎁 零 Gas 费体验**:基于 PolkaVM 后端代铸造技术,用户无需支付 Gas。 +- **🚀 即刻生效**:Fork 或克隆项目后,拉起 Docker 镜像即可进入系统,真正做到开箱即用。 +- **🔧 多部署形式**:支持 Docker 部署、Kubernetes 部署、GitHub Actions 一键 CI/CD 上线。 +- **🔄 队列铸造机制**:支持事务队列、批量 NFT 铸造 (queue-minting),可应对高并发场景。 +- **🖥️ 前端可部署合约**:前端管理界面直接支持部署、配置合约地址,无需后端改造即可切换不同 NFT 合约。 +- **📍 地理位置+二维码校验打卡**:支持 GPS 定位校验 + 二维码扫描,多重验证保障打卡有效性。 +- **🎨 互动任务系统**:拍照上传、知识问答、任务打卡、成就解锁等,提升用户参与感。 +- **📊 数据统计看板**:实时统计用户行为、任务进度、铸造量、打卡人数等链上 + 线下数据。 +- **🧩 模块化可复用**:任务系统、打卡系统、NFT 模块、数据统计模块均可拆分复用。 +- **⚡ PolkaVM 驱动**:基于 PolkaVM 在 Polkadot 生态的测试网运行,享受高性能 + 低成本优势。 + + +## 🔑 核心功能模块 + +1. **用户认证模块** + - 钱包连接 + - 签名认证 + 会话管理(NextAuth) +2. **地理位置打卡模块** + - GPS 定位校验 + - 二维码 QR 扫描校验 + - 打卡记录同步至链上 +3. **任务系统模块** + - 创建/编辑任务路线等(如拍照上传、问答、打卡) + - 奖励触发器(完成任务自动触发 NFT 铸造) +4. **NFT 铸造模块** + - 后端代铸造(用户无需 Gas),可批量队列铸造(Queue Minting) + - 前端配置合约地址/ABI,支持替换 NFT 合约部署场景 + - 铸造结果记录链上,用户钱包自动接收 NFT +5. **数据统计模块** + - 实时统计用户打卡、任务完成、铸造量、活跃度、参与率等指标 + - 链上数据 + 本地数据库数据融合展示 + - 图表看板,便于运营人员分析活动效果 +6. **部署运维模块** + - 提供 Dockerfile + docker-compose 配置,一键启动服务 + - 支持 GitHub Actions/GitLab CI 一键构建 & 部署流程 + - 支持切换 网络(本地、测试网、主网)与 DB 配置(PostgreSQL/SQLite) + +## 🎯 应用场景 + +### 首期场景:箭塔村乡村旅游 + +游客通过 dApp 浏览箭塔村特色旅游路线,到达指定地点后通过地理位置校验或扫描二维码完成打卡,完成互动任务(拍照上传、知识问答、文化体验)积累成就。完成完整路线后系统自动铸造并发送独特的箭塔村 NFT 数字纪念品到用户钱包(无需用户操作)。 + +**价值**:提升游客游览趣味性和参与度,为箭塔村建立数字化旅游品牌,通过 NFT 实现长期用户连接和二次传播。 + +### 拓展场景 + +**🎪 Web3 会展活动** +- 会议签到打卡、展位互动、演讲厅打卡、社交网络打卡 +- 根据打卡完成度自动发放不同等级的参会证明 NFT +- 链上身份验证确保参会者身份真实性,防止代签到 +- 实时数据统计,为主办方和展商提供可量化的效果数据 +- 适用于区块链峰会、Web3 黑客松、行业展览会、开发者大会等 + +**🏙️ 城市文旅探索** +- 历史文化线路、美食探店路线、艺术文化路线、城市挑战赛 +- 促进文旅消费和城市品牌传播,建立城市数字文化资产 + +**📚 教育与研学** +- 校园定向越野、研学旅行记录、实践课程打卡、毕业纪念册 +- 增强学习趣味性,建立链上教育档案,提供可验证的课外活动证明 + +**🛍️ 商业营销活动** +- 品牌联动打卡、新品发布会、会员体系升级、线下快闪活动 +- 提升用户到店率和互动率,打造品牌数字资产和 Web3 社区基础 + +**🤝 社区与公益活动** +- 志愿服务记录、环保行动打卡、社区活动参与、慈善捐赠记录 +- 建立可信的公益记录体系,提升公益活动透明度和公信力 + +## 🛠️ 技术架构 + +### 技术栈 + +**前端** +- **框架**:Next.js 15+ (App Router) +- **样式**:Tailwind CSS + shadcn/ui +- **区块链交互**:wagmi + viem +- **认证系统**:NextAuth.js +- **状态管理**:React Hooks + +**后端** +- **API 层**:Next.js API Routes +- **数据库 ORM**:Prisma +- **NFT 铸造**:后端代铸造(Zero Gas Fee) + +**区块链** +- **虚拟机**:PolkaVM +- **测试网络**:Polkadot Hub Testnet +- **智能合约**: + - Minter 合约:`0x079098fb8e901DE45AB510fA669bdE793DfEBD50`*(View on blockchain explorer: [Blockscout](https://blockscout-passet-hub.parity-testnet.parity.io/address/0x079098fb8e901DE45AB510fA669bdE793DfEBD50))* + - NFT 合约:`0x9373197B94f4633FBc121532F3cF3948FD4a5a15` *(View on blockchain explorer: [Blockscout](https://blockscout-passet-hub.parity-testnet.parity.io/token/0x9373197B94f4633FBc121532F3cF3948FD4a5a15))* + +![Snapshot](./pic/Snapshot2.PNG) + +### 系统架构 + +``` +┌─────────────────────────────────────────┐ +│ 用户界面层 (Next.js) │ +│ React + Tailwind CSS + shadcn/ui │ +└──────────────────┬──────────────────────┘ + │ +┌──────────────────▼──────────────────────┐ +│ 区块链交互层 (wagmi + viem) │ +│ 用户钱包连接与交易签名 │ +└──────────────────┬──────────────────────┘ + │ +┌──────────────────▼──────────────────────┐ +│ 业务逻辑层 (API Routes + NextAuth) │ +│ 地理位置验证 | 任务管理 | 数据统计 │ +└──────────────────┬──────────────────────┘ + │ +┌──────────────────▼──────────────────────┐ +│ 数据持久层 (Prisma + Database) │ +│ 用户数据 | 打卡记录 | 任务进度 │ +└──────────────────┬──────────────────────┘ + │ +┌──────────────────▼──────────────────────┐ +│ 区块链层 (PolkaVM + Testnet) │ +│ Polkadot Hub Testnet | Smart Contracts │ +└─────────────────────────────────────────┘ +``` + +## 🚀 快速开始 + +### 环境要求 + +- Node.js 20.x 或更高版本 +- 数据库(PostgreSQL / MySQL / SQLite) + +### 安装步骤 + +#### 1. 克隆项目 + +```bash +git clone https://github.com/easyshellworld/arrowtower-dapp.git +cd arrowtower-dapp +``` + +#### 2. 智能合约部署与测试 + +**2.1 进入合约目录并安装依赖** + +```bash +cd contracts/hardhat-arrowtower +npm install +``` + +**2.2 配置合约环境变量** + +创建 `.env` 文件并配置以下内容: + +```env +# 本地网络私钥示例 +PRIVATE_KEY_LOCAL="0x...." + +# passethub (测试网) 私钥 +PRIVATE_KEY_PA="0x...." +``` + +**2.3 部署与测试合约** + +```bash +# 本地网络部署与测试 +npx hardhat run scripts/deploy.ts --network localNode +npx hardhat run scripts/deployandtest.ts --network localNode + +# 使用 passet-hub 测试网部署与测试 +npx hardhat run scripts/deploy.ts --network passethub +npx hardhat run scripts/deployandtest.ts --network passethub +``` + +**2.5 部署与测试合约反馈** +![](./pic/d1.PNG) +![](./pic/d2.PNG) +![](./pic/d3.PNG) +![](./pic/d4.PNG) +![](./pic/d5.PNG) +![](./pic/d6.PNG) +![](./pic/d7.PNG) +![](./pic/d8.PNG) +![](./pic/d9.PNG) + + +**2.5 返回项目根目录** + +```bash +cd ../.. +``` + +#### 3. dApp 应用安装与配置 + +**3.1 安装依赖** + +```bash +npm install +``` + +**3.2 配置应用环境变量** + +创建 `.env` 文件并配置以下内容: + +```env +# 数据库配置 +DATABASE_URL="your_database_url" + +# NextAuth 配置 +NEXTAUTH_SECRET="your_nextauth_secret" +NEXTAUTH_URL="http://localhost:3000" + +# 配置网站基本链接 +NEXT_PUBLIC_ARROW_TOWER_BASE_URL="https://arrowtower.netlify.app/" + +# 智能合约地址 +NEXT_PUBLIC_MINTER_CONTRACT="0x079098fb8e901DE45AB510fA669bdE793DfEBD50" +NEXT_PUBLIC_NFT_CONTRACT="0x9373197B94f4633FBc121532F3cF3948FD4a5a15" + +# 后端铸造私钥(仅服务端) +PRIVATE_KEY="your_private_key" + +# 初始化使用 +ADMIN_ADDRESS="admin wallet addresss" +``` + +**3.3 初始化数据库** + +```bash +npx prisma generate +npx prisma db push +npm run init:db +``` + +**3.4 启动开发服务器** + +```bash +npm run dev +``` + +**3.5 访问应用** + +打开浏览器访问 [http://localhost:3000](http://localhost:3000) + + + +## 🐳 Docker 一键部署 + +使用 Docker Compose 可以快速启动完整的生产级 ArrowTower 应用栈,包括 PostgreSQL 数据库和 Next.js 应用。 + +### 1. 克隆项目 + +```bash +git clone https://github.com/easyshellworld/arrowtower-dapp.git +cd arrowtower-dapp +``` + +### 2. 配置环境变量 + +创建 `.env` 文件,配置以下关键参数: + +```env +# 数据库配置 +POSTGRES_USER=postgres +POSTGRES_PASSWORD=your_secure_password +POSTGRES_DB=arrowtower +DATABASE_URL="postgresql://postgres:your_secure_password@postgres:5432/arrowtower?schema=public" + +# NextAuth 配置 +NEXTAUTH_SECRET="your_nextauth_secret_here" +NEXTAUTH_URL="http://localhost:30000" + +# 网站基础配置 +NEXT_PUBLIC_ARROW_TOWER_BASE_URL="http://localhost:30000" + +# 智能合约地址 +NEXT_PUBLIC_MINTER_CONTRACT="0x079098fb8e901DE45AB510fA669bdE793DfEBD50" +NEXT_PUBLIC_NFT_ADDRESS="0x9373197B94f4633FBc121532F3cF3948FD4a5a15" + +# 区块链配置 +PRIVATE_KEY="your_private_key_for_backend_minting" +CHAIN_ID="420420421" +RPC_URL="https://rpc.polkadot-hub-paseo-testnet.polkadot.io" +NETWORK="polkadot-hub-paseo-testnet" + + +# 初始化使用 +ADMIN_ADDRESS="admin wallet addresss" +``` + +### 3. 启动服务 + +使用 Docker Compose 一键启动所有服务: + +```bash +docker-compose up -d +``` + +这将自动: +- 拉取并启动 PostgreSQL 16 数据库 +- 构建并启动 Next.js 应用 +- 配置网络和数据卷 +- 执行健康检查 + +### 4. 验证部署 + +检查服务状态: + +```bash +docker-compose ps +``` + +查看应用日志: + +```bash +docker-compose logs -f app +``` + +访问应用:打开浏览器访问 [http://localhost:30000](http://localhost:30000) + + +## 📦 项目结构 + +``` +arrowtower-dapp/ +├── contracts/ # 智能合约 (Hardhat 项目) +│ └── hardhat-arrowtower/ +│ ├── contracts/ # Solidity 源码(arrow_tower_minter.sol, arrow_tower_nft.sol, ...) +│ ├── scripts/ # 部署 / 测试脚本 +│ ├── test/ # 智能合约测试 +│ ├── artifacts-pvm/ # 编译产物 +│ └── typechain-types/ # TypeChain 类型 +├── prisma/ # Prisma ORM(schema / migrations / client) +│ └── (schema.prisma / migrations / client) +├── src/ # 应用源码(已从 log 中识别) +│ ├── app/ # Next.js App Router 源码(页面与 API 路由) +│ │ ├── admin/ # 管理后台页面 +│ │ ├── api/ # API 路由(server-only) +│ │ │ ├── admin/ +│ │ │ │ └─checkins/ # 管理相关接口 +│ │ │ ├── auth/ +│ │ │ │ ├─signin/ +│ │ │ │ └─[...nextauth]/ +│ │ │ ├── checkins/ +│ │ │ ├── checkmint/ +│ │ │ ├── health/ +│ │ │ ├── metadata/ +│ │ │ │ └─[id]/ +│ │ │ ├── pois/ +│ │ │ ├── route_list/ +│ │ │ └── upload/ +│ │ │ └─photo/ +│ │ ├── maps/ # 地图相关页面 +│ │ ├── routes/ # 动态路由页面 +│ │ │ └─[id]/ +│ │ ├── testcheckin/ +│ │ └── user/ +│ │ ├─checkmint/ +│ │ └─[poi]/ +│ ├── components/ # 可复用组件 +│ │ ├─maps/ # 地图组件 +│ │ └─ui/ +│ ├── jobs/ # 批处理 / 后台任务(cron / jobs) +│ └── lib/ # 项目内部工具库 +│ ├─chains/ # 链配置 +│ └─db/ # 数据库封装(Prisma client) +├── public/ # 静态资源(web 可直取) +│ └── pic/ +│ └── svg_small/ # 小尺寸 svg 资源 +├── pic/ # 设计/示例图(log 中出现的单独目录) +│ ├─svg/ +│ └─svg_small/ +├── scripts/ # 项目脚本(部署、工具脚本) +├── data/ # 示例数据 / 种子数据 / 导出 +├── doc/ # 项目文档(release notes / design doc) +├── tests/ # 端到端或集成测试目录 +├── .env.example # 环境变量示例(请确保敏感信息不在 repo) +├── README.md # 项目说明 +└── (配置文件) + ├─tsconfig.json + ├─next.config.js / next.config.ts + ├─tailwind.config.js + ├─postcss.config.js + └─components.json # shadcn/ui 配置 +``` + + +## 🌐 部署 + +### Netlify 部署(推荐) + +1. Fork 本项目到你的 GitHub 账户 +2. 在 Netlify 中导入项目 +3. 配置环境变量 +4. 点击部署 + +项目已部署演示:https://arrowtower.netlify.app/ + +## 🤝 贡献指南 + +我们欢迎所有形式的贡献,包括但不限于: + +- 🐛 提交 Bug 报告 +- 💡 提出新功能建议 +- 📝 改进文档 +- 🔧 提交代码修复 +- 🌐 翻译文档 + +## 📄 开源协议 + +本项目采用 MIT 协议开源。 + +## 📞 联系方式 + +- **项目主页**:https://github.com/easyshellworld/arrowtower-dapp +- **演示网站**:https://arrowtower.netlify.app/ +- **问题反馈**:https://github.com/easyshellworld/arrowtower-dapp/issues +- **文档中心**: + * [早期项目策划书(1.3beta)](docs/1.3beta.md) + * [商业可行性分析报告娱乐版Business_Feasibility_Study(Entertainment Edition)](docs/Business_Feasibility_Study(Entertainment_Edition).md) + +## 🌟 致谢 + +感谢所有为本项目做出贡献的开发者和社区成员! + +特别感谢 Polkadot 生态对 Web3 基础设施的支持。 + +--- + +**ArrowTower** - 让每一次探索都成为永恒的数字记忆 🗼✨ diff --git a/README.md b/README.md index 5944f56..8a4229e 100644 --- a/README.md +++ b/README.md @@ -9,193 +9,195 @@ [![Live Demo](https://img.shields.io/badge/demo-live-success)](https://arrowtower.netlify.app/)[![CI/CD](https://img.shields.io/badge/CI%2FCD-GitHub%20Actions-2088FF?logo=githubactions)](https://github.com/easyshellworld/arrowtower-dapp/actions)[![Tests](https://img.shields.io/badge/tests-passing-brightgreen)](https://github.com/easyshellworld/arrowtower-dapp/actions)[![Docker Ready](https://img.shields.io/badge/docker-ready-blue?logo=docker)](https://hub.docker.com/) -## 📖 项目简介 +## 📖 Project Overview + +ArrowTower is a geo-location check-in platform built on the Polkadot ecosystem, supporting one-click platform deployment and multi-scenario applications. Through **zero gas fee** backend proxy minting technology, users can experience Web3 without barriers. The first phase focuses on the rural tourism scenario of Arrow Tower Village. After tourists complete featured route check-ins and interactive tasks, the system automatically distributes unique NFT digital souvenirs, without requiring users to understand gas fees, pay fees, or learn about wallets and signatures. -ArrowTower 是一个基于 Polkadot 生态的地理位置打卡平台,支持一键式平台部署,多场景适用,通过**零 Gas 费**后端代铸造技术,让用户无门槛体验 Web3。首期聚焦箭塔村乡村旅游场景,游客完成特色路线打卡和互动任务后,系统自动发放独特 NFT 数字纪念品,无需用户了解Gas费或支付费用,学习钱包使用与签名。 ![Snapshot](./public/ppt/snapshot.png) -平台可快速拓展至 **Web3 会展活动**、**城市文旅探索**、**教育研学**、**商业营销**、**公益活动** 等多个商业场景。通过链上身份验证和可验证数字凭证,为文旅、会展、教育、营销等行业提供创新的用户互动和数字资产解决方案。 - -* **🌐 演示网站**:https://arrowtower.netlify.app/ -* **🎬 演示视频**:[ArrowTower_DEMO](https://www.youtube.com/watch?v=JfxSr21KQvI&list=PLSxG9RE8DA9W12WwKVEyp4oYge_6bhpsO) -* **📖 商业可行分析报告**: [Business_Feasibility_Study(Entertainment Edition)](./docs/Business_Feasibility_Study(Entertainment_Edition).md) - -## ✨ 核心特性 - -- **🎁 零 Gas 费体验**:基于 PolkaVM 后端代铸造技术,用户无需支付 Gas。 -- **🚀 即刻生效**:Fork 或克隆项目后,拉起 Docker 镜像即可进入系统,真正做到开箱即用。 -- **🔧 多部署形式**:支持 Docker 部署、Kubernetes 部署、GitHub Actions 一键 CI/CD 上线。 -- **🔄 队列铸造机制**:支持事务队列、批量 NFT 铸造 (queue-minting),可应对高并发场景。 -- **🖥️ 前端可部署合约**:前端管理界面直接支持部署、配置合约地址,无需后端改造即可切换不同 NFT 合约。 -- **📍 地理位置+二维码校验打卡**:支持 GPS 定位校验 + 二维码扫描,多重验证保障打卡有效性。 -- **🎨 互动任务系统**:拍照上传、知识问答、任务打卡、成就解锁等,提升用户参与感。 -- **📊 数据统计看板**:实时统计用户行为、任务进度、铸造量、打卡人数等链上 + 线下数据。 -- **🧩 模块化可复用**:任务系统、打卡系统、NFT 模块、数据统计模块均可拆分复用。 -- **⚡ PolkaVM 驱动**:基于 PolkaVM 在 Polkadot 生态的测试网运行,享受高性能 + 低成本优势。 - - -## 🔑 核心功能模块 - -1. **用户认证模块** - - 钱包连接 - - 签名认证 + 会话管理(NextAuth) -2. **地理位置打卡模块** - - GPS 定位校验 - - 二维码 QR 扫描校验 - - 打卡记录同步至链上 -3. **任务系统模块** - - 创建/编辑任务路线等(如拍照上传、问答、打卡) - - 奖励触发器(完成任务自动触发 NFT 铸造) -4. **NFT 铸造模块** - - 后端代铸造(用户无需 Gas),可批量队列铸造(Queue Minting) - - 前端配置合约地址/ABI,支持替换 NFT 合约部署场景 - - 铸造结果记录链上,用户钱包自动接收 NFT -5. **数据统计模块** - - 实时统计用户打卡、任务完成、铸造量、活跃度、参与率等指标 - - 链上数据 + 本地数据库数据融合展示 - - 图表看板,便于运营人员分析活动效果 -6. **部署运维模块** - - 提供 Dockerfile + docker-compose 配置,一键启动服务 - - 支持 GitHub Actions/GitLab CI 一键构建 & 部署流程 - - 支持切换 网络(本地、测试网、主网)与 DB 配置(PostgreSQL/SQLite) - -## 🎯 应用场景 - -### 首期场景:箭塔村乡村旅游 - -游客通过 dApp 浏览箭塔村特色旅游路线,到达指定地点后通过地理位置校验或扫描二维码完成打卡,完成互动任务(拍照上传、知识问答、文化体验)积累成就。完成完整路线后系统自动铸造并发送独特的箭塔村 NFT 数字纪念品到用户钱包(无需用户操作)。 - -**价值**:提升游客游览趣味性和参与度,为箭塔村建立数字化旅游品牌,通过 NFT 实现长期用户连接和二次传播。 - -### 拓展场景 - -**🎪 Web3 会展活动** -- 会议签到打卡、展位互动、演讲厅打卡、社交网络打卡 -- 根据打卡完成度自动发放不同等级的参会证明 NFT -- 链上身份验证确保参会者身份真实性,防止代签到 -- 实时数据统计,为主办方和展商提供可量化的效果数据 -- 适用于区块链峰会、Web3 黑客松、行业展览会、开发者大会等 - -**🏙️ 城市文旅探索** -- 历史文化线路、美食探店路线、艺术文化路线、城市挑战赛 -- 促进文旅消费和城市品牌传播,建立城市数字文化资产 - -**📚 教育与研学** -- 校园定向越野、研学旅行记录、实践课程打卡、毕业纪念册 -- 增强学习趣味性,建立链上教育档案,提供可验证的课外活动证明 - -**🛍️ 商业营销活动** -- 品牌联动打卡、新品发布会、会员体系升级、线下快闪活动 -- 提升用户到店率和互动率,打造品牌数字资产和 Web3 社区基础 - -**🤝 社区与公益活动** -- 志愿服务记录、环保行动打卡、社区活动参与、慈善捐赠记录 -- 建立可信的公益记录体系,提升公益活动透明度和公信力 - -## 🛠️ 技术架构 - -### 技术栈 - -**前端** -- **框架**:Next.js 15+ (App Router) -- **样式**:Tailwind CSS + shadcn/ui -- **区块链交互**:wagmi + viem -- **认证系统**:NextAuth.js -- **状态管理**:React Hooks - -**后端** -- **API 层**:Next.js API Routes -- **数据库 ORM**:Prisma -- **NFT 铸造**:后端代铸造(Zero Gas Fee) - -**区块链** -- **虚拟机**:PolkaVM -- **测试网络**:Polkadot Hub Testnet -- **智能合约**: - - Minter 合约:`0x079098fb8e901DE45AB510fA669bdE793DfEBD50`*(View on blockchain explorer: [Blockscout](https://blockscout-passet-hub.parity-testnet.parity.io/address/0x079098fb8e901DE45AB510fA669bdE793DfEBD50))* - - NFT 合约:`0x9373197B94f4633FBc121532F3cF3948FD4a5a15` *(View on blockchain explorer: [Blockscout](https://blockscout-passet-hub.parity-testnet.parity.io/token/0x9373197B94f4633FBc121532F3cF3948FD4a5a15))* +The platform can be rapidly expanded to **Web3 conference & events**, **urban cultural tourism**, **educational field trips**, **commercial marketing**, **public welfare activities**, and many other business scenarios. Through on-chain identity verification and verifiable digital credentials, it provides innovative user interaction and digital asset solutions for cultural tourism, exhibitions, education, marketing, and other industries. + +* **🌐 Live Demo**: https://arrowtower.netlify.app/ +* **🎬 Demo Video**: [ArrowTower_DEMO](https://www.youtube.com/watch?v=JfxSr21KQvI&list=PLSxG9RE8DA9W12WwKVEyp4oYge_6bhpsO) +* **📖 Business Feasibility Study (Entertainment Edition)**: [Business_Feasibility_Study(Entertainment_Edition).md](./docs/Business_Feasibility_Study(Entertainment_Edition).md) + + +## ✨ Core Features + +- **🎁 Zero Gas Fee Experience**: Based on PolkaVM backend proxy minting technology, users don't need to pay gas fees. +- **🚀 Instant Deployment**: Fork or clone the project, pull up Docker images, and enter the system - truly ready out of the box. +- **🔧 Multiple Deployment Options**: Supports Docker deployment, Kubernetes deployment, and GitHub Actions one-click CI/CD deployment. +- **🔄 Queue Minting Mechanism**: Supports transaction queues and batch NFT minting (queue-minting) to handle high-concurrency scenarios. +- **🖥️ Frontend Contract Deployment**: Frontend management interface directly supports deploying and configuring contract addresses, enabling switching between different NFT contracts without backend modifications. +- **📍 Geo-location + QR Code Check-in Verification**: Supports GPS positioning verification + QR code scanning, with multiple verification layers to ensure check-in validity. +- **🎨 Interactive Task System**: Photo uploads, knowledge quizzes, task check-ins, achievement unlocks, etc., to enhance user engagement. +- **📊 Data Analytics Dashboard**: Real-time statistics on user behavior, task progress, minting volume, check-in numbers, and other on-chain + offline data. +- **🧩 Modular and Reusable**: Task system, check-in system, NFT module, and data analytics module can all be separated and reused. +- **⚡ PolkaVM Powered**: Based on PolkaVM running on Polkadot ecosystem testnet, enjoying high performance + low cost advantages. + + +## 🔑 Core Functional Modules + +1. **User Authentication Module** + - Wallet connection + - Signature authentication + session management (NextAuth) +2. **Geo-location Check-in Module** + - GPS positioning verification + - QR code scanning verification + - Check-in records synchronized to blockchain +3. **Task System Module** + - Create/edit task routes (such as photo uploads, quizzes, check-ins) + - Reward triggers (automatic NFT minting upon task completion) +4. **NFT Minting Module** + - Backend proxy minting (users don't need gas), supports batch queue minting (Queue Minting) + - Frontend configuration of contract address/ABI, supports NFT contract replacement deployment scenarios + - Minting results recorded on-chain, users automatically receive NFTs in their wallets +5. **Data Analytics Module** + - Real-time statistics on user check-ins, task completion, minting volume, activity, participation rate, and other metrics + - Integration of on-chain data + local database data for display + - Chart dashboard for operations personnel to analyze activity effectiveness +6. **Deployment & Operations Module** + - Provides Dockerfile + docker-compose configuration for one-click service startup + - Supports GitHub Actions/GitLab CI one-click build & deployment process + - Supports switching networks (local, testnet, mainnet) and DB configuration (PostgreSQL/SQLite) + +## 🎯 Application Scenarios + +### First Phase Scenario: Arrow Tower Village Rural Tourism + +Tourists browse Arrow Tower Village's featured tourism routes through the dApp. Upon reaching designated locations, they complete check-ins through geo-location verification or QR code scanning, and complete interactive tasks (photo uploads, knowledge quizzes, cultural experiences) to accumulate achievements. After completing the full route, the system automatically mints and sends unique Arrow Tower Village NFT digital souvenirs to the user's wallet (without user operation required). + +**Value**: Enhances tourist tour interest and participation, establishes a digital tourism brand for Arrow Tower Village, and achieves long-term user connection and secondary dissemination through NFTs. + +### Expansion Scenarios + +**🎪 Web3 Conference & Events** +- Conference sign-in check-ins, booth interactions, lecture hall check-ins, social network check-ins +- Automatically distribute different levels of conference attendance certificate NFTs based on check-in completion +- On-chain identity verification ensures attendee authenticity and prevents proxy sign-ins +- Real-time data statistics provide quantifiable effectiveness data for organizers and exhibitors +- Applicable to blockchain summits, Web3 hackathons, industry exhibitions, developer conferences, etc. + +**🏙️ Urban Cultural Tourism** +- Historical and cultural routes, food exploration routes, art and culture routes, city challenges +- Promotes cultural tourism consumption and city brand communication, establishes digital cultural assets for cities + +**📚 Education & Field Trips** +- Campus orienteering, field trip records, practical course check-ins, graduation memoirs +- Enhances learning interest, establishes on-chain educational archives, provides verifiable extracurricular activity certificates + +**🛍️ Commercial Marketing Activities** +- Brand collaboration check-ins, new product launches, membership system upgrades, offline pop-up events +- Increases user store visit rates and interaction rates, creates brand digital assets and Web3 community foundation + +**🤝 Community & Public Welfare Activities** +- Volunteer service records, environmental action check-ins, community activity participation, charity donation records +- Establishes a trustworthy public welfare record system, enhances transparency and credibility of public welfare activities + +## 🛠️ Technical Architecture + +### Tech Stack + +**Frontend** +- **Framework**: Next.js 15+ (App Router) +- **Styling**: Tailwind CSS + shadcn/ui +- **Blockchain Interaction**: wagmi + viem +- **Authentication**: NextAuth.js +- **State Management**: React Hooks + +**Backend** +- **API Layer**: Next.js API Routes +- **Database ORM**: Prisma +- **NFT Minting**: Backend proxy minting (Zero Gas Fee) + +**Blockchain** +- **Virtual Machine**: PolkaVM +- **Test Network**: Polkadot Hub Testnet +- **Smart Contracts**: + - Minter Contract: `0x079098fb8e901DE45AB510fA669bdE793DfEBD50` *(View on blockchain explorer: [Blockscout](https://blockscout-passet-hub.parity-testnet.parity.io/address/0x079098fb8e901DE45AB510fA669bdE793DfEBD50))* + - NFT Contract: `0x9373197B94f4633FBc121532F3cF3948FD4a5a15` *(View on blockchain explorer: [Blockscout](https://blockscout-passet-hub.parity-testnet.parity.io/token/0x9373197B94f4633FBc121532F3cF3948FD4a5a15))* ![Snapshot](./pic/Snapshot2.PNG) -### 系统架构 +### System Architecture ``` ┌─────────────────────────────────────────┐ -│ 用户界面层 (Next.js) │ +│ User Interface Layer (Next.js) │ │ React + Tailwind CSS + shadcn/ui │ └──────────────────┬──────────────────────┘ │ ┌──────────────────▼──────────────────────┐ -│ 区块链交互层 (wagmi + viem) │ -│ 用户钱包连接与交易签名 │ +│ Blockchain Interaction (wagmi + viem) │ +│ User Wallet Connection & TX Signing │ └──────────────────┬──────────────────────┘ │ ┌──────────────────▼──────────────────────┐ -│ 业务逻辑层 (API Routes + NextAuth) │ -│ 地理位置验证 | 任务管理 | 数据统计 │ +│ Business Logic (API Routes + NextAuth) │ +│ Geo Verification | Task Mgmt | Analytics│ └──────────────────┬──────────────────────┘ │ ┌──────────────────▼──────────────────────┐ -│ 数据持久层 (Prisma + Database) │ -│ 用户数据 | 打卡记录 | 任务进度 │ +│ Data Persistence (Prisma + Database) │ +│ User Data | Check-in Records | Tasks │ └──────────────────┬──────────────────────┘ │ ┌──────────────────▼──────────────────────┐ -│ 区块链层 (PolkaVM + Testnet) │ +│ Blockchain Layer (PolkaVM + Testnet) │ │ Polkadot Hub Testnet | Smart Contracts │ └─────────────────────────────────────────┘ ``` -## 🚀 快速开始 +## 🚀 Quick Start -### 环境要求 +### Requirements -- Node.js 20.x 或更高版本 -- 数据库(PostgreSQL / MySQL / SQLite) +- Node.js 20.x or higher +- Database (PostgreSQL / MySQL / SQLite) -### 安装步骤 +### Installation Steps -#### 1. 克隆项目 +#### 1. Clone the Project ```bash git clone https://github.com/easyshellworld/arrowtower-dapp.git cd arrowtower-dapp ``` -#### 2. 智能合约部署与测试 +#### 2. Smart Contract Deployment & Testing -**2.1 进入合约目录并安装依赖** +**2.1 Enter Contract Directory and Install Dependencies** ```bash cd contracts/hardhat-arrowtower npm install ``` -**2.2 配置合约环境变量** +**2.2 Configure Contract Environment Variables** -创建 `.env` 文件并配置以下内容: +Create `.env` file and configure the following: ```env -# 本地网络私钥示例 +# Local network private key example PRIVATE_KEY_LOCAL="0x...." -# passethub (测试网) 私钥 +# passethub (testnet) private key PRIVATE_KEY_PA="0x...." ``` -**2.3 部署与测试合约** +**2.3 Deploy & Test Contracts** ```bash -# 本地网络部署与测试 +# Local network deployment & testing npx hardhat run scripts/deploy.ts --network localNode npx hardhat run scripts/deployandtest.ts --network localNode -# 使用 passet-hub 测试网部署与测试 +# Deploy & test using passet-hub testnet npx hardhat run scripts/deploy.ts --network passethub npx hardhat run scripts/deployandtest.ts --network passethub ``` -**2.5 部署与测试合约反馈** +**2.4 Deployment & Testing Feedback** ![](./pic/d1.PNG) ![](./pic/d2.PNG) ![](./pic/d3.PNG) @@ -206,48 +208,47 @@ npx hardhat run scripts/deployandtest.ts --network passethub ![](./pic/d8.PNG) ![](./pic/d9.PNG) - -**2.5 返回项目根目录** +**2.5 Return to Project Root Directory** ```bash cd ../.. ``` -#### 3. dApp 应用安装与配置 +#### 3. dApp Installation & Configuration -**3.1 安装依赖** +**3.1 Install Dependencies** ```bash npm install ``` -**3.2 配置应用环境变量** +**3.2 Configure Application Environment Variables** -创建 `.env` 文件并配置以下内容: +Create `.env` file and configure the following: ```env -# 数据库配置 +# Database configuration DATABASE_URL="your_database_url" -# NextAuth 配置 +# NextAuth configuration NEXTAUTH_SECRET="your_nextauth_secret" NEXTAUTH_URL="http://localhost:3000" -# 配置网站基本链接 +# Configure website base URL NEXT_PUBLIC_ARROW_TOWER_BASE_URL="https://arrowtower.netlify.app/" -# 智能合约地址 +# Smart contract addresses NEXT_PUBLIC_MINTER_CONTRACT="0x079098fb8e901DE45AB510fA669bdE793DfEBD50" NEXT_PUBLIC_NFT_CONTRACT="0x9373197B94f4633FBc121532F3cF3948FD4a5a15" -# 后端铸造私钥(仅服务端) +# Backend minting private key (server-side only) PRIVATE_KEY="your_private_key" -# 初始化使用 -ADMIN_ADDRESS="admin wallet addresss" +# Initialization +ADMIN_ADDRESS="admin wallet address" ``` -**3.3 初始化数据库** +**3.3 Initialize Database** ```bash npx prisma generate @@ -255,112 +256,108 @@ npx prisma db push npm run init:db ``` -**3.4 启动开发服务器** +**3.4 Start Development Server** ```bash npm run dev ``` -**3.5 访问应用** - -打开浏览器访问 [http://localhost:3000](http://localhost:3000) +**3.5 Access Application** +Open your browser and visit [http://localhost:3000](http://localhost:3000) +## 🐳 Docker One-Click Deployment -## 🐳 Docker 一键部署 +Using Docker Compose, you can quickly start a complete production-grade ArrowTower application stack, including PostgreSQL database and Next.js application. -使用 Docker Compose 可以快速启动完整的生产级 ArrowTower 应用栈,包括 PostgreSQL 数据库和 Next.js 应用。 - -### 1. 克隆项目 +### 1. Clone Project ```bash git clone https://github.com/easyshellworld/arrowtower-dapp.git cd arrowtower-dapp ``` -### 2. 配置环境变量 +### 2. Configure Environment Variables -创建 `.env` 文件,配置以下关键参数: +Create `.env` file and configure the following key parameters: ```env -# 数据库配置 +# Database configuration POSTGRES_USER=postgres POSTGRES_PASSWORD=your_secure_password POSTGRES_DB=arrowtower DATABASE_URL="postgresql://postgres:your_secure_password@postgres:5432/arrowtower?schema=public" -# NextAuth 配置 +# NextAuth configuration NEXTAUTH_SECRET="your_nextauth_secret_here" NEXTAUTH_URL="http://localhost:30000" -# 网站基础配置 +# Website base configuration NEXT_PUBLIC_ARROW_TOWER_BASE_URL="http://localhost:30000" -# 智能合约地址 +# Smart contract addresses NEXT_PUBLIC_MINTER_CONTRACT="0x079098fb8e901DE45AB510fA669bdE793DfEBD50" NEXT_PUBLIC_NFT_ADDRESS="0x9373197B94f4633FBc121532F3cF3948FD4a5a15" -# 区块链配置 +# Blockchain configuration PRIVATE_KEY="your_private_key_for_backend_minting" CHAIN_ID="420420421" RPC_URL="https://rpc.polkadot-hub-paseo-testnet.polkadot.io" NETWORK="polkadot-hub-paseo-testnet" - -# 初始化使用 -ADMIN_ADDRESS="admin wallet addresss" +# Initialization +ADMIN_ADDRESS="admin wallet address" ``` -### 3. 启动服务 +### 3. Start Services -使用 Docker Compose 一键启动所有服务: +Use Docker Compose to start all services with one command: ```bash docker-compose up -d ``` -这将自动: -- 拉取并启动 PostgreSQL 16 数据库 -- 构建并启动 Next.js 应用 -- 配置网络和数据卷 -- 执行健康检查 +This will automatically: +- Pull and start PostgreSQL 16 database +- Build and start Next.js application +- Configure network and data volumes +- Execute health checks -### 4. 验证部署 +### 4. Verify Deployment -检查服务状态: +Check service status: ```bash docker-compose ps ``` -查看应用日志: +View application logs: ```bash docker-compose logs -f app ``` -访问应用:打开浏览器访问 [http://localhost:30000](http://localhost:30000) - +Access application: Open your browser and visit [http://localhost:30000](http://localhost:30000) -## 📦 项目结构 +## 📦 Project Structure ``` arrowtower-dapp/ -├── contracts/ # 智能合约 (Hardhat 项目) +├── contracts/ # Smart contracts (Hardhat project) │ └── hardhat-arrowtower/ -│ ├── contracts/ # Solidity 源码(arrow_tower_minter.sol, arrow_tower_nft.sol, ...) -│ ├── scripts/ # 部署 / 测试脚本 -│ ├── test/ # 智能合约测试 -│ ├── artifacts-pvm/ # 编译产物 -│ └── typechain-types/ # TypeChain 类型 -├── prisma/ # Prisma ORM(schema / migrations / client) +│ ├── contracts/ # Solidity source code (arrow_tower_minter.sol, arrow_tower_nft.sol, ...) +│ ├── scripts/ # Deployment / testing scripts +│ ├── test/ # Smart contract tests +│ ├── artifacts-pvm/ # Compilation artifacts +│ └── typechain-types/ # TypeChain types +├── prisma/ # Prisma ORM (schema / migrations / client) │ └── (schema.prisma / migrations / client) -├── src/ # 应用源码(已从 log 中识别) -│ ├── app/ # Next.js App Router 源码(页面与 API 路由) -│ │ ├── admin/ # 管理后台页面 -│ │ ├── api/ # API 路由(server-only) +├── src/ # Application source code +│ ├── app/ # Next.js App Router source (pages & API routes) +│ │ ├── admin/ # Admin dashboard pages +│ │ ├── api/ # API routes (server-only) │ │ │ ├── admin/ -│ │ │ │ └─checkins/ # 管理相关接口 +│ │ │ │ └─checkins/ # Admin-related APIs │ │ │ ├── auth/ │ │ │ │ ├─signin/ │ │ │ │ └─[...nextauth]/ @@ -373,81 +370,81 @@ arrowtower-dapp/ │ │ │ ├── route_list/ │ │ │ └── upload/ │ │ │ └─photo/ -│ │ ├── maps/ # 地图相关页面 -│ │ ├── routes/ # 动态路由页面 +│ │ ├── maps/ # Map-related pages +│ │ ├── routes/ # Dynamic route pages │ │ │ └─[id]/ │ │ ├── testcheckin/ │ │ └── user/ │ │ ├─checkmint/ │ │ └─[poi]/ -│ ├── components/ # 可复用组件 -│ │ ├─maps/ # 地图组件 +│ ├── components/ # Reusable components +│ │ ├─maps/ # Map components │ │ └─ui/ -│ ├── jobs/ # 批处理 / 后台任务(cron / jobs) -│ └── lib/ # 项目内部工具库 -│ ├─chains/ # 链配置 -│ └─db/ # 数据库封装(Prisma client) -├── public/ # 静态资源(web 可直取) +│ ├── jobs/ # Batch processing / background tasks (cron / jobs) +│ └── lib/ # Internal utility libraries +│ ├─chains/ # Chain configuration +│ └─db/ # Database wrapper (Prisma client) +├── public/ # Static assets (web-accessible) │ └── pic/ -│ └── svg_small/ # 小尺寸 svg 资源 -├── pic/ # 设计/示例图(log 中出现的单独目录) +│ └── svg_small/ # Small-sized svg assets +├── pic/ # Design/example images │ ├─svg/ │ └─svg_small/ -├── scripts/ # 项目脚本(部署、工具脚本) -├── data/ # 示例数据 / 种子数据 / 导出 -├── doc/ # 项目文档(release notes / design doc) -├── tests/ # 端到端或集成测试目录 -├── .env.example # 环境变量示例(请确保敏感信息不在 repo) -├── README.md # 项目说明 -└── (配置文件) +├── scripts/ # Project scripts (deployment, utility scripts) +├── data/ # Sample data / seed data / exports +├── doc/ # Project documentation (release notes / design docs) +├── tests/ # End-to-end or integration test directory +├── .env.example # Environment variable example (ensure sensitive info not in repo) +├── README.md # Project documentation +└── (Configuration files) ├─tsconfig.json ├─next.config.js / next.config.ts ├─tailwind.config.js ├─postcss.config.js - └─components.json # shadcn/ui 配置 + └─components.json # shadcn/ui configuration ``` +## 🌐 Deployment -## 🌐 部署 +### Netlify Deployment (Recommended) -### Netlify 部署(推荐) +1. Fork this project to your GitHub account +2. Import project in Netlify +3. Configure environment variables +4. Click deploy -1. Fork 本项目到你的 GitHub 账户 -2. 在 Netlify 中导入项目 -3. 配置环境变量 -4. 点击部署 +Project demo deployment: https://arrowtower.netlify.app/ -项目已部署演示:https://arrowtower.netlify.app/ +## 🤝 Contributing -## 🤝 贡献指南 +We welcome all forms of contributions, including but not limited to: -我们欢迎所有形式的贡献,包括但不限于: +- 🐛 Submit bug reports +- 💡 Propose new feature suggestions +- 📝 Improve documentation +- 🔧 Submit code fixes +- 🌐 Translate documentation -- 🐛 提交 Bug 报告 -- 💡 提出新功能建议 -- 📝 改进文档 -- 🔧 提交代码修复 -- 🌐 翻译文档 +## 📄 License -## 📄 开源协议 +This project is open source under the MIT License. -本项目采用 MIT 协议开源。 +## 📞 Contact -## 📞 联系方式 +- **Project Homepage**: https://github.com/easyshellworld/arrowtower-dapp +- **Live Demo**: https://arrowtower.netlify.app/ +- **Issue Reporting**: https://github.com/easyshellworld/arrowtower-dapp/issues +- **Documentation**: + * [Early Project Plan (1.3beta)](docs/1.3beta.md) + * [Business Feasibility Study (Entertainment Edition)](docs/Business_Feasibility_Study(Entertainment_Edition).md) -- **项目主页**:https://github.com/easyshellworld/arrowtower-dapp -- **演示网站**:https://arrowtower.netlify.app/ -- **问题反馈**:https://github.com/easyshellworld/arrowtower-dapp/issues -- **文档中心**: - * [早期项目策划书(1.3beta)](docs/1.3beta.md) - * [商业可行性分析报告娱乐版Business_Feasibility_Study(Entertainment Edition)](docs/Business_Feasibility_Study(Entertainment_Edition).md) -## 🌟 致谢 +## 🌟 Acknowledgments -感谢所有为本项目做出贡献的开发者和社区成员! +Thanks to all developers and community members who have contributed to this project! -特别感谢 Polkadot 生态对 Web3 基础设施的支持。 +Special thanks to the Polkadot ecosystem for supporting Web3 infrastructure. --- -**ArrowTower** - 让每一次探索都成为永恒的数字记忆 🗼✨ +**ArrowTower** - Make Every Exploration an Eternal Digital Memory 🗼✨ \ No newline at end of file diff --git a/docs/updatalog.md b/docs/updatalog.md index e355f8c..95f20e7 100644 --- a/docs/updatalog.md +++ b/docs/updatalog.md @@ -209,5 +209,6 @@ ### 2025-10-27 * 联系合作伙伴完成最终视频拍摄,并合成最终视频上传`YouTube` * 增加娱乐版商业可行性分析报告 +* 切换English `PPT`与`readme` diff --git a/package-lock.json b/package-lock.json index 058cefa..8c7cb5d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3771,6 +3771,7 @@ "version": "2.21.0", "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.21.0.tgz", "integrity": "sha512-z7h+PeLa5Au2R591d/8ZlziE0stJvdzP9jNFzFolf2RG/OiXulgFKum8PrIyXy+Rg2q95U9nRVUF9fWcn78yBA==", + "deprecated": "Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases", "license": "Apache-2.0", "dependencies": { "@walletconnect/core": "2.21.0", @@ -3802,6 +3803,7 @@ "version": "2.21.0", "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.21.0.tgz", "integrity": "sha512-mtUQvewt+X0VBQay/xOJBvxsB3Xsm1lTwFjZ6WUwSOTR1X+FNb71hSApnV5kbsdDIpYPXeQUbGt2se1n5E5UBg==", + "deprecated": "Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases", "license": "Apache-2.0", "dependencies": { "@walletconnect/events": "1.0.1", @@ -4363,6 +4365,7 @@ "version": "2.21.0", "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.21.0.tgz", "integrity": "sha512-z7h+PeLa5Au2R591d/8ZlziE0stJvdzP9jNFzFolf2RG/OiXulgFKum8PrIyXy+Rg2q95U9nRVUF9fWcn78yBA==", + "deprecated": "Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases", "license": "Apache-2.0", "dependencies": { "@walletconnect/core": "2.21.0", @@ -4394,6 +4397,7 @@ "version": "2.21.0", "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.21.0.tgz", "integrity": "sha512-mtUQvewt+X0VBQay/xOJBvxsB3Xsm1lTwFjZ6WUwSOTR1X+FNb71hSApnV5kbsdDIpYPXeQUbGt2se1n5E5UBg==", + "deprecated": "Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases", "license": "Apache-2.0", "dependencies": { "@walletconnect/events": "1.0.1", @@ -4782,6 +4786,7 @@ "version": "2.21.0", "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.21.0.tgz", "integrity": "sha512-z7h+PeLa5Au2R591d/8ZlziE0stJvdzP9jNFzFolf2RG/OiXulgFKum8PrIyXy+Rg2q95U9nRVUF9fWcn78yBA==", + "deprecated": "Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases", "license": "Apache-2.0", "dependencies": { "@walletconnect/core": "2.21.0", @@ -4813,6 +4818,7 @@ "version": "2.21.0", "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.21.0.tgz", "integrity": "sha512-mtUQvewt+X0VBQay/xOJBvxsB3Xsm1lTwFjZ6WUwSOTR1X+FNb71hSApnV5kbsdDIpYPXeQUbGt2se1n5E5UBg==", + "deprecated": "Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases", "license": "Apache-2.0", "dependencies": { "@walletconnect/events": "1.0.1", @@ -6130,9 +6136,9 @@ ] }, "node_modules/@wagmi/connectors": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@wagmi/connectors/-/connectors-6.0.1.tgz", - "integrity": "sha512-ZHvC9GIncOViz6Fi+oCc+8oin+U+GfCKNLj90aNxve8CLw++vQBEcivPIq1mQq2QNo6lay7yjNyGInPoOEIkSg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@wagmi/connectors/-/connectors-6.1.0.tgz", + "integrity": "sha512-MnpJHEABUIsajNxLc6br0LiqJvoFZbavQ6yG+mQb7Xlb3Hmm3IRjH5NU1g2zw5PCTRd3BFQLjwniLdwDnUPYNw==", "license": "MIT", "dependencies": { "@base-org/account": "1.1.1", @@ -6383,6 +6389,7 @@ "version": "2.21.1", "resolved": "https://registry.npmjs.org/@walletconnect/ethereum-provider/-/ethereum-provider-2.21.1.tgz", "integrity": "sha512-SSlIG6QEVxClgl1s0LMk4xr2wg4eT3Zn/Hb81IocyqNSGfXpjtawWxKxiC5/9Z95f1INyBD6MctJbL/R1oBwIw==", + "deprecated": "Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases", "license": "Apache-2.0", "dependencies": { "@reown/appkit": "1.7.8", @@ -6716,6 +6723,7 @@ "version": "2.21.1", "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.21.1.tgz", "integrity": "sha512-QaXzmPsMnKGV6tc4UcdnQVNOz4zyXgarvdIQibJ4L3EmLat73r5ZVl4c0cCOcoaV7rgM9Wbphgu5E/7jNcd3Zg==", + "deprecated": "Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases", "license": "Apache-2.0", "dependencies": { "@walletconnect/core": "2.21.1", @@ -6883,6 +6891,7 @@ "version": "2.21.1", "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.21.1.tgz", "integrity": "sha512-Wjx9G8gUHVMnYfxtasC9poGm8QMiPCpXpbbLFT+iPoQskDDly8BwueWnqKs4Mx2SdIAWAwuXeZ5ojk5qQOxJJg==", + "deprecated": "Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases", "license": "Apache-2.0", "dependencies": { "@walletconnect/events": "1.0.1", @@ -9629,9 +9638,9 @@ } }, "node_modules/hono": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/hono/-/hono-4.10.1.tgz", - "integrity": "sha512-rpGNOfacO4WEPClfkEt1yfl8cbu10uB1lNpiI33AKoiAHwOS8lV748JiLx4b5ozO/u4qLjIvfpFsPXdY5Qjkmg==", + "version": "4.10.3", + "resolved": "https://registry.npmjs.org/hono/-/hono-4.10.3.tgz", + "integrity": "sha512-2LOYWUbnhdxdL8MNbNg9XZig6k+cZXm5IjHn2Aviv7honhBMOHb+jxrKIeJRZJRmn+htUCKhaicxwXuUDlchRA==", "license": "MIT", "engines": { "node": ">=16.9.0" @@ -14344,12 +14353,12 @@ } }, "node_modules/wagmi": { - "version": "2.18.1", - "resolved": "https://registry.npmjs.org/wagmi/-/wagmi-2.18.1.tgz", - "integrity": "sha512-u+lzv7K7R5Gvw5P8vtmwQ96+tR2UGSJ/wNRrDAZH+2ikLqc6Dt8Lj8L8MaqI0v7+gnHOGh63cgeXAEjOWydsMg==", + "version": "2.18.2", + "resolved": "https://registry.npmjs.org/wagmi/-/wagmi-2.18.2.tgz", + "integrity": "sha512-9jFip+0ZfjMBxT72m02MZD2+VmQQ/UmqZhHl+98N9HEqXLn765fIu45QPV85DAnQqIHD81gvY3vTvfWt16A5yQ==", "license": "MIT", "dependencies": { - "@wagmi/connectors": "6.0.1", + "@wagmi/connectors": "6.1.0", "@wagmi/core": "2.22.1", "use-sync-external-store": "1.4.0" }, diff --git a/public/demoVideo/.gitattributes b/public/demoVideo/.gitattributes deleted file mode 100644 index 78b2a00..0000000 --- a/public/demoVideo/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.MP4 filter=lfs diff=lfs merge=lfs -text diff --git a/public/demoVideo/ArrowTower_Demo.MP4 b/public/demoVideo/ArrowTower_Demo.MP4 deleted file mode 100644 index 8b8e851..0000000 --- a/public/demoVideo/ArrowTower_Demo.MP4 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2dfa55484d443936f6d66d4ba1fb8d3f9235dc282df41c4afc757ecd8d514c36 -size 387641756 diff --git a/public/ppt/ppt-zh.html b/public/ppt/ppt-zh.html new file mode 100644 index 0000000..efe8c0e --- /dev/null +++ b/public/ppt/ppt-zh.html @@ -0,0 +1,892 @@ + + + + + + + ArrowTower - 地理位置打卡平台 + + + + + +
+
+

ArrowTower

+

基于 Polkadot 生态的地理位置打卡平台

+
+ ArrowTower +
+

零 Gas 费 · 零门槛 · 地理位置验证 · NFT 纪念品

+
+
+ + +
+
+

团队介绍

+

陌生人草台班子 (Random Assembly)

+
+
+ Alice +

Alice

+

富贵

+
+
+ jackzdh +

jackzdh

+

深海

+
+
+ Jolin +

Jolin

+

王木木

+
+
+ Yuuki +

Yuuki

+

耶耶

+
+
+ +
+
+ + +
+
+

项目简介

+ + +
+ License + PRs Welcome + GitHub Repo stars + Open Issues + GitHub closed pull requests + Last Commit +
+ +
+ Polkadot + Solidity + Web3 + Hardhat +
+ +
+ Next.js + TypeScript + Tailwind CSS +
+ + +
+ Live Demo + CI/CD + Tests + Docker Ready +
+
+ 项目截图 +
+

ArrowTower 是一个基于 Polkadot 生态的地理位置打卡平台,支持一键式平台部署,多场景适用,通过零 Gas 费后端代铸造技术,让用户无门槛体验 Web3。游客完成特色路线打卡和互动任务后,系统自动发放独特 NFT 数字纪念品,无需用户了解Gas费或支付费用,学习钱包使用与签名。

+ + + +
+
+ + +
+
+

项目演示

+
+ 箭塔村地图 +
+

体验箭塔村特色旅游路线,完成打卡获取 NFT 纪念品

+
+
+ + +
+
+

核心特性

+
    +
  • 🎁 零 Gas 费体验:基于 PolkaVM 后端代铸造技术,用户无需支付 Gas
  • +
  • 🚀 即刻生效:Fork 或克隆项目后,拉起 Docker 镜像即可进入系统,真正做到开箱即用
  • +
  • 🔧 多部署形式:支持 Docker 部署、Kubernetes 部署、GitHub Actions 一键 CI/CD 上线
  • +
  • 🔄 队列铸造机制:支持事务队列、批量 NFT 铸造 (queue-minting),可应对高并发场景
  • +
  • 🖥️ 前端可部署合约:前端管理界面直接支持部署、配置合约地址,无需后端改造即可切换不同 NFT 合约
  • +
  • 📍 地理位置+二维码校验打卡:支持 GPS 定位校验 + 二维码扫描,多重验证保障打卡有效性
  • +
  • 🎨 互动任务系统:拍照上传、知识问答、任务打卡、成就解锁等,提升用户参与感
  • +
  • 📊 数据统计看板:实时统计用户行为、任务进度、铸造量、打卡人数等链上 + 线下数据
  • +
  • 🧩 模块化可复用:任务系统、打卡系统、NFT 模块、数据统计模块均可拆分复用
  • +
  • ⚡ PolkaVM 驱动:基于 PolkaVM 在 Polkadot 生态的测试网运行,享受高性能 + 低成本优势
  • +
+
+
+ + +
+
+

应用场景

+
+
+

🏞️ 箭塔村乡村旅游

+

游客通过 dApp 浏览箭塔村特色旅游路线,到达指定地点后通过地理位置校验或扫描二维码完成打卡,完成互动任务(拍照上传、知识问答、文化体验)积累成就。

+

价值:提升游客游览趣味性和参与度,为箭塔村建立数字化旅游品牌,通过 NFT 实现长期用户连接和二次传播。

+
+
+

🎪 Web3 会展活动

+

会议签到打卡、展位互动、演讲厅打卡、社交网络打卡,根据打卡完成度自动发放不同等级的参会证明 NFT。

+

价值:链上身份验证确保参会者身份真实性,防止代签到,为主办方和展商提供可量化的效果数据。

+
+
+

🏙️ 城市文旅探索

+

历史文化线路、美食探店路线、艺术文化路线、城市挑战赛,促进文旅消费和城市品牌传播。

+

价值:建立城市数字文化资产,增强游客参与感和城市认同感。

+
+
+

📚 教育与研学

+

校园定向越野、研学旅行记录、实践课程打卡、毕业纪念册,增强学习趣味性。

+

价值:建立链上教育档案,提供可验证的课外活动证明。

+
+
+

🛍️ 商业营销活动

+

品牌联动打卡、新品发布会、会员体系升级、线下快闪活动。

+

价值:提升用户到店率和互动率,打造品牌数字资产和 Web3 社区基础。

+
+
+

🤝 社区与公益活动

+

志愿服务记录、环保行动打卡、社区活动参与、慈善捐赠记录。

+

价值:建立可信的公益记录体系,提升公益活动透明度和公信力。

+
+
+
+
+ + +
+
+

技术栈

+
+
+

前端技术栈

+
    +
  • Next.js 15+ (App Router)
  • +
  • Tailwind CSS + shadcn/ui
  • +
  • wagmi + viem
  • +
  • NextAuth.js
  • +
  • TypeScript 5.0+
  • +
+
+
+

后端技术栈

+
    +
  • Next.js API Routes
  • +
  • Prisma ORM
  • +
  • 后端代铸造技术
  • +
  • PostgreSQL / MySQL / SQLite
  • +
+
+
+

区块链技术

+
    +
  • PolkaVM 虚拟机
  • +
  • Polkadot Hub Testnet
  • +
  • 智能合约系统
  • +
  • Hardhat 开发框架
  • +
+
+
+
+
+

部署与运维

+
    +
  • Docker + docker-compose
  • +
  • Kubernetes
  • +
  • GitHub Actions CI/CD
  • +
  • Netlify 部署
  • +
+
+
+

智能合约

+
    +
  • Solidity
  • +
  • Minter 合约
  • +
  • NFT 合约
  • +
  • 队列铸造机制
  • +
+
+
+

其他技术

+
    +
  • 地理位置验证
  • +
  • 二维码扫描
  • +
  • 任务管理系统
  • +
  • 数据统计看板
  • +
+
+
+
+
+ + +
+
+

技术架构

+
+ +
+

用户界面层 (Next.js)

+

React + Tailwind CSS + shadcn/ui

+
+ +
+ + +
+

区块链交互层 (wagmi + viem)

+

用户钱包连接与交易签名

+
+ +
+ + +
+

业务逻辑层 (API Routes + NextAuth)

+

地理位置验证 | 任务管理 | 数据统计

+
+ +
+ + +
+

数据持久层 (Prisma + Database)

+

用户数据 | 打卡记录 | 任务进度

+
+ +
+ + +
+

区块链层 (PolkaVM + Testnet)

+

Polkadot Hub Testnet | Smart Contracts

+
+
+
+
+ + +
+
+

核心功能模块

+
+
+

🔑 用户认证模块

+

钱包连接、签名认证 + 会话管理(NextAuth)

+
+
+

📍 地理位置打卡模块

+

GPS 定位校验、二维码 QR 扫描校验、打卡记录同步至链上

+
+
+

🎯 任务系统模块

+

创建/编辑任务路线(如拍照上传、问答、打卡)、奖励触发器(完成任务自动触发 NFT 铸造)

+
+
+

🎨 NFT 铸造模块

+

后端代铸造(用户无需 Gas),可批量队列铸造、前端配置合约地址/ABI、铸造结果记录链上

+
+
+

📊 数据统计模块

+

实时统计用户打卡、任务完成、铸造量、活跃度、参与率等指标、链上数据 + 本地数据库数据融合展示

+
+
+

🚀 部署运维模块

+

提供 Dockerfile + docker-compose 配置,一键启动服务、支持 GitHub Actions/GitLab CI 一键构建 & 部署流程

+
+
+
+
+ + +
+
+

感谢大家观看

+

鸣谢

+
+ + + + + +
+

感谢 Polkadot 生态对 Web3 基础设施的支持

+

感谢所有为本项目做出贡献的开发者和社区成员!

+
+
+ + + + +
1 / 10
+ + + + + \ No newline at end of file diff --git a/public/ppt/ppt.html b/public/ppt/ppt.html index efe8c0e..3905b7d 100644 --- a/public/ppt/ppt.html +++ b/public/ppt/ppt.html @@ -1,10 +1,10 @@ - + - ArrowTower - 地理位置打卡平台 + ArrowTower - Location Check-in Platform