Git Product home page Git Product logo

WebMemex

A web browser that lets you save and organise the pages you visit. To create your personal web of pages and notes, connected by your assocations.

This experiment was designed to run as a web app, so effectively you run a browser inside your browser (so you can browse while you browse!).

This project is kept alive as a demo but is not developed further in this form. New forms are being worked on, see webmemex.org for the current status.

(screenshot)

Idea

Described here.

Try out

  1. Open demo.webmemex.org in a modern browser.
  2. Tell us what you think! 📧

Build

Building and running this demo is currently a bit of a hassle. The setup consists of two containers: this app itself, and a pywb-webrecorder instance, which is used to proxy viewed webpages while inserting some extra code into them to detect and report link clicks (because the application should open clicked links in a new iframe).

To run things yourself:

  1. Get Docker and Node/NPM.
  2. Clone and run this pywb-webrecorder fork (make rebuild start, or something).
  3. Clone and run webmemex (make build run). Then visit localhost:8086 in your browser.

Code tour

The whole thing is just an HTML page/app itself, using <iframe>s to show the browsed web pages. React is used for managing the DOM, Redux for managing the application state, PouchDB for persisting data in one's local storage. Some familiarity with Redux and its concepts (reducers, actions, store) may be required to understand the code.

The code is designed somewhat modular, and could be seen as three repos in one: top level (the 'app itself'), the canvas module for the UI, and the storage module for handling persisted data.

Top level app (src)

  • Sets up the app (see main.html, main.jsx): renders the canvas into the page, creates a Redux store (see store.js), connects the modules to the store (reducer.js).
  • Specifies the more high level behaviour (see actions.js), practically meaning all the logic that involves both the UI and the storage and can thus not be put in either module.
  • Its React components (src/components/*) specify how to display the 'documents' from the storage in the items on the canvas: the notes (Note.jsx), webpages (Webpage.jsx) and also the special empty item for navigating (EmptyItem.jsx).

Canvas UI (src/canvas)

  • Implements the user interface, a 2d 'canvas' (not related to the html <canvas> element) with any amount of items and possibly with edges between them.
  • Handles the placement and positioning of items (<div>s), and enables (multitouch) interactions like dragging and resizing items.
  • Knows nothing of an item's content, except its docId given by the top level app. It simply passes this docId to the configured component (StemItem in this app), so the top level app decides what to draw inside an item.

Storage (src/storage)

  • Keeps a persistent collection of documents (currently just simple webmarks and text notes, e.g. {url: 'https://webmemex.org'}), and a collection links between them (simple {sourceDocId, targetDocId} pairs).
  • Not to be confused with the Redux store (src/store.js), which manages the application state, and thus also contains the (non-persistent) canvas state.
  • Storage is currently implemented as part of the redux store, using redux-pouchdb for synchronising its state in Redux with a PouchDB database in the browser's offline storage.

webmemex's Projects

freeze-dry icon freeze-dry

Snapshots a web page to get it as a static, self-contained HTML document.

webmemex-demo icon webmemex-demo

A web browser that lets you save and organise the pages you visit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.