Giter Club home page Giter Club logo

hoardr's Introduction

Hoardr - Save your stuff from the web!

Introduction:

Hoardr is a self hosted open source (basic) alternative to pocket

Live preview:

Hoardr.in

preview

Built with:

Testing:

Dependencies:

Social logins supported:

Install dependencies (some might need to use sudo for various reasons):

  • brew/apt-get install nodejs
  • brew/apt-get install redis
  • brew/apt-get install mongodb
  • npm install -g mocha
  • npm install -g gulp
  • npm install

Create an application on both Facebook, Google+ and point the callbacks to (respectively):

  • http://localhost:3000/auth/facebook/callback
  • http://localhost:3000/auth/google/callback

Email verification via Mandrill:

Environment variables:

  • PORT - Port exposed by this component.
  • example: 3000
  • SERVICE_NAME - The name of your fantastic service/platform!
  • example: Express Passport Application
  • DEBUG - Debug output (* for all) (optional)
  • example: *
  • NODE_ENV - Environment ('development', 'staging', 'production')
  • example: development
  • DOMAIN - The domain the service is running on
  • example: http://localhost:3000
  • SECURE_DOMAIN - HTTPS endpoint of the domain (only for production)
  • example: https://yourdomain.com
  • CLIENT_API_PATH - Path to the client REST api (relative)
  • example: /api
  • MONGO_URL - MongoDB url (including authentication)
  • example: mongodb://user:pass@localhost:27017/mydatabase
  • REDIS_URL - Redis url (including authentication)
  • example: redis://user:pass@localhost:6379
  • REDIS_DB - Redis database number (0-15)
  • example: 1 - defaults to 0
  • REDIS_SESSION_PREFIX - Prefix for redis session entries (optional)
  • example: sess:
  • APPSECRET - Application session secret
  • example: sOmeCrAzYhAsH894372
  • SESSION_KEY - Application session secret (optional)
  • example: express.sid (defaults to connect.sid)
  • FACEBOOK_CLIENT_ID - Facebook application client id
  • example: abcdefghijklmnopqrstuvxyz1234567890
  • FACEBOOK_CLIENT_SECRET - Facebook application client secret
  • example: abcdefghijklmnopqrstuvxyz1234567890
  • FACEBOOK_CALLBACK_URL - Facebook application callback url
  • example: http://yourdomain.com/auth/facebook/callback
  • GOOGLE_CLIENT_ID - Google application client id
  • example: abcdefghijklmnopqrstuvxyz1234567890
  • GOOGLE_CLIENT_SECRET - Google application client secret
  • example: abcdefghijklmnopqrstuvxyz1234567890
  • GOOGLE_CALLBACK_URL - Google application callback url
  • example: http://yourdomain.com/auth/google/callback
  • MANDRILL_API_KEY - Mandrill API key
  • example: abcdefghijklmnopqrstuvxyz1234567890
  • MANDRILL_SENDER - Mandrill email sender address
  • example: John Doe <[email protected]>
  • EMAIL_VERIFICATION_ROUTE - Email verification route
  • example: http://yourdomain.com/auth/local/verify

Run tests:

  • npm test

Run the application:

  • set environment variables
  • gulp
  • alternatively create a shellscript for the above (for development)
  • navigate your browser to http://localhost:PORT

Development shellscript example:

#!/bin/sh

export PORT=3000 \
# override port if argument is present
if [ $1 ]; then
   export PORT=$1
fi

export SERVICE_NAME="Hoardr Web Service" \
export DEBUG="*,-engine:polling" \
export NODE_ENV="development" \
export DOMAIN="http://localhost:3000" \
export SECURE_DOMAIN="https://localhost:3000" \
export CLIENT_API_PATH="/api" \
export MONGO_URL="mongodb://localhost/hoardr" \
export REDIS_URL="redis://localhost:6379" \
export REDIS_DB=0 \
export REDIS_SESSION_PREFIX="sess:" \
export APPSECRET="somecrazyhash" \
export SESSION_KEY="express.sid" \
export FACEBOOK_CLIENT_ID="000000000000000" \
export FACEBOOK_CLIENT_SECRET="000000000000000000000000000000000000000000000" \
export FACEBOOK_CALLBACK_URL="http://localhost:3000/auth/facebook/callback" \
export GOOGLE_CLIENT_ID="000000000000000000000000000000.apps.googleusercontent.com" \
export GOOGLE_CLIENT_SECRET="000000000000000000000000000000" \
export GOOGLE_CALLBACK_URL="http://localhost:3000/auth/google/callback" \
export MANDRILL_API_KEY="000000000000000000000000000000" \
export MANDRILL_SENDER=" <[email protected]>" \
export EMAIL_VERIFICATION_ROUTE="http://localhost:3000/auth/local/verify" \

gulp test && gulp

TODO

  • UI design needs work
  • tagging of articles
  • better content aggregation (fork node-read and adjust for specific needs)
  • lots more..

hoardr's People

Contributors

eiriklv avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

concepthacker

hoardr's Issues

Logo

make a nice logo :-)

preserve <pre> tag formatting

During the process, the 'pre' tag formatting is discarded and flattened. This should not be the case (makes code examples hard to read).

fetch a remote script from the bookmarklet for execution to enable versioning and seemless updating

Bookmarklet:

(function (e, a) {
    c = a.createElement('script');
    c.type = 'application/javascript';
    c.src = 'http://{{domain}}/bookmarklet.js/{{user.id}}/{{user.accessToken}}';
    var nodes = a.documentElement.childNodes;
    var wantedNode;
    for (var i = 0; i < nodes.length; i++) {
        if (nodes[i].nodeType == 1) {
            wantedNode = nodes[i];
            break;
        }
    }
    wantedNode.appendChild(c);
})(window, document);

Remote script:

(function ($, userId, accessToken, domain) {
    $.ajax({
        type: 'POST',
        url: 'http://' + domain + '/api/article',
        data: {
            id: userId,
            accessToken: accessToken,
            url: document.URL
        },
        success: function (response) {
            console.log(response);
            alert('Hoardr.in: page successfully saved!');
        },
        error: function (xhr, text, err) {
            console.log(err);
            alert('could not save page - error: ' + err);
        }
    });
})($, userId, accessToken, domain);

create chrome extension

This way jQuery or other libraries can be bundled without issues with cross-site request for loading a script

default all url's to http

To avoid issues with sites with https (f.ex youtube), all urls should be defaulted to http, as the request will be redirected automatically to https if necessary

article route does not work for some articles

encoding issues

fix encoding issues for non utf-8 encodings within node-read / cheerio

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.