├── .gitignore ├── LICENSE ├── README.md ├── bower.json ├── build.sh ├── elements ├── compose-message │ └── compose-message.html ├── elements.html ├── feed-view │ └── feed-view.html ├── initialize-feed │ └── initialize-feed.html ├── ipfs-add-file │ └── ipfs-add-file.html ├── markdown-edit-preview │ └── markdown-edit-preview.html ├── routing.html ├── scroll-events │ └── scroll-events.html ├── starlog-behavior │ └── starlog-behavior.html └── starlog-view │ └── starlog-view.html ├── hack.sh ├── images └── touch │ ├── apple-touch-icon.png │ ├── chrome-touch-icon-192x192.png │ ├── icon-128x128.png │ ├── ms-icon-144x144.png │ └── ms-touch-icon-144x144-precomposed.png ├── index.html ├── package.json ├── serve.js └── styles └── main.css /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | bower_components 3 | build 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Protocol Labs, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## This repository has been archived! 2 | 3 | *This IPFS-related repository has been archived, and all issues are therefore frozen*. If you want to ask a question or open/continue a discussion related to this repo, please visit the [official IPFS forums](https://discuss.ipfs.io). 4 | 5 | We archive repos for one or more of the following reasons: 6 | 7 | - Code or content is unmaintained, and therefore might be broken 8 | - Content is outdated, and therefore may mislead readers 9 | - Code or content evolved into something else and/or has lived on in a different place 10 | - The repository or project is not active in general 11 | 12 | Please note that in order to keep the primary IPFS GitHub org tidy, most archived repos are moved into the [ipfs-inactive](https://github.com/ipfs-inactive) org. 13 | 14 | If you feel this repo should **not** be archived (or portions of it should be moved to a non-archived repo), please [reach out](https://ipfs.io/help) and let us know. Archiving can always be reversed if needed. 15 | 16 | --- 17 | 18 | # starlog 19 | 20 | [![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) 21 | [![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/) 22 | [![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) 23 | [![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) 24 | [![Dependency Status](https://david-dm.org/ipfs/starlog.svg?style=flat-square)](https://david-dm.org/ipfs/starlog) 25 | 26 | > logging the development of an interplanetary filesystem 27 | 28 | WIP 29 | 30 | ## Table of Contents 31 | 32 | - [Background](#background) 33 | - [Root object](#root-object) 34 | - [The log structure](#the-log-structure) 35 | - [Search](#search) 36 | - [Install](#install) 37 | - [Usage](#usage) 38 | - [subcommands](#subcommands) 39 | - [Contribute](#contribute) 40 | - [License](#license) 41 | 42 | ## Background 43 | 44 | Starlog is a way of publishing a blog-type feed, without requiring any specific servers to store it. This is accomplished through IPFS content addressable data structures. 45 | 46 | Each user running the app for the first time, will be asked to initialize a feed. This is done by checking if the local ipns name points to an object with `{"type": "starlog"}` encoded as JSON in the data portion of the object. 47 | 48 | ### Root object 49 | 50 | The root starlog object has a data portion with the name of the log, and also a link to the actual data structure representation of the log. 51 | 52 | It can optionally also contain a link to an image, used as the blog icon. 53 | 54 | ### The log structure 55 | 56 | A [Finger Tree](https://en.wikipedia.org/wiki/Finger_tree) is used to store the log entries. This is an append-only version of this structure, requiring no balancing. This layout of data allows constant time access to the first and last elements of the feed. 57 | 58 | See also [krl/aolog](https://github.com/krl/aolog). 59 | 60 | ### Search 61 | 62 | Search is implemented by taking the text of the entries in the leaves of the tree, and construct a bloom filter out of them. 63 | 64 | When you search for one or more words, they are also made into a (very sparse) [bloom filter](https://en.wikipedia.org/wiki/Bloom_filter). You can then check this against whole subtrees, and throw them away if they give a negative. 65 | 66 | 67 | ## Install 68 | 69 | WARNING, these special settings are for development only, and are concidered unsafe for normal ipfs usage. 70 | 71 | Starlog uses both [npm](https://www.npmjs.com/) and [Bower](http://bower.io/) to install dependencies. If you do not have them, you'll need to install them first. 72 | 73 | ```bash 74 | bower install 75 | npm install 76 | ```` 77 | 78 | ## Usage 79 | 80 | Make sure your ipfs daemon is running with API_ORIGIN set to 'http://localhost:8082', and using `--unrestricted-api`: 81 | 82 | ```bash 83 | API_ORIGIN="http://localhost:8082" ipfs daemon --unrestricted-api 84 | ``` 85 | 86 | Leave that running, and then run the following in a new console window: 87 | 88 | ```bash 89 | $ npm run serve 90 | # open in localhost:8082 91 | ``` 92 | 93 | ### subcommands 94 | 95 | * ```npm run serve``` - Opens the app in your local browser on 8082, redirects `/ipfs` and `/api` calls to your ipfs daemon on port 5001. 96 | 97 | * ```npm run local``` - Packs up the app with vulcanize, adds it to ipfs, and opens the resulting hash in your local api gateway. 98 | 99 | * ```npm run gateway``` - Packs the app up and runs it from the ipfs.io gateway. 100 | 101 | ## Contribute 102 | 103 | Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/starlog/issues)! 104 | 105 | This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). 106 | 107 | [![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md) 108 | 109 | ## License 110 | 111 | [MIT](LICENSE) 112 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "polymer-starter-kit", 3 | "dependencies": { 4 | "iron-elements": "PolymerElements/iron-elements#1.0.0", 5 | "paper-elements": "PolymerElements/paper-elements#1.0.1", 6 | "platinum-elements": "PolymerElements/platinum-elements#1.0.1", 7 | "neon-elements": "PolymerElements/neon-elements#1.0.0", 8 | "page": "visionmedia/page.js#~1.6.3", 9 | "basic-autosize-textarea": "basic-web-components/basic-autosize-textarea#master", 10 | "mark-down": "robdodson/mark-down#~1.0.0", 11 | "lodash": "~3.10.1", 12 | "event-infinite-scroll": "chadliu23/event-infinite-scroll#master" 13 | }, 14 | "devDependencies": { 15 | "web-component-tester": "*", 16 | "test-fixture": "PolymerElements/test-fixture#^1.0.0" 17 | }, 18 | "version": "0.0.0", 19 | "authors": [ 20 | "Kristoffer Ström " 21 | ], 22 | "license": "MIT", 23 | "ignore": [ 24 | "**/.*", 25 | "node_modules", 26 | "bower_components", 27 | "app/bower_components", 28 | "test", 29 | "tests" 30 | ], 31 | "resolutions": { 32 | "polymer": "^0.3.0", 33 | "paper-input": "^1.0.0", 34 | "marked": "~0.3.3" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | mkdir -p build 2 | 3 | node_modules/.bin/vulcanize --inline-css --inline-scripts index.html | node_modules/.bin/crisper -h build/index.html -j build/script.js 4 | 5 | ipfs add -r build | tail -1 | awk '{print $2}' 6 | -------------------------------------------------------------------------------- /elements/compose-message/compose-message.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 48 | 86 | 87 | 88 | 89 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /elements/elements.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /elements/feed-view/feed-view.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 32 | 33 | 60 | 61 | 81 | 82 | -------------------------------------------------------------------------------- /elements/initialize-feed/initialize-feed.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 43 | 58 | 59 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /elements/ipfs-add-file/ipfs-add-file.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 19 | 25 | 65 | 66 | -------------------------------------------------------------------------------- /elements/markdown-edit-preview/markdown-edit-preview.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 19 | 23 | 24 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /elements/routing.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 31 | -------------------------------------------------------------------------------- /elements/scroll-events/scroll-events.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 30 | 31 | -------------------------------------------------------------------------------- /elements/starlog-behavior/starlog-behavior.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 220 | -------------------------------------------------------------------------------- /elements/starlog-view/starlog-view.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 52 | 53 | 80 | 81 | 116 | 117 | -------------------------------------------------------------------------------- /hack.sh: -------------------------------------------------------------------------------- 1 | # vulcanize fails on octal values in code 2 | sed -i.bak "s/ 0777/ 511/" node_modules/ipfs-api/dist/ipfsapi.js 3 | -------------------------------------------------------------------------------- /images/touch/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-inactive/starlog/ea4b4ce172d8f8663c6aeb54cf9843a684d100d7/images/touch/apple-touch-icon.png -------------------------------------------------------------------------------- /images/touch/chrome-touch-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-inactive/starlog/ea4b4ce172d8f8663c6aeb54cf9843a684d100d7/images/touch/chrome-touch-icon-192x192.png -------------------------------------------------------------------------------- /images/touch/icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-inactive/starlog/ea4b4ce172d8f8663c6aeb54cf9843a684d100d7/images/touch/icon-128x128.png -------------------------------------------------------------------------------- /images/touch/ms-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-inactive/starlog/ea4b4ce172d8f8663c6aeb54cf9843a684d100d7/images/touch/ms-icon-144x144.png -------------------------------------------------------------------------------- /images/touch/ms-touch-icon-144x144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-inactive/starlog/ea4b4ce172d8f8663c6aeb54cf9843a684d100d7/images/touch/ms-touch-icon-144x144-precomposed.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Starlog 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 37 | 38 | 39 | 40 | 41 | 154 | 155 | 156 | 327 | 328 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "starlog", 3 | "version": "0.0.0", 4 | "description": "", 5 | "main": "src/index.js", 6 | "dependencies": { 7 | "aolog": "^3.2.3", 8 | "buffer": "^3.4.3", 9 | "drag-drop": "^2.3.0", 10 | "ipfs-api": "^2.3.2", 11 | "vinyl-fs-browser": "^0.1.0" 12 | }, 13 | "devDependencies": { 14 | "crisper": "^1.0.7", 15 | "express": "^4.13.3", 16 | "open-url": "^2.0.2", 17 | "request": "^2.61.0", 18 | "serve-static": "^1.10.0", 19 | "vulcanize": "^1.10.3" 20 | }, 21 | "engines" : { "node" : "^4.0.0" }, 22 | "scripts": { 23 | "test": "echo \"Error: no test specified\" && exit 1", 24 | "serve": "node serve.js", 25 | "local": "./hack.sh ; node_modules/.bin/open-url localhost:5001/ipfs/$(./build.sh)", 26 | "gateway": "./hack.sh ; node_modules/.bin/open-url gateway.ipfs.io/ipfs/$(./build.sh)" 27 | }, 28 | "repository": { 29 | "type": "git", 30 | "url": "https://github.com/ipfs/starlog.git" 31 | }, 32 | "keywords": [ 33 | "IPFS" 34 | ], 35 | "author": "", 36 | "license": "MIT", 37 | "bugs": { 38 | "url": "https://github.com/ipfs/starlog/issues" 39 | }, 40 | "homepage": "https://github.com/ipfs/starlog" 41 | } 42 | -------------------------------------------------------------------------------- /serve.js: -------------------------------------------------------------------------------- 1 | 2 | var request = require('request') 3 | var express = require('express') 4 | var serveStatic = require('serve-static') 5 | 6 | var app = express() 7 | 8 | app.use(serveStatic(__dirname)) 9 | 10 | app.use('/api', function(req, res) { 11 | var url = 'http://localhost:5001/api' + req.url; 12 | req.pipe(request(url)).pipe(res); 13 | }); 14 | 15 | app.use('/ipfs', function(req, res) { 16 | var url = 'http://localhost:5001/ipfs' + req.url; 17 | req.pipe(request(url)).pipe(res); 18 | }); 19 | 20 | app.listen(8082) 21 | -------------------------------------------------------------------------------- /styles/main.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 The Polymer Project Authors. All rights reserved. 3 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 4 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 5 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 6 | Code distributed by Google as part of the polymer project is also 7 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 8 | */ 9 | 10 | body { 11 | /* background: #fafafa; */ 12 | font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; 13 | color: #333; 14 | } 15 | 16 | p { clear: both; } 17 | 18 | img { 19 | float: left; 20 | margin-right: 8px; 21 | margin-bottom: 8px; 22 | max-width: 360px; 23 | } 24 | 25 | iron-pages { 26 | /* position: relative; */ 27 | /* top: 60px; */ 28 | } 29 | 30 | iron-icon { 31 | width: 50px; 32 | } 33 | 34 | html,body { 35 | height: 100%; 36 | margin: 0; 37 | background-color: #E5E5E5; 38 | } 39 | paper-toolbar { 40 | background: #000; 41 | color: white; 42 | height: 60px; 43 | width: 100%; 44 | } 45 | 46 | .toolbar { 47 | width: 100%; 48 | } 49 | 50 | .textsearch input { 51 | position: relative; 52 | bottom: 8px; 53 | } 54 | 55 | compose-message { 56 | height: 100%; 57 | } 58 | 59 | .homescreen { 60 | background: #fff; 61 | margin-left: 4px; 62 | } 63 | 64 | .padded { 65 | padding-left: 26px; 66 | padding-right: 20px; 67 | margin-bottom: 8px; 68 | } 69 | 70 | .status { 71 | color: #fff; 72 | } 73 | #tabs { 74 | width: 100%; 75 | margin: 0; 76 | -webkit-user-select: none; 77 | -moz-user-select: none; 78 | -ms-user-select: none; 79 | user-select: none; 80 | text-transform: uppercase; 81 | } 82 | .container { 83 | width: 80%; 84 | margin: 50px auto; 85 | } 86 | @media (min-width: 481px) { 87 | #tabs { 88 | width: 200px; 89 | } 90 | .container { 91 | width: 400px; 92 | } 93 | } 94 | 95 | .offset { 96 | margin-top: 60px; 97 | } 98 | 99 | .icon { 100 | margin-top: 4px; 101 | margin-right: 8px; 102 | width: 50px; 103 | height: 50px; 104 | background: #fafafa; 105 | } 106 | 107 | .menu { 108 | padding: 20px; 109 | } 110 | 111 | .menutext { 112 | margin-left: 4px; 113 | position: relative; 114 | top: 2px; 115 | } 116 | 117 | paper-spinner { 118 | margin: 14px; 119 | } 120 | 121 | .spinner { 122 | color: #fff; 123 | } 124 | 125 | .status { 126 | 127 | } --------------------------------------------------------------------------------