Skip to content

Starr365/engipay

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

EngiPay - Next-Gen Web3 Payments & DeFi Super App

EngiPay Logo

Revolutionizing Finance: Where Everyday Payments Meet DeFi Power

A revolutionary Web3 super app that combines everyday payments with powerful DeFi tools, built on StarkNet for maximum security and scalability. EngiPay bridges the gap between traditional finance and decentralized protocols, making advanced financial tools accessible to everyone.

πŸ“‹ Table of Contents


🎯 Problem Statement

The Current Financial Landscape Crisis

Traditional Finance Problems:

  • ⏰ Slow Transactions: Bank transfers take days, international payments weeks
  • πŸ’° High Fees: 2-10% on international transfers, hidden banking fees
  • πŸ”’ Limited Access: 1.7 billion unbanked people worldwide
  • πŸ“Š Poor Financial Inclusion: Complex banking requirements exclude millions
  • 🌍 Geographic Barriers: Cross-border payments are expensive and slow

Crypto/DeFi Problems:

  • πŸ“ˆ High Volatility: Cryptocurrency price swings create uncertainty
  • 🧠 Steep Learning Curve: Complex interfaces scare away mainstream users
  • πŸ”„ Fragmented Experience: Users need multiple apps for different functions
  • πŸ’± Poor UX: Most DeFi apps are built for developers, not everyday users
  • 🏦 No Banking Integration: Crypto and traditional finance remain separate worlds

The Missing Link

What users really need:

  • βœ… Simple payments like Venmo or Cash App
  • βœ… Investment tools like Robinhood or Wealthfront
  • βœ… Banking features like checking accounts and transfers
  • βœ… All in one app with a familiar, intuitive interface

What they get instead:

  • ❌ Complex DeFi protocols requiring technical knowledge
  • ❌ Fragmented experiences across multiple apps
  • ❌ High volatility without risk management tools
  • ❌ Poor user experience designed for crypto natives only

πŸ’‘ Solution

EngiPay: The Financial Super App

EngiPay is a Web3 super app that makes advanced DeFi tools as simple as mobile banking.

Core Innovation: "Lifestyle Finance"

We combine:

  • πŸ“± Simple Payments - Send money like texting
  • πŸ’° DeFi Power Tools - Earn yields, stake tokens, access liquidity
  • β‚Ώ Bitcoin Integration - Direct BTC support via Xverse
  • πŸ”„ Cross-Chain Swaps - Seamless BTC ↔ ETH/STRK via Atomiq
  • 🏦 Banking Features - Portfolio tracking, transaction history, analytics

Technical Innovation

Built on StarkNet for:

  • ⚑ 1000x faster than Ethereum mainnet
  • πŸ’° $0.01 transaction costs vs $10-50 on Ethereum
  • πŸ”’ Military-grade security with zero-knowledge proofs
  • 🌍 Global accessibility with instant finality

User Experience Innovation

"Mobile Banking Meets DeFi":

  • 🎯 Familiar Interface - Looks and feels like modern banking apps
  • πŸš€ Progressive Disclosure - Start simple, unlock advanced features
  • πŸ“Š Real-Time Insights - Live portfolio tracking and analytics
  • πŸ›‘οΈ Risk Management - Built-in protections and educational tools

πŸ‘₯ Target Audience

Primary Users: "Digital Natives" (Ages 18-35)

Profile:

  • πŸ“± Tech-Savvy Millennials/Gen Z
  • πŸ’Ό Early-career professionals in tech, finance, creative industries
  • 🌍 Global citizens working remotely or internationally
  • πŸ’° Income range: $30K-$150K annually
  • 🏠 Urban/suburban dwellers in major cities

Pain Points:

  • ❌ Expensive international transfers for global work
  • ❌ Complex crypto apps they can't understand
  • ❌ Traditional banking fees eating into savings
  • ❌ No easy way to earn interest on savings

Goals:

  • βœ… Save money on transfers and payments
  • βœ… Learn about DeFi without complexity
  • βœ… Build wealth through smart investing
  • βœ… Stay connected with friends globally

Secondary Users: "Traditional Finance Migrants" (Ages 35-55)

Profile:

  • πŸ’Ό Established professionals in business, healthcare, education
  • πŸ’° Higher income with investment portfolios
  • 🏠 Family-oriented with financial responsibilities
  • πŸ“ˆ Seeking better returns than traditional savings

