Inspiration

We noticed a massive divide in how college students handle money. On one hand, they use clunky group expense apps to split rent and road trips. On the other hand, student innovators struggle to raise funds for hardware prototypes because traditional crowdfunding platforms are too expensive and heavily geared toward businesses. We wanted to solve the student finance paradox by building one unified financial platform that handles both the everyday math of splitting a bill and the ambitious goal of funding the future.

What it does

GroupFund AI is a dual-engine financial collaboration platform:

  • Module A: Group Expenses. Track shared trips, dinners, and hostel bills. Users can scan receipts using Gemini AI, split bills equally or by custom percentages, and view exact settlements using a custom Min-Cash-Flow algorithm.
  • Module B: Innovation Crowdfunding. Student teams can launch hardware and software projects. Backers can contribute funds via PayPal Sandbox, track project milestones, and view AI-analyzed progress reports.
  • Unified AI Assistant: A Gemini-powered copilot that summarizes trip expenses, explains who owes what, or helps draft grant proposals.

How we built it

  • Frontend: Next.js 16 (App Router), TypeScript, Tailwind CSS, Framer Motion for cinematic 3D scroll animations.
  • Backend & State: Next.js API routes, Supabase (PostgreSQL), and React Context for robust state management.
  • Payments: PayPal REST API (Orders v2 Sandbox). We implemented server-side order creation, dynamic return_url handling, and secure capture.
  • AI: Google Gemini 2.5 Flash. Used for multimodal OCR (receipt scanning), proposal generation, and milestone risk analysis.

Challenges we ran into

  1. PayPal India Restrictions: PayPal India no longer supports domestic INR transactions. To solve this, we built a dual-currency bridge. We charge the user in USD at a fixed demo exchange rate, but pass the exact INR paise amount in the custom_id payload. When the server captures the order, the project's INR ledger is updated accurately.
  2. Exact Money Math: We completely eliminated floating-point errors by storing all currency strictly as integer paise (1 INR = 100 paise). If ₹100 is split 3 ways, our algorithm assigns 3334, 3333, and 3333 paise to ensure the sum is mathematically exact: $$ \sum_{i=1}^{n} \text{share}_i = \text{total_paise} $$
  3. Payment Idempotency: We implemented strict server-side checks. If a user refreshes the page after paying, the app intercepts the ORDER_ALREADY_CAPTURED error, returns an HTTP 409 Conflict, and gracefully updates the UI without double-charging.

Accomplishments that we're proud of

  • Min-Cash-Flow Algorithm: We wrote a custom greedy graph algorithm that reduces a complex web of group debts. Instead of everyone paying everyone, the algorithm calculates the net balances and repeatedly settles the largest debtor against the largest creditor, reducing the number of transactions from (O(N^2)) to at most (N-1).
  • Zero Float Drift: Every financial calculation is mathematically perfect down to the exact paise.
  • Robust AI Fallbacks: The app runs flawlessly even if the Gemini API key is missing or rate-limited, using intelligent structured mock fallbacks so the UI never crashes.

What we learned

We gained deep hands-on experience with payment gateway architecture, webhook verification, and the nuances of cross-border currency handling. We also learned how to build resilient AI features that enhance the user experience without becoming a single point of failure.

What's next for GroupFund AI

  • PayPal Payouts: Automating milestone disbursements directly to student bank accounts once a milestone is approved.
  • University Integrations: Partnering with college incubators to offer official campus micro-grants.
  • Reputation Scores: Building a verified founder credential system based on successfully funded and completed projects.

Built With

Share this project:

Updates

Submission history