Welcome to P-Project, a cutting-edge social impact ecosystem built with Rust, WebAssembly, and modern blockchain technologies. What started as a meme coin has evolved into a comprehensive platform for humanitarian aid, social verification, and community-driven governance.
P-Project transforms blockchain technology into a robust, scalable ecosystem with real-world utility. Built with performance and security in mind, our platform offers:
- Token Contracts with deflationary mechanisms and automatic rewards
- DAO Governance for community-driven decision making
- Staking System with time-based yield farming
- Airdrop Distribution for early supporters
- Cross-Chain Bridge for multi-network compatibility
- Web Interface powered by WebAssembly for a seamless user experience
- AI Integration for impact verification, NFT art generation, and fraud detection
- IoT Solutions for smart donation boxes, refugee camp wristbands, and food distribution systems
- Web2 Integration for social media donations, YouTube tips, and messaging platform bots
P-Project follows a modular monorepo architecture using Rust workspaces:
p-project/
├── p-project-core/ # Shared models, utilities, and database connectors
├── p-project-contracts/ # Token smart contracts with burn and reward mechanisms
├── p-project-api/ # RESTful API server for external integrations
├── p-project-dao/ # Decentralized Autonomous Organization governance
├── p-project-staking/ # Staking contract services with yield farming
├── p-project-airdrop/ # Airdrop distribution system
├── p-project-bridge/ # Cross-chain bridge functionality
└── p-project-web/ # WebAssembly frontend components
| Layer | Technology | Purpose |
|---|---|---|
| Core | Rust | High-performance, memory-safe systems programming |
| Web | WebAssembly | Frontend components with near-native performance |
| Database | MySQL | Relational data storage for users and transactions |
| Cache | Redis | Session management and caching layer |
| Documents | MongoDB | Flexible storage for proposals and governance data |
| API | Axum | High-performance web framework for API endpoints |
| Build | Cargo | Dependency management and build system |
- Rust 1.70 or higher
- MySQL server
- Redis server
- MongoDB server
- Clone the repository:
git clone https://github.com/flodecentralizedchat-source/P-Project.git
cd P-Project- Set up environment variables:
cp .env.example .env
# Edit .env with your database credentials- Build the project:
cargo build- Build WebAssembly components:
wasm-pack build p-project-web --target webcargo run -p p-project-apiThe API will be available at http://localhost:3000
cargo testcargo doc --openPrebuilt NGINX image (with Brotli and precompressed assets) is published to GHCR:
- Image:
ghcr.io/flodecentralizedchat-source/p-project-web-static:latest - Package page: https://github.com/orgs/flodecentralizedchat-source/packages/container/package/p-project-web-static
Pull and run locally:
docker pull ghcr.io/flodecentralizedchat-source/p-project-web-static:latest
docker run -p 8080:80 ghcr.io/flodecentralizedchat-source/p-project-web-static:latest
# open http://localhost:8080Use in docker-compose.yml instead of building:
services:
nginx:
image: ghcr.io/flodecentralizedchat-source/p-project-web-static:latest
container_name: p_project_nginx
ports:
- "8080:80"
depends_on:
api:
condition: service_healthy
restart: unless-stoppedNotes:
- The image proxies API requests to
/api/and serves the SPA from/. - If the image is private, ensure the GHCR package visibility is set to public or log in:
echo $PAT | docker login ghcr.io -u USERNAME --password-stdin.
-
Full stack (API + DBs + NGINX):
docker compose up --build -d- NGINX at
http://localhost:8080, API athttp://localhost:3000
-
Static web only (no API dependency):
docker compose --profile web up --build -d web-static- Opens
http://localhost:8080and serves the SPA;/api/routes will 502 if called (API not started).
The heart of P-Project features:
- Burn Mechanism: 1-2% burn on each transaction to increase scarcity
- Reflection Rewards: Automatic redistribution of 1-3% to all holders
- Anti-Whale Measures: Transaction limits and maximum wallet restrictions
Earn rewards by staking your P tokens:
- Flexible staking periods (7-365 days)
- Annual reward rates up to 20%
- Automatic reward compounding
Community-driven decision making:
- Proposal creation and voting
- Token-weighted voting system
- Transparent execution of decisions
Seamless token transfers between:
- Ethereum
- Binance Smart Chain
- Solana
- Polygon
- Base
Intelligent features powered by artificial intelligence:
- Impact Verification: AI chatbots that verify social impact activities
- NFT Art Generation: AI-powered creation of unique Peace NFTs
- Fraud Detection: Machine learning models to detect suspicious activities
- Meme Generation: AI-powered creation of viral memes for community engagement
Real-world applications through Internet of Things:
- Smart Donation Boxes: Hardware wallets for physical donations
- NFC Wristbands: Digital identity and payment solutions for refugee camps
- QR-Code Food Distribution: Efficient food aid distribution systems
Bridging traditional platforms with blockchain:
- Social Media Widgets: Donation widgets for Facebook and Instagram
- YouTube Tips: "Tip in PeaceCoin" functionality for content creators
- Messaging Bots: Telegram and Discord bots for tipping and transactions
- Developer Grants: Fund developers building on your platform.
-
Configure the relayer via
.env:EVM_NETWORKSis a comma‑separated list (case‑insensitive, no spaces).- Mainnet example:
ethereum,polygon,bsc,arbitrum,optimism - Testnet example:
sepolia,amoy,arbitrum_sepolia,optimism_sepolia
- Mainnet example:
- For each
<NAME>in the list, set:EVM_<NAME>_RPC_URL,EVM_<NAME>_BRIDGE_ADDRESS,EVM_<NAME>_TOKEN_ADDRESS
- Adapters default to
ETH_PRIVATE_KEY; override per network usingEVM_<NAME>_PRIVATE_KEY_ENV.
-
Hardhat networks (contracts):
- Mainnet:
mainnet,polygon,arbitrum,optimism(plusbsc/bscTestnetprovided). - Testnet:
sepolia,amoy,arbitrumSepolia,optimismSepolia. - Set RPC envs:
SEPOLIA_URL,AMOY_URL,ARBITRUM_SEPOLIA_URL,OPTIMISM_SEPOLIA_URL. - Deploy examples:
npx hardhat run --network sepolia scripts/deploy.jsnpx hardhat run --network amoy scripts/deploy.js
- Mainnet:
-
Docker Compose:
docker compose up -duses.env. See.env.examplefor full entries.
-
Kubernetes:
- Update
k8s/secrets.example.yamlwithEVM_NETWORKSand per‑network vars; apply secrets then deployk8s/bridge-relayer.yaml.
- Update
-
Liquidity Incentives: Provide ongoing rewards for liquidity providers.
-
Merchant Adoption Programs: Incentivize businesses to accept your token as payment.
Our WebAssembly-powered frontend provides:
- Real-time token balance tracking
- Staking dashboard with yield calculators
- Governance interface for proposals
- Cross-chain bridge UI
- Mobile-responsive design
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | API health check |
/users |
POST | Create new user |
/users/:id |
GET | Get user details |
/transfer |
POST | Transfer tokens between users |
/stake |
POST | Stake tokens for rewards |
/unstake |
POST | Unstake tokens with rewards |
/airdrop/claim |
POST | Claim airdrop tokens |
/ai/verify-impact |
POST | Verify social impact with AI chatbots |
/ai/generate-nft-art |
POST | Generate Peace NFT art with AI |
/ai/detect-fraud |
POST | Detect fraudulent activities |
/ai/generate-meme |
POST | Generate AI-powered memes |
/iot/register-donation-box |
POST | Register a new smart donation box |
/iot/record-donation |
POST | Record a donation to a box |
/iot/register-wristband |
POST | Register an NFC wristband |
/iot/add-funds-wristband |
POST | Add funds to a wristband |
/iot/create-food-qr |
POST | Create a food distribution QR code |
/iot/claim-food-qr |
POST | Claim food using a QR code |
/web2/create-donation-widget |
POST | Create a social media donation widget |
/web2/generate-widget-html |
POST | Generate embeddable donation widget HTML |
/web2/process-social-donation |
POST | Process donation from widget |
/web2/process-youtube-tip |
POST | Process a YouTube tip transaction |
/web2/create-youtube-tip-config |
POST | Configure YouTube tipping options |
/web2/register-messaging-bot |
POST | Register a messaging platform bot |
/web2/process-bot-command |
POST | Process a bot command (generic) |
/web2/telegram/webhook |
POST | Telegram webhook (token-gated) |
/web2/discord/webhook |
POST | Discord webhook (token-gated) |
/game/complete-mission |
POST | Report mission completion (protected) |
/game/record-behavior |
POST | Record positive behavior for tokens |
/game/balance/:player_id |
GET | Query a player's in-game balance |
/game/register-mission |
POST | Register a peaceful mission (admin) |
/credit/register-ngo |
POST | Register an NGO partner to underwrite micro-loans |
/tokenomics/summary |
GET | Get parsed tokenomics & price model summary |
/credit/add-impact-event |
POST | Record a verified social impact event for scoring |
/credit/request-loan |
POST | Request a P-Coin-collateral micro-loan |
/credit/repay-loan |
POST | Repay an active micro-loan |
/credit/loan/:loan_id |
GET | Inspect a micro-loan |
/credit/score/:user_id |
GET | Query a user's credit score |
Join our vibrant community:
- Twitter: @PProjectCoin
- Telegram: P-Project Community
- Discord: P-Project Server
- Reddit: r/PProject
Marketing budgets and community programs are enforced on-chain and via the Rust services:
- Marketing Budget (5% supply): Tracks user-growth spend, schedules content, and enforces caps.
- Community Rewards (2% supply): Gamified rewards ledger for early adopters, protected from over-distribution.
- Organic Marketing: Logs community-persistent initiatives and prioritizes long-term trust.
- Influencer Strategy: Supports low-cost micro-influencer campaigns with budget approvals.
- Community DAO Fund: Proposals can request funds and only pass if there is quorum and DAO budget remains.
- Core token contract development
- API server implementation
- Database integration
- Basic web interface
- DAO governance launch
- Staking platform release
- Cross-chain bridge deployment
- Mobile app development
- Advanced Use Cases Implementation:
- AI + P-Coin Integration (Impact verification chatbots, Peace NFT art generation, Fraud detection)
- IoT + P-Coin Integration (Smart donation boxes, NFC wristbands, QR-code food distribution)
- Web2 Integration (Social media widgets, YouTube tips, Messaging platform bots)
- NFT marketplace integration
- DeFi yield farming pools
- AI-powered meme generator
- Layer 2 blockchain solution
P-Project prioritizes security through:
- Audited Code: Regular third-party security audits
- Liquidity Lock: LP tokens locked for 1-2 years
- Renounced Ownership: Optional for full decentralization
- Transparency Dashboard: Live token distribution and burn tracking
- Set required environment variables (see
.env.example) and copy to.env. - JWT auth is required for sensitive endpoints. Generate a token offline:
cargo run -p p-project-api --bin dev_token -- sub=<user_id_or_wallet> hours=24 role=admin- Use the token with
Authorization: Bearer <token>.
- Configure CORS with
CORS_ALLOWED_ORIGINSandCORS_ALLOW_CREDENTIALS. - Request guardrails (enabled by default): 128 concurrent requests, 30s timeout, 1MB body limit.
- Additional safety controls:
- Security headers: HSTS, X-Frame-Options, Referrer-Policy, CSP added to all responses.
- Admin IP allowlist: set
ADMIN_IP_ALLOWLIST(comma-separated) to restrict admin routes. - Token-gated webhooks: set
WEBHOOK_TOKENor per-platformTELEGRAM_WEBHOOK_TOKEN/DISCORD_WEBHOOK_TOKENand includeX-Webhook-Tokenheader or?token=query. - Compliance blocklists: set
WALLET_BLOCKLISTandUSERNAME_BLOCKLISTto prevent account creation and transfers involving blocked values.
Our mascot, Professor P, is the genius social scientist who accidentally created the most sophisticated social impact ecosystem ever conceived. With his sarcastic wit and community-first approach, he guides P-Project's development while keeping the fun in DeFi and the purpose in profit.
Our mascot
This project is licensed under the MIT License - see the LICENSE file for details.
We welcome contributions from the community! Please see our Contributing Guidelines for more information.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a pull request
For support, please open an issue on GitHub or contact us on our Telegram or Discord channels.
Proof of Impact – Powered by the People