Pain Points:

  • ❌ Low interest rates on savings accounts
  • ❌ High management fees from financial advisors
  • ❌ Complex investment options requiring expertise
  • ❌ Time-consuming portfolio management

Tertiary Users: "Emerging Markets"

Profile:

  • 🌍 Users in developing countries with limited banking access
  • πŸ’° Remittance recipients and senders
  • πŸ“± Mobile-first users with smartphone access
  • 🎯 Price-sensitive with focus on low fees

πŸš€ Key Features

πŸ’³ Payment Features

  • ⚑ Instant P2P Payments - Send money instantly to anyone
  • πŸͺ Merchant Payments - Pay businesses with crypto or fiat
  • πŸ“± QR Code Payments - Scan to pay anywhere
  • πŸ”„ Payment Requests - Request money from contacts
  • πŸ“Š Payment Analytics - Track spending and income patterns

β‚Ώ Bitcoin Integration

  • πŸ”— Direct BTC Support - Send/receive Bitcoin natively
  • πŸ‘› Xverse Wallet Integration - Seamless BTC wallet connection
  • 🎨 Ordinals Support - NFT and inscription trading
  • πŸ’° BRC-20 Tokens - Access to Bitcoin-based tokens

πŸ”„ DeFi Features

  • πŸ’± Cross-Chain Swaps - BTC ↔ ETH/STRK via Atomiq SDK
  • 🌾 Yield Farming - Earn rewards by providing liquidity
  • 🏦 Lending & Borrowing - Earn interest or borrow assets
  • 🎯 Staking - Stake tokens for governance and rewards
  • πŸ“ˆ Portfolio Tracking - Real-time balance monitoring

πŸ›‘οΈ Security & Compliance

  • πŸ” Non-Custodial - Users control their own funds
  • πŸ›‘οΈ Smart Contract Audits - Professional security reviews
  • πŸ“‹ KYC/AML Ready - Compliance framework for regulated markets
  • πŸ”’ Multi-Sig Protection - Advanced security for large transactions

πŸ“Š Analytics & Insights

  • πŸ“ˆ Portfolio Analytics - Performance tracking and reporting
  • πŸ’‘ DeFi Opportunities - Personalized yield farming recommendations
  • πŸ“Š Spending Insights - Transaction categorization and trends
  • 🎯 Risk Assessment - Portfolio risk analysis and recommendations

πŸ—οΈ Architecture

System Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Frontend      β”‚    β”‚   Backend API   β”‚    β”‚   Smart         β”‚
β”‚   (Next.js)     │◄──►│   (Node.js)     │◄──►│   Contracts     β”‚
β”‚                 β”‚    β”‚                 β”‚    β”‚   (StarkNet)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                       β”‚                       β”‚
         β–Ό                       β–Ό                       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   User Wallet   β”‚    β”‚   Database      β”‚    β”‚   DeFi          β”‚
β”‚   (MetaMask/    β”‚    β”‚   (PostgreSQL)  β”‚    β”‚   Protocols     β”‚
β”‚    Xverse)      β”‚    β”‚                 β”‚    β”‚                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Technology Stack

Frontend Layer

  • Framework: Next.js 15 with App Router
  • Language: TypeScript for type safety
  • Styling: Tailwind CSS with custom design system
  • State Management: React Context + custom hooks
  • Web3 Integration: ethers.js, starknet.js

Backend Layer

  • Runtime: Node.js with Express.js
  • Database: PostgreSQL with Sequelize ORM
  • Authentication: JWT with wallet signature verification
  • Caching: Redis for performance optimization
  • API: RESTful with GraphQL for complex queries

Smart Contracts Layer

  • Blockchain: StarkNet (Ethereum L2)
  • Language: Cairo
  • Standards: ERC20, custom DeFi protocols
  • Security: OpenZeppelin-inspired libraries

Data Flow

  1. User Interaction β†’ Frontend captures user actions
  2. Wallet Signing β†’ Transactions signed by user's wallet
  3. API Processing β†’ Backend validates and processes requests
  4. Database Updates β†’ Transaction data stored persistently
  5. Smart Contract Execution β†’ On-chain state changes
  6. Event Indexing β†’ Blockchain events indexed for analytics
  7. UI Updates β†’ Real-time updates via WebSocket/polling

πŸ› οΈ Tech Stack

Frontend Framework

  • Next.js 15.5.3 - React framework with App Router
  • React 18 - UI library with concurrent features
  • TypeScript - Type-safe JavaScript for reliability

