Skip to content

feat: design and implement a backup & restore system (P2P JSON + Tabs Restore) #60

@akhileshthite

Description

@akhileshthite

Backup & Restore System (P2P JSON + Tabs Restore)

Scope

Primary goals:

  • Backup P2P app data and session state (tabs/windows).
  • Restore from local file or IPFS/Hyper CID.
  • Add an onboarding import flow for tabs from other browsers using a helper extension.

P2P Backup (Peersky Settings)

  • Add a new Backup tab in peersky://settings/ Or add a dedicated backup page (e.g., backup.html in src/pages/), linked from settings.
  • Create a single .zip backup file containing:
    • lastOpened.json
    • tabs.json
    • ensCache.json
    • ipfs/ directory
    • hyper/ directory
  • Option to generate a CID for the backup zip for instant sharing.
  • Add input to load/resolve CID and download backup zip to local.

Restore Options (Settings)

  • Upload p2p backup zip file.
  • Load backup from IPFS/Hyper CID.
  • Upload Chrome/Firefox browsers backup zip file.

From AgregoreWeb/agregore-browser#315 (comment)

Browser Extension (Chrome/Firefox)

  • Create a small extension under p2plabsxyz.
    • Export current windows/tabs to a file (JSON or ZIP).
    • Include tab URLs, titles, window grouping, and active tab indexes.
  • Publish to Chrome Web Store and Firefox Add-ons.
  • File format must be compatible with Peersky’s import pipeline.

Managing the repository and web store publishing will be handled by the maintainer.


Onboarding Flow (Tabs Import)

  • On first launch, show onboarding.html (from src/pages/):
    • Prompt: “Import tabs from another browser?” → Yes/No
    • No → go to welcome screen (peersky://home)
    • Yes → show instructions to install the helper extension in Chrome/Firefox
    • Next step: import the generated file from that extension
  • This flow is also be available from the Backup page as mentioned in "Restore Options" above.

Technical Notes

  • Tabs state persistence already exists:

    • lastOpened.json for window state
    • tabs.json for tab groups and nav history
    • renderer localStorage uses peersky-browser-tabs for tab restores
  • P2P cache data in userData:

    • ensCache.json
    • ipfs/ dir (repo, blocks, datastore)
    • hyper/ dir (Hypercore storage)

Metadata

Metadata

Assignees

No one assigned

    Labels

    UI/UXRelated to designelectronRelated to electron.jsenhancementNew feature or requestpriority: highFor important issues that affect many users or major functionality of the project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions