SnapDrop Offline · Product Requirement Document

This is a Phase 1 product specification. Its requirements, proposed metrics and future roadmap are presented as written in the source.

هذه وثيقة متطلبات للمرحلة الأولى. تُقرأ المتطلبات والمقاييس المقترحة والخطة المستقبلية بوصفها محتوى الوثيقة الأصلية.

Page 1 · Offline sharing objective, sender and receiver, and session initiation

هدف المشاركة دون اتصال، المرسل والمستلم وبدء جلسة المشاركة

Product Requirement Document

Project: SnapDrop Offline (Tap-and-Send) • Phase 1 Core

1. Overview & Objective

SnapDrop Offline enables zero-cloud peer-to-peer file sharing directly from the native system share sheet. The sender taps "Share," spawning an ephemeral local hotspot, and broadcasts credentials via NFC. The receiver automatically connects and downloads the payload via a captive portal without any app installation.

2. User Personas

The Sender (Host)

Wants to send large files instantly without relying on active internet access, Bluetooth pairing friction, or cloud data limits. Initiates via Android native share menu.

The Receiver (Cross-Platform)

Wants to receive files seamlessly without the friction of app stores. Needs a pure native flow utilizing standard OS-level Wi-Fi and NFC triggers.

3. Functional Requirements

3.1 System Integration & Initiation

Source footer: SnapDrop Offline - PRD · Page 1 of 2

Page 2 · Local hosting, NFC handover, teardown and technical architecture

الشبكة المحلية والتسليم عبر NFC وإنهاء الجلسة والبنية التقنية

3.2 Local Network & File Serving

3.3 NFC Handover & Connection

3.4 Teardown & Lifecycle

4. Technical Architecture

ComponentTechnology StackResponsibility
Share InterfaceShareTarget / BottomSheetIntercepts standard system files and renders session UI.
Hotspot EngineLocalOnlyHotspot APISpawns unmetered, isolated local Wi-Fi without cell data.
Web ServerKtor Embedded / NanoHTTPDHosts the HTML UI and streams binary files to client.
NFC ServiceHostApduService (HCE)Broadcasts Wi-Fi connection payload to tapping devices.

5. Constraints

Security & Privacy Imperatives

Generate unique WPA credentials for every session. The local server and file streams must be destroyed from system memory immediately following a successful transfer or timeout.

Source footer: SnapDrop Offline - PRD · Page 2 of 4

Page 3 · Connection and transfer failures, and the four-step interface flow

أخطاء الاتصال والنقل وخطوات الواجهة من المشاركة إلى الإغلاق

6. Error Handling & Edge Cases

ScenarioSystem BehaviorUser Mitigation
Location OffHotspot API fails immediately (Android OS requirement).Prompt user to enable device location services.
Port 8080 BlockedServer fails to bind to the local interface.Auto-retry binding on sequential ports (8081, 8082).
NFC Handover FailsReceiver taps but no connection is initiated.Fallback to on-screen QR code scanning.
Transfer InterruptedClient drops off network before file finishes.Keep server alive for 3 mins to allow reconnect and resume.
Storage Full (Receiver)Browser download silently fails or truncates.Pre-check file size and display warning on UI if possible.

7. User Interface Flow

1. The Share Menu

User selects a file from the gallery and taps "Share". SnapDrop appears as a native target alongside standard apps.

2. Initialization Overlay

A bottom sheet appears. A spinner indicates the OS is provisioning the unmetered Wi-Fi hotspot and binding the HTTP server.

3. Ready State

The screen turns green with a prominent NFC tap icon and a fallback QR code displaying the network credentials.

4. Delivery & Cleanup

Upon HTTP 200 OK completion, the UI updates to a checkmark. Resources are torn down and the overlay dismisses itself.

Source footer: SnapDrop Offline - PRD · Page 3 of 4

Page 4 · Success metrics, deferred telemetry and the future roadmap

مؤشرات القياس والنقل المؤجل للبيانات وخطة المراحل اللاحقة

8. Success Metrics & Telemetry

Because SnapDrop is an offline-first, zero-cloud application, telemetry is batched locally and sent only when the host device regains standard internet connectivity. Key metrics include:

9. Future Roadmap (Phase 2+)

The core Phase 1 implementation handles single-file 1:1 transfers. Subsequent iterations will expand the capabilities of the protocol:

Open Source Release Candidate

This implementation will be documented and open-sourced under the MIT license, acting as a reference architecture for Android developers building localized, offline peer-to-peer sharing solutions.

Source footer: SnapDrop Offline - PRD · Page 4 of 4

دراسة المشروع بالعربية