A decentralized payment platform built for MotusDAO, featuring seamless wallet integration, Mental Health Profesoinals (PSM-Profesional de la Salud Mental in Spanish) management, service provider and client database, AI-powered chat assistance, and Transak on/off ramp integration for fiat-to-crypto conversions. The platform supports both traditional web3 wallet connections and Farcaster Mini App integration for enhanced user experience.
- Multi-Wallet Support: Seamless integration with traditional web3 wallets and Farcaster Mini Apps
- PSM Management: Browse and manage Mental Health Professionals
- Smart Account Integration: Account abstraction for enhanced security
- AI Chat Dashboard: Intelligent assistant for platform guidance
- Payment Processing: Secure on-chain payment handling
- Fiat On/Off Ramp: Transak integration for seamless fiat-to-crypto conversions
- User Management: Comprehensive user profiles and settings
- Responsive Design: Modern UI optimized for all devices
- Framework: Next.js 15 with App Router
- Authentication: Privy for wallet authentication
- Smart Accounts: ZeroDev for account abstraction
- Blockchain: Ethereum/Celo with Viem
- Styling: Tailwind CSS with custom design system
- Database: Prisma with PostgreSQL
- AI Integration: OpenAI/Anthropic (configurable)
- Farcaster Integration: Mini App SDK with Wagmi
- On/Off Ramp: Transak for fiat-crypto conversions
- Node.js 18+
- npm, yarn, pnpm, or bun
- Git
-
Clone the repository
git clone <repository-url> cd DePayments
-
Install dependencies
npm install # or yarn install # or pnpm install
-
Environment Configuration Create a
.env.local
file in the root directory:# Privy Configuration NEXT_PUBLIC_PRIVY_APP_ID=your_privy_app_id NEXT_PUBLIC_PRIVY_CLIENT_ID=your_privy_client_id # ZeroDev Configuration ZERODEV_PROJECT_ID=your_zerodev_project_id # Database DATABASE_URL="postgresql://username:password@localhost:5432/depayments" # AI Service Configuration (Optional) OPENAI_API_KEY=your_openai_api_key ANTHROPIC_API_KEY=your_anthropic_api_key # Farcaster Mini App (Optional) FARCASTER_DEVELOPER_MNEMONIC=your_developer_mnemonic # Transak Configuration (Optional) NEXT_PUBLIC_TRANSAK_API_KEY=your_transak_api_key NEXT_PUBLIC_TRANSAK_ENVIRONMENT=sandbox # or production
-
Database Setup
npx prisma generate npx prisma db push
-
Run the development server
npm run dev # or yarn dev # or pnpm dev
-
Open your browser Navigate to http://localhost:3000
The platform supports Farcaster Mini App integration for seamless wallet interaction:
-
Install Farcaster dependencies
npm install @farcaster/miniapp-wagmi-connector wagmi
-
Configure Wagmi provider The platform automatically detects if it's running as a Mini App and configures the appropriate wallet connector.
-
Wallet Interaction Users can interact with their Ethereum wallets without wallet selection dialogs when running as a Mini App.
The platform integrates Transak for seamless fiat-to-crypto conversions:
-
Install Transak dependencies
npm install @transak/transak-sdk
-
Configure Transak
- Get API keys from Transak Dashboard
- Set environment variables for API key and environment
- Configure supported networks and currencies
-
Features
- Buy crypto with fiat (credit/debit cards, bank transfers)
- Sell crypto for fiat
- Support for multiple payment methods
- KYC/AML compliance built-in
- Real-time exchange rates
-
ZeroDev Configuration
- Create a project at ZeroDev
- Add your project ID to environment variables
- Configure your preferred validation methods
-
Account Abstraction Features
- Gasless transactions
- Batch operations
- Social recovery options
DePayments/
βββ src/
β βββ app/
β β βββ api/ # API routes
β β β βββ psms/ # Mental Health Professional management
β β β βββ users/ # User management
β β β βββ ai-chat/ # AI chat endpoints
β β βββ components/ # Reusable components
β β β βββ Sidebar.tsx # Navigation sidebar
β β β βββ Topbar.tsx # Top navigation
β β β βββ DepositModal.tsx # Deposit functionality
β β βββ providers/ # Context providers
β β β βββ AccountAbstraction.tsx # Smart account provider
β β βββ psms/ # Mental Health Professional browsing page
β β βββ psms-register/ # Mental Health Professional registration
β β βββ wallet/ # Wallet management
β β βββ payments/ # Payment processing
β β βββ profile/ # User profile
β β βββ current-hire/ # Current hire management
β β βββ ai-chat/ # AI chat dashboard
β βββ lib/ # Utility functions
β β βββ prisma.ts # Database client
β βββ generated/ # Generated files
βββ prisma/ # Database schema
β βββ schema.prisma
βββ public/ # Static assets
βββ package.json
- Browse available Mental Health Professionals
- Register new Mental Health Professional services
- Manage PSM relationships and appointments
- Process payments for mental health services
- Account abstraction for enhanced UX
- Gasless transaction support
- Batch operation capabilities
- Social recovery mechanisms
- Intelligent platform assistance
- Training data management
- Model configuration options
- Conversation history
- Traditional web3 wallet connections
- Farcaster Mini App integration
- Automatic wallet detection
- Seamless switching between modes
- Buy crypto with fiat currencies
- Sell crypto for fiat currencies
- Multiple payment methods support
- KYC/AML compliance
- Real-time exchange rates
- Global coverage with local payment options
- Connect your repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push to main branch
The app can be deployed to any platform supporting Next.js:
- Netlify
- Railway
- DigitalOcean App Platform
- AWS Amplify
- Environment Variables: Never commit sensitive keys to version control
- Smart Account Security: Use proper validation methods
- Database Security: Implement proper access controls
- API Security: Validate all inputs and implement rate limiting
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: Check the inline code comments and this README
- Issues: Report bugs and feature requests via GitHub Issues
- Discussions: Join community discussions for questions and ideas
- Dependencies: Regularly update packages for security patches
- Database: Run migrations as needed with
npx prisma migrate dev
- Environment: Keep environment variables updated with latest services
Built with β€οΈ for the MotusDAO community