A modern creator monetization platform for receiving tips, setting fundraising goals, and managing withdrawals seamlessly.
- β
Custom Profile Pages - Personalized pages with your username (e.g.,
tipcup.adedeji.xyz/yourname) - β Fundraising Goals - Set and track progress toward financial goals
- β Multiple Support Tiers - Create custom tip amounts with emojis and descriptions
- β Bank Account Management - Add multiple bank accounts, set primary accounts
- β Automated Withdrawals - Instant withdrawals to Nigerian bank accounts via Flutterwave
- β Earnings Dashboard - Track total earnings, current balance, and transaction history
- β Withdrawal History - Complete audit trail of all payouts
- β Quick & Easy Payments - Support creators with just a few clicks
- β Secure Transactions - Powered by Flutterwave's secure payment gateway
- β Custom Messages - Send personalized messages with your tips
- β Goal Contributions - Help creators reach their fundraising goals
- Nuxt 4 - The Intuitive Vue Framework
- Vue 3 - Composition API with
<script setup> - Tailwind CSS - Utility-first CSS framework
- Headless UI - Unstyled, accessible UI components
- Chart.js - Beautiful charts for analytics
- Lucide Icons - Clean, customizable icons
- Firebase Auth - User authentication
- Firestore - Real-time NoSQL database
- Firebase Admin SDK - Server-side operations
- Flutterwave - Payment gateway and transfers
- Payment initialization & verification
- Bank account resolution
- Automated transfers/withdrawals
- Webhook handling
Before you begin, ensure you have:
- Node.js (v18 or higher)
- npm or yarn
- Firebase Project (Create one here)
- Flutterwave Account (Sign up here)
git clone https://github.com/devadedeji/tipcup.git
cd tipcupnpm install
# or
yarn installCreate a .env file in the root directory:
# Firebase Configuration
FIREBASE_API_KEY=your_firebase_api_key
FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
FIREBASE_PROJECT_ID=your_project_id
FIREBASE_STORAGE_BUCKET=your_project.appspot.com
FIREBASE_MESSAGING_SENDER_ID=your_sender_id
FIREBASE_APP_ID=your_app_id
# Firebase Admin SDK (Server-side)
FIREBASE_SERVICE_ACCOUNT={"type":"service_account","project_id":"..."}
# Flutterwave
FLUTTERWAVE_SECRET_KEY=your_flutterwave_secret_key
FLUTTERWAVE_SECRET_HASH=your_webhook_secret_hashπ Note: Get your Firebase Service Account JSON from Firebase Console β Project Settings β Service Accounts β Generate New Private Key
Copy the security rules from firestore_rules.md artifact and apply them in Firebase Console:
- Go to Firestore Database β Rules
- Paste the rules
- Publish
Create a composite index for payments:
- Collection:
payments - Fields:
toUserId(Ascending),createdAt(Descending)
Create a composite index for withdrawals:
- Collection:
withdrawals - Fields:
userId(Ascending),createdAt(Descending)
npm run devVisit http://localhost:4444 π
npm run buildnpm run preview- Push your code to GitHub
- Import project on Vercel
- Add environment variables in Vercel dashboard
- Deploy! π
tipcup/
βββ app/
β βββ components/
β β βββ dashboard/ # Dashboard-specific components
β β β βββ BankModal.vue
β β β βββ GoalModal.vue
β β β βββ WithdrawalModal.vue
β β β βββ ...
β β βββ ui/ # Reusable UI components
β β βββ Button.vue
β β βββ Input.vue
β β βββ Select.vue
β β βββ Table.vue
β β βββ ...
β βββ composables/ # Vue composables
β β βββ useAuth.ts
β β βββ useBankDetails.ts
β β βββ usePayments.ts
β β βββ useWithdrawals.ts
β βββ layouts/ # App layouts
β β βββ default.vue
β β βββ dashboard.vue
β βββ pages/ # File-based routing
β β βββ [username].vue # Creator profile page
β β βββ dashboard/
β β β βββ index.vue
β β β βββ earnings.vue
β β βββ login.vue
β β βββ signup.vue
β β βββ onboarding.vue
β βββ utils/ # Utility functions
β βββ format.ts
β βββ cn.ts
βββ server/
β βββ api/
β β βββ flutterwave/ # Flutterwave API endpoints
β β βββ banks.get.ts
β β βββ initialize.post.ts
β β βββ verify.post.ts
β β βββ resolve-account.post.ts
β β βββ withdraw.post.ts
β β βββ webhook.post.ts
β βββ utils/
β βββ admin.ts # Firebase Admin SDK
β βββ flutterwave.ts # Flutterwave utilities
βββ public/ # Static assets
βββ firebase.ts # Firebase client config
βββ nuxt.config.ts # Nuxt configuration
User clicks "Support" β Flutterwave Checkout β Payment Success β
Webhook updates Firestore β Dashboard shows transaction
Creator requests withdrawal β Backend validates balance β
Flutterwave transfers to bank β Withdrawal record created β
Balance updated
- Uses Flutterwave's account resolution API
- Verifies account number and bank code
- Returns account holder name for confirmation
- Test Mode: Only Access Bank (044) supported with test keys
- Bank: Access Bank
- Bank Code: 044
- Account Number: 0690000031
- Account Name: Pastor Bright
β οΈ Important: Flutterwave test environment only allows bank code044for account resolution. Use production keys to test with all banks.
- β Webhook signature verification implemented
- β Firestore security rules enforce user permissions
- β Server-side validation for all transactions
- β Firebase Admin SDK used for privileged operations
- β Environment variables for sensitive credentials
- β Debounced search in Select component (150ms)
- β Limited render for large option lists (max 100 items)
- β Real-time listeners for payments and withdrawals
- β Paginated tables for transaction history
- β Lazy-loaded components where applicable
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- 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
This project is licensed under the MIT License.