Styling & UI

  • Tailwind CSS 4.1.9 - Utility-first CSS framework
  • Tailwind Animate - Smooth animations and transitions
  • Geist Font - Modern typography system
  • Radix UI - Accessible component primitives
  • Lucide React - Beautiful, consistent iconography

Web3 Integration

  • starknet.js - StarkNet blockchain interaction
  • ethers.js - Ethereum compatibility
  • @sats-connect/core - Xverse wallet integration
  • @atomiqlabs/sdk - Cross-chain swap functionality

Backend & Database

  • Node.js - Server runtime
  • Express.js - API framework
  • PostgreSQL - Primary database
  • Sequelize - Database ORM
  • Redis - Caching and session management
  • JWT - Authentication tokens

Development Tools

  • ESLint - Code quality enforcement
  • Prettier - Code formatting
  • Husky - Git hooks for quality gates
  • Jest - Testing framework
  • Cypress - End-to-end testing

πŸ“± User Journey

Onboarding Flow

  1. Discovery β†’ User finds EngiPay via app store or referral
  2. Wallet Connection β†’ Choose from MetaMask, ArgentX, Braavos, or Xverse
  3. Profile Setup β†’ Basic KYC if required for region
  4. Tutorial β†’ Interactive walkthrough of key features
  5. First Transaction β†’ Guided experience sending money

Daily Usage Flow

  1. Open App β†’ Instant portfolio overview
  2. Check Balances β†’ Real-time ETH, USDT, USDC, BTC balances
  3. Make Payment β†’ Send money to friend or pay merchant
  4. DeFi Actions β†’ Stake tokens, provide liquidity, claim rewards
  5. Track Performance β†’ View portfolio growth and analytics

Advanced Usage Flow

  1. Portfolio Management β†’ Rebalance assets across protocols
  2. Yield Optimization β†’ Find best farming opportunities
  3. Cross-Chain Activities β†’ Swap BTC to ETH for DeFi
  4. Governance β†’ Vote on protocol decisions
  5. Analytics Review β†’ Deep dive into performance metrics

πŸ”’ Security

Multi-Layer Security Approach

1. Smart Contract Security

  • Formal Verification - Mathematical proofs of contract correctness
  • Professional Audits - Third-party security reviews
  • Bug Bounty Program - Community-driven security testing
  • Upgrade Mechanisms - Secure contract upgrade patterns

2. User Security

  • Non-Custodial Design - Users control their own private keys
  • Transaction Simulation - Preview transactions before signing
  • Spending Limits - Configurable daily/weekly limits
  • Emergency Pause - User-controlled transaction pausing

3. Platform Security

  • Rate Limiting - Protection against spam and abuse
  • Input Validation - Comprehensive data sanitization
  • Encryption - End-to-end encryption for sensitive data
  • Monitoring - Real-time security monitoring and alerting

Compliance & Regulation

  • KYC/AML Framework - Ready for regulated markets
  • GDPR Compliance - European data protection standards
  • Transaction Monitoring - Suspicious activity detection
  • Regulatory Reporting - Automated compliance reporting

πŸ“Š Business Model

Revenue Streams

1. Transaction Fees (Primary)

  • Payment Fees: 0.5-1% on P2P and merchant payments
  • Swap Fees: 0.3% on cross-chain swaps
  • Network Fees: Share of StarkNet transaction fees

2. DeFi Protocol Fees

  • Yield Farming Fees: 10-20% of farming rewards
  • Lending Fees: Portion of interest payments
  • Staking Rewards: Share of staking incentives

3. Premium Features

  • Advanced Analytics: Subscription-based premium insights
  • Priority Support: VIP customer support
  • White-label Solutions: B2B API access

4. Token Economics

  • ENGI Token: Governance and utility token
  • Staking Rewards: Token distribution to active users
  • Liquidity Mining: Rewards for providing liquidity

Market Opportunity

  • Global Payments Market: $2.2T annual transaction volume
  • Cross-border Payments: $200B with 5-10% fee reduction opportunity
  • DeFi Market: $100B+ TVL with user experience improvements
  • Emerging Markets: 1.7B unbanked people seeking financial inclusion

Competitive Advantages

  • User Experience: Banking app simplicity with DeFi power
  • Multi-Chain Support: BTC + ETH + StarkNet ecosystem
  • Security: StarkNet's battle-tested security
  • Cost Efficiency: Near-zero transaction fees
  • Developer Ecosystem: Rich API and integration options

πŸ—ΊοΈ Roadmap

Phase 1: MVP Launch (Q4 2024)

  • βœ… Core payment functionality
  • βœ… Basic DeFi features (staking, swaps)
  • βœ… Wallet integrations (MetaMask, Xverse)
  • βœ… Mobile-responsive web app
  • βœ… StarkNet smart contracts

Phase 2: DeFi Expansion (Q1 2025)

  • πŸ”„ Advanced yield farming strategies
  • πŸ”„ Lending and borrowing protocols
  • πŸ”„ Portfolio analytics dashboard
  • πŸ”„ Multi-asset portfolio tracking
  • πŸ”„ Cross-chain bridge integrations

Phase 3: Enterprise Features (Q2 2025)

  • 🏒 Merchant payment solutions
  • 🏒 Business API for integrations
  • 🏒 Advanced compliance features
  • 🏒 White-label solutions
  • 🏒 Institutional-grade security

Phase 4: Global Expansion (Q3-Q4 2025)

  • 🌍 Multi-language support
  • 🌍 Regional regulatory compliance
  • 🌍 Local payment integrations
  • 🌍 Emerging market optimizations
  • 🌍 Global merchant network

Phase 5: Ecosystem Building (2026)

  • πŸ—οΈ Governance token launch
  • πŸ—οΈ Developer platform and APIs
  • πŸ—οΈ Third-party integrations
  • πŸ—οΈ Mobile app development
  • πŸ—οΈ Institutional partnerships

🀝 Contributing

We welcome contributions from the community! Here's how to get involved:

Development Setup

  1. Fork and Clone

    git clone https://github.com/your-username/engipay.git
    cd engipay
  2. Install Dependencies

    npm install
    cd smart-contracts && npm install
    cd ../backend && npm install
  3. Environment Setup

    cp .env.example .env.local
    # Edit with your configuration
  4. Start Development

    npm run dev          # Frontend
    npm run backend-dev  # Backend

Contribution Guidelines

  • Code Style: Follow our ESLint and Prettier configurations
  • Testing: Write tests for new features
  • Documentation: Update docs for API changes
  • Security: Follow our security guidelines
  • Commits: Use conventional commit format

Types of Contributions

  • πŸ› Bug Fixes: Report and fix issues
  • ✨ Features: Implement new functionality
  • πŸ“š Documentation: Improve docs and guides
  • 🎨 UI/UX: Enhance user interface and experience
  • πŸ§ͺ Testing: Add test coverage
  • 🌐 Internationalization: Add language support

πŸ“ž Contact

Team

  • CEO & Founder: [Your Name]
  • CTO: [Technical Lead]
  • Head of Product: [Product Manager]

Community

  • Discord: [Join our community]
  • Twitter: [@engi_pay]
  • Telegram: [EngiPay Official]
  • GitHub: [Issues and Discussions]

Business Inquiries

Support


πŸ™ Acknowledgments

Technology Partners

  • StarkNet - Revolutionary L2 blockchain infrastructure
  • Atomiq - Cross-chain swap protocol
  • Xverse - Bitcoin wallet integration
  • Chipi Pay - Payment processing SDK

Open Source

  • Next.js - The React framework for production
  • Tailwind CSS - A utility-first CSS framework
  • shadcn/ui - Beautifully designed components
  • ethers.js - Complete Ethereum library

Community

  • StarkNet Ecosystem - Amazing developer community
  • DeFi Community - Pioneers pushing financial innovation
  • Web3 Community - Building the decentralized future

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸš€ Join us in revolutionizing finance. The future of money is here.

Built with ❀️ by the EngiPay Team on StarkNet

πŸš€ Features

  • ⚑ Instant Payments: P2P & Merchant payments powered by Chipi-Pay SDK
  • πŸ”„ Cross-Chain Swaps: Seamless BTC ↔ STRK/ETH via Atomiq SDK
  • β‚Ώ Bitcoin Ready: Direct Bitcoin integration via Xverse Wallet API
  • πŸ’° DeFi Power Tools: Lending, borrowing, yield farming, and staking
  • πŸ“Š Real Wallet Balances: Live display of actual ETH, USDT, and USDC balances
  • πŸ”— Seamless Navigation: Easy access between dashboard and DeFi features
  • πŸ”Œ Wallet Management: Connect/disconnect wallets with persistent sessions
  • 🏠 Seamless Navigation: Easy switching between home page and dashboard when logged in
  • πŸ”’ Enterprise Security: Built on StarkNet's zero-knowledge rollup technology
  • πŸ“± Mobile-First: Responsive design with smooth animations

