YaniPay Platform Documentation
Complete guide to the YaniPay fintech super-app. Payments, loyalty programs, identity verification, multi-dashboard system, DeFi services, and 237+ API routes.
Overview
YaniPay is a comprehensive fintech super-app that combines digital payments, loyalty programs, identity verification (KYC), smart cards, and DeFi services into a single platform. Built on Next.js 16 with 237+ API routes across 3 distinct dashboard tiers. All write endpoints protected by rate limiting.
237+ API Routes
Comprehensive REST API covering payments, loyalty, KYC, billing, and more
3 Dashboards
Particulier, Professionnel, and Admin with RBAC protection
Production Secure
NextAuth.js v5, JWT, 139/139 write routes rate-limited, CSP headers, HMAC webhooks
Platform Features
YaniPay provides a complete fintech ecosystem with six major feature areas:
Payments & Cards
Stripe integration, virtual/physical cards, transaction management, and merchant payments
Loyalty Programs
Points, cashback, referral system, rewards store, and merchant loyalty tools
Identity (KYC)
Onfido-powered verification, document upload, admin review workflow
Billing & Subscriptions
Stripe Billing, subscription plans, invoices, and customer portal
Multi-Dashboard
3-tier dashboard system with role-based access for users, pros, and admins
DeFi Services
Staking, DEX, farming, and DAO governance powered by YaniChain
MCP Server (AI)
14 MCP tools to connect any LLM to wallets, KYC, loyalty, crypto, and financial advisory
Multi-Dashboard System
YaniPay features a 3-tier dashboard system, each tailored to specific user roles with dedicated routing groups and RBAC middleware:
Particulier
40+ pagesConsumer dashboard with Vision360, transactions, loyalty, DeFi hub, trading bots, and entertainment
Professionnel
14+ pagesMerchant tools, loyalty programs, client management, analytics, and business settings
Administration
15+ pagesUser management, KYC review, monitoring, global statistics, and system configuration
Architecture
YaniPay is built with modern technologies for optimal performance, security, and developer experience:
// Frontend
Framework: Next.js 16 with App Router
Language: TypeScript (strict mode)
UI: React 19 + Tailwind CSS v4
Animations: Framer Motion + Three.js
Components: Radix UI + Flowbite
// Backend
API: 237+ REST API Routes (139 rate-limited)
Auth: NextAuth.js v5 + JWT (RBAC)
Security: 139/139 write endpoints rate-limited
Database: PostgreSQL via Prisma ORM
Payments: Stripe (Checkout, Billing, Cards)
KYC: Onfido (Document + Face verification)
AI: Google Gemini 2.0 Flash (YaniChat)
Validation: Zod schemas
// Dashboards (3 tiers)
Particulier: (dashboard) - 40+ pages, 5 nav groups
Professionnel: (pro) - 14+ pages, merchant tools
Admin: (admin) - 15+ pages, full platform control
// Blockchain (DeFi)
Network: YaniChain (custom L1)
Token: YANICoin (YANI) - 7B supply
Standards: YRC-20, ERC-20 compatible
Performance: 50,000+ TPS, 6s finalityGetting Started
Follow these steps to start building with YaniPay:
- Clone the repository:
git clone https://github.com/YaniPay/yanipay-animation.git cd yanipay-animation - Install dependencies:
pnpm install - Setup environment:
cp .env.local.example .env.local # Required: DATABASE_URL, NEXTAUTH_SECRET, JWT_SECRET # Optional: STRIPE_SECRET_KEY, ONFIDO_WEBHOOK_TOKEN, GEMINI_API_KEY - Initialize database:
npx prisma generate npx prisma db push - Start development server:
pnpm dev
Visit http://localhost:3000 to see your application running.
API Overview
YaniPay provides 237+ RESTful API endpoints organized across major categories:
Authentication API
Register, sign in, sessions, JWT tokens, OAuth providers
Payments API
Process payments, manage cards, Stripe checkout sessions
Loyalty API
Programs, rewards, referrals, points management
Identity API
KYC verification, document upload, Onfido webhooks
DeFi APIs
Wallets, staking, DEX, farming, governance, prices
Billing API
Subscriptions, invoices, Stripe Billing portal
Next Steps
Now that you understand the platform, explore these resources to dive deeper: