Skip to content

Adrijan-Petek/RaiseFunds

Repository files navigation

RaiseFunds

RaiseFunds Logo

A decentralized crowdfunding platform empowering creators and donors through blockchain transparency and social engagement.

Live Demo License Stars

Features β€’ Architecture β€’ Quick Start β€’ API β€’ Contributing β€’ License


🌟 Overview

RaiseFunds is a cutting-edge decentralized crowdfunding platform that combines the power of blockchain technology with social media integration to create transparent, community-driven fundraising campaigns. Built on the Base network, it enables creators to launch campaigns and donors to contribute directly onchain, fostering trust through immutable transaction records and real-time progress tracking.

🎯 Mission

To democratize fundraising by providing creators with powerful tools to launch campaigns and donors with confidence through blockchain transparency, while building vibrant communities around meaningful causes.

πŸ“Š Current Status

MVP Release v1.0 - Production-ready with placeholder donation flow for optimal user experience testing. Full onchain donation implementation planned for v2.0.


✨ Features

πŸš€ Core Platform

  • Dual Currency Support: Create fundraisers and make donations in both ETH and USDC
  • Intuitive Campaign Creation: Streamlined form with rich metadata, cover images, and category selection
  • Real-time Progress Tracking: Dynamic progress bars with donation history and milestone visualization
  • Social Integration: One-click sharing to Farcaster with rich OpenGraph previews
  • Creator Updates: Multimedia update system to keep supporters engaged and informed
  • Advanced Moderation: Comprehensive reporting system with admin controls

πŸ’° Donation Experience

  • Multi-Currency Donations: Choose between ETH and USDC for contributions
  • Seamless Donation Flow: Placeholder system for testing UX with future onchain implementation
  • Personalized Contributions: Donor names, messages, and optional anonymity
  • Transaction Transparency: Complete donation history with status tracking and currency display
  • Automated Updates: Real-time fundraiser total calculations and progress synchronization

πŸ” Wallet & Identity

  • Multi-wallet Support: MetaMask, Rainbow, Coinbase Wallet, and WalletConnect integration
  • Auto-populated Beneficiary: Connected wallet automatically fills beneficiary address
  • Social Authentication: Farcaster login with seamless wallet connection
  • Name Resolution: ENS and Base name support for user identification
  • Secure Architecture: Built with Wagmi and Viem for robust blockchain interactions

🎨 User Experience

  • Responsive Design: Optimized for desktop, tablet, and mobile devices
  • Dark/Light Themes: Automatic theme detection with manual override
  • Professional Splash Screen: Engaging animated loading experience with theme-aware colors
  • Accessibility First: WCAG compliant with keyboard navigation and screen reader support
  • Performance Optimized: Fast loading with Next.js 16 and modern web standards

πŸ”§ Technical Excellence

  • Type Safety: Full TypeScript implementation with strict type checking
  • Modern Architecture: Next.js 16 App Router with server and client components
  • API-First Design: RESTful API with comprehensive documentation
  • Database Integration: PostgreSQL with optimized queries and data relationships
  • Image Management: Cloudinary integration for uploads, optimization, and CDN delivery

πŸ—οΈ Architecture

Technology Stack

Category Technology Purpose
Frontend Next.js 16, TypeScript, Tailwind CSS Modern React framework with type safety and utility-first styling
Backend Next.js API Routes, PostgreSQL Serverless API with relational database
Blockchain Base Network, Viem, Wagmi Ethereum L2 for fast, low-cost transactions
Authentication WalletConnect, Farcaster Auth Decentralized identity and social login
Media Cloudinary Image upload, optimization, and CDN delivery
UI/UX Custom Splash Screen, Favicon Professional branding and loading experience
Deployment Vercel Global CDN with automatic scaling

System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   User Client   β”‚    β”‚   Next.js App   β”‚    β”‚   PostgreSQL    β”‚
β”‚                 β”‚    β”‚                 β”‚    β”‚   Database      β”‚
β”‚ β€’ React SPA     │◄──►│ β€’ API Routes    │◄──►│ β€’ Fundraisers   β”‚
β”‚ β€’ Wallet Conn.  β”‚    β”‚ β€’ Server Comp.  β”‚    β”‚ β€’ Donations     β”‚
β”‚ β€’ Social Auth   β”‚    β”‚ β€’ Middleware    β”‚    β”‚ β€’ Users         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                       β”‚                       β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                 β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚   Base Network  β”‚
                    β”‚   (Ethereum L2) β”‚
                    β”‚                 β”‚
                    β”‚ β€’ Smart Contractsβ”‚
                    β”‚ β€’ Onchain Txns   β”‚
                    β”‚ β€’ Fund Vaults    β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

Prerequisites

  • Node.js 18.17.0 or later (20+ recommended)
  • PostgreSQL database (local or cloud)
  • Git for version control
  • Web3 Wallet for testing (MetaMask, etc.)

Installation

  1. Clone the repository

    git clone https://github.com/Adrijan-Petek/RaiseFunds.git
    cd RaiseFunds
  2. Install dependencies

    npm install
  3. Configure environment

    cp .env.example .env.local

    Edit .env.local with your configuration:

    # Database
    DATABASE_URL="postgresql://username:password@localhost:5432/raisefunds"
    
    # WalletConnect
    NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID="your-project-id"
    
    # Cloudinary (for image uploads)
    CLOUDINARY_CLOUD_NAME="your-cloud-name"
    CLOUDINARY_API_KEY="your-api-key"
    CLOUDINARY_API_SECRET="your-api-secret"
    
    # Farcaster (optional)
    NEXT_PUBLIC_FARCASTER_RELAY="https://relay.farcaster.xyz"
  4. Setup database

    # Generate Prisma client
    npx prisma generate
    
    # Push schema to database
    npx prisma db push
    
    # Optional: Seed with sample data
    npx prisma db seed
  5. Start development server

    npm run dev
  6. Open your browser

    Navigate to http://localhost:3000

πŸ§ͺ Testing

# Run test suite
npm test

# Run linting
npm run lint

# Type checking
npm run type-check

πŸ“– Usage Guide

For Campaign Creators

  1. Connect Wallet - Authenticate with your preferred Web3 wallet
  2. Create Campaign - Visit /new and complete the creation form
  3. Set Goals - Define funding targets and campaign details
  4. Share Widely - Use built-in social sharing to reach supporters
  5. Update Supporters - Post regular updates to maintain engagement

For Donors

  1. Browse Campaigns - Explore active fundraisers on the homepage
  2. Connect Wallet - Link your wallet for seamless donations
  3. Make Contribution - Choose amount and add personal message
  4. Track Impact - Follow campaign progress and creator updates
  5. Share Support - Amplify campaigns you believe in

For Developers

  • API Testing - Use Postman or similar tools for endpoint testing
  • Database Management - Access Prisma Studio with npx prisma studio
  • Code Quality - Run npm run lint and npm run type-check
  • Build Process - Execute npm run build for production optimization

πŸ”Œ API Reference

Authentication

POST /api/auth/login

Wallet-based authentication for user sessions.

Fundraisers

GET    /api/fundraisers           # List fundraisers with filtering
POST   /api/fundraisers           # Create new fundraiser
GET    /api/fundraisers/[id]      # Get fundraiser details
PUT    /api/fundraisers/[id]      # Update fundraiser (creator only)
DELETE /api/fundraisers/[id]      # Delete fundraiser (creator only)

Donations

POST   /api/fundraisers/[id]/donate  # Create donation record
POST   /api/donations/verify         # Verify and confirm donation
POST   /api/donations/[id]/confirm   # Mark donation as paid

Updates

GET    /api/fundraisers/[id]/updates # Get fundraiser updates
POST   /api/fundraisers/[id]/updates # Add new update

Moderation

POST   /api/reports               # Report fundraiser
GET    /api/admin                 # Get reports (admin only)
POST   /api/admin                 # Moderate content (admin only)

Media Upload

POST   /api/upload                # Upload images to Cloudinary

API Documentation: Comprehensive OpenAPI/Swagger docs available at /api/docs


πŸ“ Project Structure

raisefunds/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                     # Next.js App Router
β”‚   β”‚   β”œβ”€β”€ api/                # API route handlers
β”‚   β”‚   β”œβ”€β”€ admin/              # Admin dashboard pages
β”‚   β”‚   β”œβ”€β”€ f/[id]/             # Dynamic fundraiser pages
β”‚   β”‚   β”œβ”€β”€ me/                 # Creator dashboard
β”‚   β”‚   β”œβ”€β”€ new/                # Campaign creation
β”‚   β”‚   └── globals.css         # Global styles
β”‚   β”œβ”€β”€ components/             # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ Header.tsx          # Navigation component
β”‚   β”‚   β”œβ”€β”€ WalletConnect.tsx   # Wallet connection modal
β”‚   β”‚   β”œβ”€β”€ ThemeToggle.tsx     # Theme switcher
β”‚   β”‚   └── ui/                 # Base UI components
β”‚   └── lib/                    # Utility libraries
β”‚       β”œβ”€β”€ supabase.ts         # Database client
β”‚       β”œβ”€β”€ cloudinary.ts       # Media upload service
β”‚       └── payments.ts         # Blockchain utilities
β”œβ”€β”€ public/                     # Static assets
β”‚   β”œβ”€β”€ icons/                  # Wallet and UI icons
β”‚   └── logo/                   # Brand assets
β”œβ”€β”€ prisma/                     # Database schema
β”‚   β”œβ”€β”€ schema.prisma           # Database models
β”‚   └── migrations/             # Schema migrations
β”œβ”€β”€ tailwind.config.js          # Styling configuration
β”œβ”€β”€ next.config.js              # Next.js configuration
└── package.json                # Dependencies and scripts

πŸš€ Deployment

Vercel (Recommended)

  1. Connect Repository

    • Link your GitHub repository to Vercel
    • Configure build settings (automatically detected)
  2. Environment Variables

    • Set all required environment variables in Vercel dashboard
    • Enable preview deployments for pull requests
  3. Domain Configuration

    • Configure custom domain (optional)
    • Set up SSL certificates (automatic)

Manual Deployment

# Build for production
npm run build

# Start production server
npm start

Docker Deployment

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]

πŸ—ΊοΈ Roadmap

βœ… Phase 1: MVP (Current)

  • Campaign creation and management
  • Dual currency support (ETH/USDC)
  • Placeholder donation system
  • Social sharing integration
  • Responsive UI/UX with dark/light themes
  • Professional splash screen and branding
  • Wallet integration and auto-population
  • Database architecture with PostgreSQL
  • Image upload and management with Cloudinary

🚧 Phase 2: Onchain Integration (Q1 2025)

  • Smart contract development for Base network
  • Real ETH/USDC donation processing
  • Multi-token support expansion
  • Gas optimization and transaction efficiency
  • Onchain progress tracking

🎯 Phase 3: Advanced Features (Q2 2025)

  • Milestone-based fund releases
  • Advanced analytics dashboard
  • Mobile application (React Native)
  • Cross-platform sharing enhancements
  • Email notifications and updates

🌟 Phase 4: Ecosystem Expansion (Q3 2025)

  • Farcaster Frames v2 integration
  • NFT rewards and collectibles system
  • DAO governance features
  • Multi-chain support (Optimism, Arbitrum)
  • DeFi integrations and yield opportunities

🀝 Contributing

We welcome contributions from developers, designers, and community members passionate about decentralized crowdfunding.

Getting Started

  1. Fork the repository
  2. Clone your fork locally
  3. Create a feature branch: git checkout -b feature/amazing-feature
  4. Make your changes with tests
  5. Commit with clear messages: git commit -m 'Add amazing feature'
  6. Push to your branch: git push origin feature/amazing-feature
  7. Open a Pull Request

Development Guidelines

  • Code Style: Follow TypeScript and React best practices
  • Testing: Write tests for new features and bug fixes
  • Documentation: Update README and API docs for changes
  • Security: Follow Web3 security best practices
  • Accessibility: Ensure WCAG compliance for all features

Areas for Contribution

  • Smart Contracts: Solidity development for onchain functionality
  • UI/UX: Design improvements and user experience enhancements
  • Testing: Comprehensive test coverage and QA automation
  • Documentation: API docs, user guides, and developer resources
  • Internationalization: Multi-language support and localization

πŸ“„ License

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


⚠️ Disclaimer

RaiseFunds is not a verified charity platform. Users should independently verify the legitimacy of fundraisers before contributing. The platform does not guarantee fund utilization or campaign validity. Exercise caution and conduct due diligence when participating in crowdfunding activities.


πŸ“ž Support & Community


Built with ❀️ for the decentralized future

Empowering creators, connecting donors, building communities

Releases

No releases published

Packages

 
 
 

Contributors