πŸ› οΈ Tech Stack

Frontend Framework

  • Next.js 15.5.3 - React framework with App Router
  • React 18 - UI library
  • TypeScript - Type-safe JavaScript

Styling & UI

  • Tailwind CSS 4.1.9 - Utility-first CSS framework
  • Tailwind Animate - Animation utilities
  • Geist Font - Modern typography
  • Radix UI - Accessible component primitives
  • Lucide React - Beautiful icons

Development Tools

  • ESLint - Code linting
  • PostCSS - CSS processing
  • Autoprefixer - CSS vendor prefixing

Key Dependencies

  • @vercel/analytics - Web analytics
  • class-variance-authority - Component variant utilities
  • clsx - Conditional CSS classes
  • tailwind-merge - Tailwind class merging

πŸ“ Project Structure

engipay/
β”œβ”€β”€ smart-contracts/              # Smart contract analysis and development
β”‚   β”œβ”€β”€ contracts/                # Cairo smart contracts
β”‚   β”‚   β”œβ”€β”€ Escrow.cairo          # Payment escrow contract
β”‚   β”‚   β”œβ”€β”€ EngiToken.cairo       # Governance token contract
β”‚   β”‚   └── RewardDistributor.cairo # Reward distribution contract
β”‚   β”œβ”€β”€ hardhat.config.js         # StarkNet development configuration
β”‚   β”œβ”€β”€ package.json              # Smart contract dependencies
β”‚   β”œβ”€β”€ README.md                 # Smart contract requirements analysis
β”‚   β”œβ”€β”€ AUDIT_GUIDE.md            # Smart contract audit preparation guide
β”‚   └── contracts-analysis.md     # Detailed contract specifications
β”œβ”€β”€ TESTING_GUIDE.md             # Comprehensive testing guide for entire platform
β”œβ”€β”€ backend/                      # Backend API server
β”‚   β”œβ”€β”€ routes/                   # API route handlers
β”‚   β”‚   β”œβ”€β”€ auth.js              # Authentication endpoints
β”‚   β”‚   β”œβ”€β”€ users.js             # User management
β”‚   β”‚   β”œβ”€β”€ portfolio.js         # Portfolio tracking
β”‚   β”‚   β”œβ”€β”€ transactions.js      # Transaction handling
β”‚   β”‚   β”œβ”€β”€ defi.js              # DeFi operations
β”‚   β”‚   β”œβ”€β”€ swaps.js             # Token swaps
β”‚   β”‚   β”œβ”€β”€ payments.js          # Payment services
β”‚   β”‚   β”œβ”€β”€ chipipay.js          # Chipi Pay integration
β”‚   β”‚   β”œβ”€β”€ analytics.js         # Analytics endpoints
β”‚   β”‚   └── webhooks.js          # Webhook handlers
β”‚   β”œβ”€β”€ middleware/               # Express middleware
β”‚   β”‚   └── auth.js              # Authentication middleware
β”‚   β”œβ”€β”€ server.js                # Main server file
β”‚   β”œβ”€β”€ package.json             # Backend dependencies
β”‚   β”œβ”€β”€ .env                     # Backend environment variables
β”‚   └── README.md                # Backend documentation
β”œβ”€β”€ app/                          # Next.js App Router
β”‚   β”œβ”€β”€ about/                    # About page
β”‚   β”‚   └── page.tsx
β”‚   β”œβ”€β”€ dashboard/                # Main dashboard
β”‚   β”‚   └── page.tsx
β”‚   β”œβ”€β”€ defi/                     # DeFi management page
β”‚   β”‚   └── page.tsx
β”‚   β”œβ”€β”€ faq/                      # FAQ page
β”‚   β”‚   └── page.tsx
β”‚   β”œβ”€β”€ features/                 # Features page
β”‚   β”‚   └── page.tsx
β”‚   β”œβ”€β”€ profile-page/             # User profile page
β”‚   β”‚   └── page.tsx
β”‚   β”œβ”€β”€ technology/               # Technology page
β”‚   β”‚   └── page.tsx
β”‚   β”œβ”€β”€ globals.css               # Global styles
β”‚   β”œβ”€β”€ layout.tsx                # Root layout
β”‚   └── page.tsx                  # Landing page
β”œβ”€β”€ components/                   # Reusable components
β”‚   β”œβ”€β”€ ui/                       # UI components (shadcn/ui)
β”‚   β”‚   β”œβ”€β”€ button.tsx
β”‚   β”‚   β”œβ”€β”€ card.tsx
β”‚   β”‚   β”œβ”€β”€ loader.tsx           # Custom loader components
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ dashboard/                # Dashboard components
β”‚   β”‚   β”œβ”€β”€ DashboardHeader.tsx
β”‚   β”‚   β”œβ”€β”€ DashboardNavigation.tsx
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ defi/                     # DeFi components
β”‚   β”‚   β”œβ”€β”€ portfolio-overview.tsx
β”‚   β”‚   β”œβ”€β”€ yield-farming.tsx
β”‚   β”‚   β”œβ”€β”€ lending-borrowing.tsx
β”‚   β”‚   β”œβ”€β”€ claim-rewards.tsx
β”‚   β”‚   └── profile-settings.tsx
β”‚   β”œβ”€β”€ payments/                 # Payment components
β”‚   β”‚   └── ServicePurchase.tsx   # Chipi Pay service purchase
β”‚   β”œβ”€β”€ theme-provider.tsx       # Theme provider
β”‚   └── WalletConnectModal.tsx   # Wallet connection modal
β”œβ”€β”€ contexts/                     # React contexts
β”‚   β”œβ”€β”€ WalletContext.tsx         # Wallet connection context
β”‚   └── ChipiPayContext.tsx       # Chipi Pay integration context
β”œβ”€β”€ hooks/                        # Custom React hooks
β”‚   β”œβ”€β”€ use-mobile.ts
β”‚   └── use-toast.ts
β”œβ”€β”€ lib/                          # Utility libraries
β”‚   └── utils.ts                  # Utility functions
β”œβ”€β”€ public/                       # Static assets
β”‚   β”œβ”€β”€ placeholder-logo.png
β”‚   β”œβ”€β”€ placeholder-logo.svg
β”‚   └── ...
β”œβ”€β”€ styles/                       # Additional styles
β”‚   └── globals.css
β”œβ”€β”€ next.config.mjs              # Next.js configuration
β”œβ”€β”€ package.json                 # Frontend dependencies & scripts
β”œβ”€β”€ tailwind.config.js           # Tailwind configuration
β”œβ”€β”€ tsconfig.json                # TypeScript configuration
β”œβ”€β”€ .env.local                   # Frontend environment variables
β”œβ”€β”€ CHIPIPAY_INTEGRATION.md      # Chipi Pay integration guide
β”œβ”€β”€ BACKEND_API_DOCUMENTATION.md # Backend API documentation
└── README.md                    # This file

