Here is the complete copy-paste ready text in your exact requested format:
## Inspiration
In bustling subway stations, basement food courts, and crowded merchant checkout counters, mobile networks frequently drop to zero bars. That moment of friction is where traditional finance apps collapse: payments stall, loading spinners freeze, and expense trackers fail to register what you just spent.
Later, users are forced to manually reconcile transactions from fragmented bank SMS notifications. We wanted to eliminate this friction entirely by designing an app around the **"Airplane Mode Subway Test"**: an offline-first payment and expense intelligence system that guarantees instant checkout and zero-delay ledger tracking even when completely disconnected from the cloud.
## What it does
HulyPay is a zero-latency, offline-first personal financial intelligence platform built across three synchronized tiers:
- **0ms On-Device Logging:** Records every payment immediately to a local SQLite database with zero network dependencies and zero loading spinners.
- **Dynamic Amount-Injection Scanner:** Parses paper merchant UPI QR codes, takes the user's custom amount input, and dispatches directly into Google Pay or PhonePe via native Android intents—bypassing sluggish system sharesheets.
- **GPS Geotagging & Smart Auto-Categorization:** Captures device coordinates at the exact moment of payment and categorizes expenses (Dining, Transit, Groceries, Shopping) instantly.
- **Instant Local Analytics:** Recalculates today's spend gauges, category donut charts, and burn-rate velocity directly on the device in real time.
- **Resilient Cloud Synchronization:** Automatically detects network restoration and flushes batched offline records (`synced=false`) to the cloud backend.
- **Synchronized Web Companion:** A companion web dashboard providing live multi-device ledger views and visual analytics as soon as transactions sync.
## How we built it
HulyPay was engineered with a robust three-tier architecture:
1. **Mobile Client (Flutter & Dart):** Powered by an on-device SQLite database (`sqflite`) for relational storage, `mobile_scanner` for camera QR ingestion, custom Android MethodChannels (`com.hulypay/share_image`) for native UPI gateway intents, `geolocator` for GPS coordinate capture, and `fl_chart` for OLED dark-mode visualizations.
2. **Backend API Gateway (Java 21 & Spring Boot 4):** Exposes secured REST endpoints (`/api/v1/payments`, `/api/v1/analytics`), performs QR matrix synthesis via Google ZXing, and handles batch transaction persistence to PostgreSQL via Spring Data JPA.
3. **Cloud Persistence (PostgreSQL via Supabase):** Provides the centralized, relational source of truth for reconciled transactions and multi-device access.
4. **Desktop Web Companion (Next.js 16 & React 19):** Styled with Tailwind CSS 4 and animated with GSAP and Lenis, rendering synchronized transaction tables and Recharts analytics.
## Challenges we ran into
- **Bypassing the Android Sharesheet Delay:** Standard Android intent sharesheets introduce annoying delays and extra taps. We had to build a custom native MethodChannel to directly format and inject the target UPI URI (`upi://pay?pa=...&pn=...&am=...`) into primary payment apps without intermediate chooser dialogs.
- **Strict Offline-First State Synchronization:** Avoiding race conditions when transactions are logged offline in SQLite while cloud sync triggers in the background. We solved this by designing a clear state queue (`synced=false` -> batch payload -> 200 OK -> `synced=true`) with rollback resilience.
- **Zero-Latency UI Rendering:** Ensuring real-time visual charts (burn-rate gauge and category donuts) updated immediately upon checkout without waiting for database I/O or background network syncs.
## Accomplishments that we're proud of
- **Passing the Airplane Mode Subway Test:** The app can scan, calculate, geotag, and commit transactions to storage with the device completely offline, updating charts in under 10ms.
- **Seamless 3-Tier Synchronization:** Connecting a native Flutter mobile app, an enterprise Spring Boot 4 backend, and a modern Next.js 16 web dashboard into a unified, zero-conflict data flow.
- **Distraction-Free OLED Dark UI:** Crafting a cohesive, high-contrast visual design across 6 mobile screens that highlights financial numbers cleanly without clutter.
## What we learned
- **The Power of Local-First Design:** Shifting the source of truth to the local device fundamentally improves UX—speed is a feature, and zero network calls during user interaction eliminates user anxiety.
- **Deep Android Platform Channel Plumbing:** Gained a deep understanding of Android intent filters, UPI deep link specifications, and cross-framework platform channels.
- **Full-Stack Schema Cohesion:** Harmonized data contracts across Dart SQLite models, Java Jakarta Validation entities, and Next.js React components.
## What's next for HulyPay
- **On-Device Receipt OCR:** Local edge ML model to parse paper receipt photos and automatically itemize split bills offline.
- **Peer-to-Peer Bluetooth Mesh Sync:** Enable offline group expense splitting and settlement between nearby phones before internet connectivity is restored.
- **Predictive Burn-Rate Warnings:** Proactive on-device alerts when discretionary spending velocity is pacing to exceed monthly budget limits.
Log in or sign up for Devpost to join the conversation.