Skip to content

Commit 486a3dd

Browse files
committed
feat: implement mobile CI workflow and initialize website project structure with SEO and landing page components
1 parent 1b2cb02 commit 486a3dd

9 files changed

Lines changed: 528 additions & 10 deletions

File tree

.github/workflows/mobile-ci.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
name: Mobile CI
3+
4+
"on":
5+
push:
6+
branches: [ "main" ]
7+
paths:
8+
- 'lib/**'
9+
- 'android/**'
10+
- 'pubspec.yaml'
11+
- '.github/workflows/mobile-ci.yml'
12+
13+
jobs:
14+
build-and-release:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Java 17
23+
uses: actions/setup-java@v4
24+
with:
25+
distribution: temurin
26+
java-version: '17'
27+
28+
- name: Set up Flutter
29+
uses: subosito/flutter-action@v2
30+
with:
31+
channel: stable
32+
cache: true
33+
34+
- name: Install dependencies
35+
run: flutter pub get
36+
37+
- name: Build release APK
38+
run: flutter build apk --release
39+
40+
- name: Publish to GitHub Releases
41+
env:
42+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
43+
run: |
44+
# Delete existing v1.0.0 release if it exists to allow overwriting,
45+
# or we could keep it and just update assets.
46+
# Using --cleanup-tag ensures the tag is also refreshed.
47+
gh release delete v1.0.0 --cleanup-tag --repo $GITHUB_REPOSITORY --yes 2>/dev/null || true
48+
49+
# Rename the artifact to Peerchat.apk as requested
50+
mv build/app/outputs/flutter-apk/app-release.apk \
51+
build/app/outputs/flutter-apk/Peerchat.apk
52+
53+
# Create the release
54+
gh release create v1.0.0 \
55+
--repo $GITHUB_REPOSITORY \
56+
--title "PeerChat v1.0.0" \
57+
--notes "Production-grade P2P messenger and file transfer app. Built automatically." \
58+
build/app/outputs/flutter-apk/Peerchat.apk

others/TRACK_TASKS.md

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,201 @@
299299
- [x] Add "View" (Eye Icon) to `DirectTransferScreen` history items.
300300
- [x] Verify persistence after app uninstallation.
301301

302+
## Phase 42: Production-Grade P2P Hardening (Apr 10, 2026)
303+
- [x] Fix Mesh Router delivery leakage (only raw file packets on delivery).
304+
- [x] Implement True Sliding Window (unackedBase) & Symmetric Handshake.
305+
- [x] Re-align Priority (Control/ACK = High, Data = Low).
306+
- [x] Implement Metadata Validation & Path Sanitization.
307+
- [x] Fix Resume Persistence & Outgoing/Incoming recovery paths.
308+
- [x] Implement Transfer Queueing (sequential processing).
309+
- [x] Fix Subscription leaks in UI and Service.
310+
- [x] Link transfer activity to AppState (Discovery Throttling).
311+
## Phase 42: P2P Protocol Hardening & UX Fidelity (Apr 10, 2026)
312+
- [x] Implement Final ACK sync (Receiver confirms last chunk before verify).
313+
- [x] Switch to `FileMode.write` for safe out-of-order random-access writes.
314+
- [x] Add packet head/body bounds validation to prevent malformed crashes.
315+
- [x] Connect `AppState` discovery throttling to active transfer sessions.
316+
- [x] Implement smoothed MB/s throughput and real-time ETA calculation.
317+
- [x] lutter analyze verified successful implementation
318+
319+
## Phase 18: Full Architecture Implementation (Feb 23, 2026)
320+
### Phase 1: Mode Separation - DONE
321+
- [x] Created communication_mode.dart, added mode check + sendDirect + debounce + sender-prefixed IDs
322+
- [x] Strengthened peer identity persistence, deleted simple_message_service.dart
323+
- [x] flutter analyze: No issues found
324+
325+
### Phase 2: Mesh Queue Improvements - DONE
326+
- [x] Clock-independent expiryDuration on MeshMessage, exponential backoff, per-dest limit (50/peer)
327+
- [x] Route failure-rate pruning (>70%), DB v10 migration, getReadyMessages()
328+
- [x] flutter analyze: No issues found
329+
330+
### Phase 3: Controlled Lazy Flooding - DONE
331+
- [x] Forwarding fingerprint dedup, lazy flood to 2-3 random peers, forwardedTo tracking
332+
- [x] flutter analyze: No issues found
333+
334+
### Phase 4: File Transfer System - DONE
335+
- [x] Model, Service (sliding window, cumulative ACKs, SHA-256), DB v11
336+
- [x] Composition Root injection in AppState
337+
- [x] Protocol wiring (0xFE) in MeshRouterService
338+
339+
## Phase 20: Fix Priority Enum Inconsistency (Mar 2, 2026)
340+
- [x] Reordered `MessagePriority` enum from `high(0), normal(1), low(2)``low(0), normal(1), high(2)`
341+
- [x] Aligned enum indices with SQL `ORDER BY priority DESC` and debug screen color/label mappings
342+
- [x] Verified `routing_debug_screen.dart` and `queued_messages_status_screen.dart` priority displays are correct
343+
344+
## Phase 21: Release Versioning & CD (Mar 22, 2026)
345+
- [x] Update app display name to "PeerChat" across all platforms and UI
346+
- [x] Update app version to 1.0.0 for release
347+
- [x] Create `others/build_release.ps1` for automated build and naming (CD)
348+
- [x] Update README and documentation to reflect "PeerChat" branding
349+
- [x] Verify build configuration for release APK
350+
351+
## Phase 22: Branding & Identity (Mar 22, 2026)
352+
- [x] Extract color palette and theme details from `theme.dart`
353+
- [x] Generate logo design prompts for AI generation
354+
## Phase 23: Global Theme Harmonization (Mar 22, 2026)
355+
- [x] Audit all UI screens for hardcoded old palette colors (Teal/Cyan)
356+
- [x] Update `theme.dart` with vibrant blue and purple branding colors
357+
- [x] Refine `chat_screen.dart` bubble gradients to match new logo
358+
- [x] Replace hardcoded badge colors in `peers_screen.dart` with theme constants
359+
- [x] Verify theme consistency across all primary application views
360+
- [x] `flutter analyze`: 0 issues found
361+
362+
## Phase 24: UI/UX Refinement (Mar 22, 2026)
363+
- [x] Refined Home Screen: added "Your P2P Identity" tagline, softened QR glow, and made public key row tappable.
364+
- [x] Refined Chat Screen: implemented pill-style date separators and improved message input area.
365+
- [x] Refined Chats List Screen: added relative timestamps (e.g., "5m ago") and last message status icons (Sent/Received).
366+
- [x] Refined First Sign-In Screen: updated with welcoming copy, gradient Google button, and privacy info box.
367+
- [x] Refined Menu Screen: added branded header card and color-coded icons for better differentiation.
368+
- [x] Refined Bottom Navigation: added a subtle active indicator dot below the selected tab.
369+
- [x] `flutter analyze`: 0 issues found
370+
371+
## Phase 25: Project Metadata & Marketing (Mar 26, 2026)
372+
- [x] Generate premium project description card (project_description.md) matching portfolio UI style
373+
- [x] Define core value propositions and tech stack tags for PeerChat
374+
375+
## Phase 26: Unified Website Theme Integration (Apr 8, 2026)
376+
- [x] Extract colors from globals.css of website
377+
- [x] Update mobile heme.dart with new dark violet / ink palette
378+
379+
- [x] Removed mDNS (peerchat.local) resolution and switched to direct IP for better cross-device reliability.
380+
381+
- [x] Moved Web Share history to a dedicated, clearable screen with individual entry deletion.
382+
383+
- [x] Implemented Manual Upload Approval system with a secure handshake protocol and real-time pop-up alerts.
384+
385+
## Phase 27: Web Share UI Optimization (Apr 9, 2026)
386+
- [x] Compact Web Share main screen to fit within viewport.
387+
- [x] Move file management (Add/Remove) to History screen.
388+
- [x] Implement tabbed view in History (Files vs. Transfer Log).
389+
- [x] Differentiate active and finished transfers in history log.
390+
- [x] Refine instructions and update top-right icon to add-files symbol.
391+
- [x] Move action shortcuts to body and implement conditional "Add Files" button.
392+
393+
## Phase 28: Global Web Share Service (Apr 9, 2026)
394+
- [x] Globalize `WebShareService` via `AppState` (Provider-managed).
395+
- [x] Implement global listeners in `MainShell` for background alerts.
396+
- [x] Enable background cross-screen approval dialogs and success toasts.
397+
- [x] Decouple server lifecycle from the Web Share screen (server remains active in background).
398+
399+
## Phase 29: Direct Share & Crash Recovery (Apr 9, 2026)
400+
- [x] Re-implemented `FileTransferService` with chunk-based P2P sliding window protocol.
401+
- [x] Restored `file_transfers` table in `DBService` with bitmask-based crash recovery.
402+
- [x] Differentiated UI between "Web Transfer" (Browser) and "Direct Share" (Peer).
403+
- [x] Upgraded `IncomingApprovalDialog` with premium glassmorphic aesthetics and source badges.
404+
- [x] Implemented 30-day automatic history cleanup.
405+
- [x] Re-enabled Peer-to-Peer file sharing button in Chat Screen.
406+
## Phase 30: Web Share Modularization & UI Polish (Apr 9, 2026)
407+
- [x] Split file management and transfer log into separate screens (`WebShareHostedFilesScreen`, `WebShareLogScreen`).
408+
- [x] Rename "Shared Files" to "Hosted Files" for clearer host/receiver context.
409+
- [x] Implement Emerald Green success coloring for completed transfers in log.
410+
- [x] Refine "Start Sharing" button size and scale for better aesthetics.
411+
- [x] Sanitize navigation flow and remove obsolete tab-based screen.
412+
413+
## Phase 31: Build Stability & Transport Standardization (Apr 9, 2026)
414+
- [x] Implement binary-safe `encryptBytes`/`decryptBytes` in `CryptoService`.
415+
- [x] Standardize `MessageManager` for raw byte mesh payloads.
416+
- [x] Expose `onRawMessageReceived` in `MeshRouterService` for discrete sub-service communication.
417+
- [x] Resolve catastrophic build errors in `ChatScreen` and `WebShareLogScreen`.
418+
- [x] Verify project stability (0 errors in `flutter analyze`).
419+
420+
## Phase 32: Native MediaStore & Asset Picker (Apr 9, 2026)
421+
- [x] Implement Native MediaStore Bridge (Kotlin) for Images and Videos.
422+
- [x] Integrate "All Files Access" (MANAGE_EXTERNAL_STORAGE) handler for Android 11+.
423+
- [x] Replace slow directory scanning with 100x faster native queries.
424+
- [x] Add tabbed Asset Picker (Apps | Media | Files) with instant loading.
425+
426+
## Phase 33: Home Screen Compaction & Scaling (Apr 9, 2026)
427+
- [x] Design "Single Screen" layout for Home Screen to prevent scrolling.
428+
- [x] Implement Auto-Scaling Engine using `LayoutBuilder` and `FittedBox`.
429+
- [x] Convert Identity Section to horizontal header (Avatar next to Name).
430+
- [x] Reduce QR Code and spacing to fit all content on small viewports.
431+
- [x] Verify responsive scaling across different device heights.
432+
433+
## Phase 34: Website Content — WiFi Direct & Hotspot File Transfers (Apr 9, 2026)
434+
- [x] Update `HeroSection.tsx` subline to mention file transfers and all 3 transport types (BLE, WiFi Direct, WiFi Hotspot).
435+
- [x] Update `EmergenceSection.tsx` — add WiFi Hotspot to "Zero Infrastructure"; replace "Multi-Hop Routing" card with a dedicated "File Transfers" card.
436+
- [x] Update `SolutionSection.tsx` — "Resilient" card now mentions WiFi Hotspot + file transfers.
437+
- [x] Update `PropagationSection.tsx` — Step 01 "Discover" description includes WiFi Hotspot.
438+
- [x] Update `AccessSection.tsx` — "WiFi Direct & Hotspot file sharing" added as a free Independent plan feature.
439+
- [x] Verified Phase 34 Website Content updates — All sections match 1.0.0 branding and feature set.
440+
441+
## Phase 35: Hardware Isolation & Home Scaling (Apr 9, 2026)
442+
- [x] Implement `setWebShareIsolation` automatic lifecycle in `AppState`.
443+
- [x] Implement hardware suspension hooks across `DiscoveryService`, `MeshRouterService`, and `WiFiTransport`.
444+
- [x] Replace "Turbo Mode" UI with automated isolation logic for better UX.
445+
- [x] Finalize `HomeScreen` auto-scaling with `FittedBox` + Horizontal Identity layout.
446+
- [x] Cleanup: Replace `print` with `debugPrint` in `WebShareService.dart`.
447+
- [x] Verified Phase 35 Hardware Isolation & Home Scaling.
448+
449+
## Phase 36: Expert Asset Picking & Hardware Monitoring (Apr 9, 2026)
450+
- [x] Implement Native `getAppIcon` (128x128 PNG) in `MainActivity.kt`.
451+
- [x] Implement Native `BluetoothStateChannel` (EventChannel) in `MainActivity.kt`.
452+
- [x] Create `AppIconService` with a strict 50-item LRU memory budget.
453+
- [x] Integrate real-time Bluetooth status monitoring into `AppState`.
454+
- [x] Refine `WebShareAssetPicker` with custom skeleton loaders and staggered list entry.
455+
- [x] Implement lazy-loading native icons in `_AppTile` for zero scroll-jank.
456+
- [x] Design "Isolation Glow" pulsing indicator for Web Share dashboard.
457+
- [x] Add real-time hardware status mini-cards to `WebShareScreen`.
458+
- [x] `flutter analyze`: 0 issues found.
459+
460+
## Phase 37: Web Share Dashboard Hardening (Apr 10, 2026)
461+
- [x] Implement real hardware detection for Wi-Fi Hotspot (Native reflection + interface check).
462+
- [x] Integrate periodic 4-second status refresh for hardware indicators.
463+
- [x] Make hardware status cards actionable (Bluetooth toggle, Hotspot settings shortcut).
464+
- [x] Standardize hardware status text to simplified "ON/OFF" labels.
465+
- [x] Implement "Reliable Fallback" for Bluetooth: Tapping now opens system settings if programmatic toggle is restricted.
466+
- [x] Implement Amber warning highlight for unoptimized hardware states (e.g., BT still ON during isolation).
467+
- [x] Optimized dashboard layout for higher information density (Phase 2 Compaction).
468+
- [x] Refined visual feedback with correctly overlapping ripples (`Ink` widget).
469+
- [x] Added debug logging for hardware status interactions.
470+
471+
## Phase 38: P2P Transfer Dashboard & Unified Flow (Apr 10, 2026)
472+
- [x] Refactor `FileTransferService` to expose per-peer active sessions.
473+
- [x] Implement `DirectTransferScreen` with live progress bars and peer-specific history.
474+
- [x] Connect `ChatScreen` attachment pin to navigate to the new Transfer Dashboard.
475+
- [x] Implement "Add Files" action within the Dashboard to launch `WebShareAssetPicker`.
476+
- [x] Verify complete P2P transfer lifecycle visibility in the new UI.
477+
478+
## Phase 39: Enhanced Transfer Metrics & Management (Apr 10, 2026)
479+
- [x] Implement real-time speed calculation (MB/s) in `FileTransferService`.
480+
- [x] Add `abortTransfer`, `resumeTransfer`, and `deleteTransfer` methods.
481+
- [x] Update `DirectTransferScreen` with speed labels and action icons (X, Trash, Resume).
482+
- [x] Implement DB cleanup for deleted transfer records.
483+
484+
## Phase 40: High-Performance P2P Optimization (Apr 10, 2026)
485+
- [x] Increase chunk size to 256KB and implement persistent file handles.
486+
- [x] Implement Sliding Window (pipelining) for wait-free data transmission.
487+
- [x] Fix Sender-side state synchronization (Completed status mismatch).
488+
- [x] Verify speeds match or exceed Web Share performance.
489+
490+
## Phase 41: Absolute Root Storage & Internal Viewer (Apr 10, 2026)
491+
- [x] Add `open_file_plus` and `external_path` dependencies.
492+
- [x] Implement `MANAGE_EXTERNAL_STORAGE` permission request flow.
493+
- [x] Redirect `FileTransferService` to store files in `/PeerChat/Downloads` (External Root).
494+
- [x] Add "View" (Eye Icon) to `DirectTransferScreen` history items.
495+
- [x] Verify persistence after app uninstallation.
496+
302497
## Phase 42: Production-Grade P2P Hardening (Apr 10, 2026)
303498
- [x] Fix Mesh Router delivery leakage (only raw file packets on delivery).
304499
- [x] Implement True Sliding Window (unackedBase) & Symmetric Handshake.
@@ -318,3 +513,15 @@
318513
- [x] Implement recursive filename suffixing (e.g. `file (1).ext`) for collisions.
319514
- [x] Persist `file_hash` in DB for sender/receiver session recovery.
320515
- [x] Verify stable P2P throughput with background radio throttling.
516+
517+
## Phase 43: SEO & AI Optimization (Apr 12, 2026)
518+
- [x] Enrich `layout.tsx` metadata (OG, Twitter, Canonical)
519+
- [x] Implement JSON-LD Structured Data (`SoftwareApplication`, `FAQPage`)
520+
- [x] Create `sitemap.xml` and `robots.txt`
521+
- [x] Implement FAQ Section for AEO (Answer Engine Optimization)
522+
- [x] Update Hero CTA with direct download link for `v1.0.0/Peerchat.apk`
523+
- [x] Improve semantic HTML and ARIA labels across website
524+
525+
## Phase 44: CI/CD Automation (Apr 12, 2026)
526+
- [x] Create `.github/workflows/mobile-ci.yml` for automated releases
527+
- [x] Automate release tagging (v1.0.0) and APK renaming (Peerchat.apk)

website/public/robots.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# https://www.robotstxt.org/robotstxt.html
2+
User-agent: *
3+
Allow: /
4+
5+
Sitemap: https://peerchat.mathi.live/sitemap.xml

website/public/sitemap.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3+
<url>
4+
<loc>https://peerchat.mathi.live/</loc>
5+
<lastmod>2026-04-12</lastmod>
6+
<changefreq>monthly</changefreq>
7+
<priority>1.0</priority>
8+
</url>
9+
</urlset>

0 commit comments

Comments
 (0)