πŸ—οΈ Architecture Overview

App Router Structure

  • File-based routing with Next.js 13+ App Router
  • Server Components for optimal performance
  • Client Components for interactivity (marked with "use client")

Component Architecture

  • Atomic Design: Small, reusable components
  • shadcn/ui: High-quality, accessible UI components
  • Custom Components: Project-specific components in /components

Styling Approach

  • Tailwind CSS: Utility-first styling
  • CSS Variables: Theme customization
  • Responsive Design: Mobile-first approach
  • Dark/Light Theme: Built-in theme support

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn package manager
  • Git for version control

Installation

  1. Clone the repository

    git clone <repository-url>
    cd engipay
  2. Install dependencies

    npm install
  3. Start development server

    npm run dev
  4. Open your browser

    http://localhost:3000
    

πŸ“œ Available Scripts

Command Description
npm run dev Start development server
npm run build Build for production
npm run start Start production server
npm run lint Run ESLint
npm run type-check Check TypeScript types

🎨 Design System

Colors

  • Primary: Purple gradient (from-purple-600 to-purple-700)
  • Secondary: Blue tones
  • Accent: Teal and green accents
  • Background: Cosmic gradient with floating orbs

Typography

  • Font Family: Geist Sans & Geist Mono
  • Headings: Bold, responsive sizing
  • Body: Clean, readable text

Components

  • Buttons: Glow effects, hover animations
  • Cards: Glassmorphism effect
  • Loaders: Custom animated spinners
  • Forms: Accessible form components

πŸ”§ Development Guidelines

