A comprehensive platform combining AI-powered peer review with blockchain transparency and token incentives for academic research.
peerai/
βββ frontend/ # React + TypeScript frontend
βββ backend/ # NestJS + MongoDB API
βββ contracts/ # Hardhat smart contracts
βββ README.md # This file
- Node.js (v18 or higher)
- MongoDB (local or Atlas)
- Ethereum wallet with testnet ETH
- API keys: OpenAI, Alchemy, Etherscan
cd frontend
npm install
npm run devAccess: http://localhost:5173
cd backend
npm install
cp .env.example .env
# Update .env with your configuration
npm run start:devAccess:
- API: http://localhost:3001
- Documentation: http://localhost:3001/api/docs
cd contracts
npm install
cp .env.example .env
# Update .env with your keys
npm run compile
npm test
npm run deploy:sepoliaVITE_API_URL=http://localhost:3001
VITE_CONTRACT_ADDRESS=0x...
VITE_NETWORK=sepoliaMONGODB_URI=mongodb://localhost:27017/peerai
JWT_SECRET=your-jwt-secret
OPENAI_API_KEY=your-openai-key
ALCHEMY_API_KEY=your-alchemy-key
ETHERSCAN_API_KEY=your-etherscan-key
PEERAI_TOKEN_ADDRESS=0x...
PEERAI_CORE_ADDRESS=0x...PRIVATE_KEY=your-private-key
ALCHEMY_API_KEY=your-alchemy-key
ETHERSCAN_API_KEY=your-etherscan-key
NETWORK=sepolia- Modern UI: React + TypeScript + Tailwind CSS + shadcn/ui
- Wallet Integration: MetaMask and Web3 wallet support
- Manuscript Submission: File upload with IPFS integration
- Review Dashboard: Browse and manage peer reviews
- User Profiles: Academic profiles with reputation scores
- Real-time Updates: Live status tracking
- RESTful API: NestJS with comprehensive endpoints
- Authentication: JWT-based wallet authentication
- Database: MongoDB with Mongoose schemas
- AI Integration: OpenAI for automated review generation
- File Storage: IPFS integration for decentralized storage
- Documentation: Swagger/OpenAPI documentation
- PeerAIToken: ERC-20 token for platform rewards
- PeerAICore: Main platform contract
- Reputation System: On-chain reputation scoring
- Token Rewards: Automated token distribution
- Anti-Gaming: Prevents self-review and manipulation
POST /auth/wallet-connect- Connect walletGET /auth/profile- Get user profile
POST /manuscripts- Submit manuscriptGET /manuscripts- List manuscriptsGET /manuscripts/:id- Get manuscript details
POST /reviews- Submit reviewGET /reviews- List reviewsPOST /reviews/ai/:id- Generate AI review
POST /blockchain/submit-manuscript- Record on-chainPOST /blockchain/reward-tokens- Issue rewards
rewardReviewer(address, string)- Reward reviewerrewardAuthor(address, string)- Reward authorcustomReward(address, uint256, string)- Custom rewards
registerUser(...)- Register usersubmitManuscript(...)- Submit manuscriptsubmitReview(...)- Submit reviewgetUserProfile(address)- Get user stats
cd frontend
npm testcd backend
npm test
npm run test:e2ecd contracts
npm test
npm run test:coverage# Start all services
npm run dev:all# Deploy contracts
cd contracts && npm run deploy:sepolia
# Deploy backend
cd backend && npm run build && npm run start:prod
# Deploy frontend
cd frontend && npm run build- Sepolia Testnet (Recommended)
- Goerli Testnet (Legacy)
- Mumbai Testnet (Polygon)
- Local Hardhat (Development)
- Frontend Documentation
- Backend API Documentation
- Smart Contracts Documentation
- API Documentation (when running)
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
This project is licensed under the MIT License.
For support and questions:
- Create an issue on GitHub
- Check the documentation
- Join our community Discord
Built with β€οΈ for the decentralized science community