Code Style

  • TypeScript: Strict type checking enabled
  • ESLint: Airbnb config with Next.js rules
  • Prettier: Consistent code formatting

Component Patterns

// Example component structure
interface ComponentProps {
  title: string
  children: React.ReactNode
}

export function Component({ title, children }: ComponentProps) {
  return (
    <div className="component-class">
      <h2>{title}</h2>
      {children}
    </div>
  )
}

File Naming

  • Components: PascalCase (Button.tsx, Card.tsx)
  • Utilities: camelCase (utils.ts, helpers.ts)
  • Pages: page.tsx (Next.js convention)
  • Styles: kebab-case (globals.css, components.css)

Import Order

// 1. React imports
import React from 'react'

// 2. Third-party libraries
import { useState } from 'react'

// 3. UI components
import { Button } from '@/components/ui/button'

// 4. Custom components
import { CustomComponent } from '@/components/CustomComponent'

// 5. Utilities
import { cn } from '@/lib/utils'

// 6. Types
import type { ComponentProps } from './types'

πŸ“± Page Structure

Landing Page (/)

  • Hero section with animated text
  • Feature cards with hover effects
  • Call-to-action buttons
  • Newsletter subscription
  • Footer with social links

Dashboard Page (/dashboard)

  • Real-time wallet balance display (ETH, USDT, USDC)
  • Portfolio overview with live balance cards
  • Recent activity feed
  • Quick action buttons
  • DeFi opportunities
  • Navigation tabs: Overview (internal), Payment & Swap (links to /payments-swaps), DeFi & Profile (links to /defi)

Payments & Swaps Page (/payments-swaps)

  • Payment options: Send, Request, QR scan, Merchant payments
  • Cross-chain token swaps with Atomiq SDK
  • Transaction history with filtering
  • Chipi Pay integration

DeFi Page (/defi)

  • Portfolio overview with charts and positions
  • Yield farming and staking pools
  • Lending and borrowing interface
  • Rewards claiming system
  • Profile settings management
  • Back button to dashboard

About Page (/about)

  • Company mission and values
  • Team information
  • Call-to-action for wallet connection

Features Page (/features)

  • Detailed feature descriptions
  • Interactive cards
  • Technology integrations

Technology Page (/technology)

  • Tech stack overview
  • Security features
  • Integration details

FAQ Page (/faq)

  • Expandable question/answer sections
  • Search functionality
  • Contact information

🎭 Animations & Interactions

Loader Components

  • LovelyLoader: Multi-layered spinning animation
  • Loader: Simple spinning border
  • PulseLoader: Three-dot pulsing animation

Page Transitions

  • Fade-in animations for content loading
  • Slide-in effects for smooth transitions
  • Hover animations for interactive elements

Responsive Design

  • Mobile-first approach
  • Breakpoint system: sm, md, lg, xl
  • Touch-friendly interactions

πŸ” Environment Variables

Create a .env.local file for environment variables:

# Example environment variables
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=your_project_id

πŸš€ Deployment

Vercel (Recommended)

  1. Connect your GitHub repository to Vercel
  2. Configure build settings:
    • Build Command: npm run build
    • Output Directory: .next
  3. Add environment variables
  4. Deploy!

Other Platforms

  • Netlify: Connect repo, set build command to npm run build
  • Railway: Connect repo, auto-detects Next.js
  • AWS Amplify: Connect repo, configure build settings

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Make your changes
  4. Run tests: npm run lint
  5. Commit your changes: git commit -m 'Add your feature'
  6. Push to the branch: git push origin feature/your-feature
  7. Open a Pull Request

Commit Convention

  • feat: New features
  • fix: Bug fixes
  • docs: Documentation updates
  • style: Code style changes
  • refactor: Code refactoring
  • test: Testing related changes

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ“ž Support

πŸ™ Acknowledgments

  • StarkNet - For the powerful L2 infrastructure
  • Next.js Team - For the amazing React framework
  • shadcn/ui - For the beautiful component library
  • Tailwind CSS - For the utility-first CSS framework

Built with ❀️ by the EngiPay Team

Powering Lifestyle Finance on StarkNet

About

( web3 Team)EngiPay - Next-Gen Web3 Payments & DeFi Super App A revolutionary Web3 super app that combines everyday payments with powerful DeFi tools, built on StarkNet for maximum security and scalability.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 66.3%
  • JavaScript 26.9%
  • Cairo 4.4%
  • CSS 2.4%