Git Product home page Git Product logo

group-income's People

Contributors

abdulazizali77 avatar anobfuscator avatar corrideat avatar crazedcoding avatar danawoodman avatar dependabot[bot] avatar dotmacro avatar dsernst avatar f1lt3r avatar hubudibu avatar ktamas77 avatar m3hari avatar pieer avatar sandrina-p avatar sdegutis avatar sebinsong avatar sgrondin avatar silver-it avatar simonv3 avatar snowteamer avatar taoeffect avatar vijayee avatar wemeetagain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

group-income's Issues

Login / Logout UI

Either via a modal or via a new page, we need a way to log the user in, and then a button to log them out.

At some point we should also go over how we're taking your markup and integrating it with the build system and Vue js. There are some things that would make that simpler for us to do (like not having special classes on the body tag, not having special "padding" in general, or at least make it consistent across all .html files so that class variables can be replaced with template strings like {{page-class}} to templatify the whole thing).

Add babel support to ejs templates

Problem

Without being able to use async/await JS code can get unwieldy. We have support for babel everywhere except ejs templates (I think?).

Solution

vueify gives an example of how to do this. it's pretty simple:

var options = require('./options')
var babel = require('babel-core')

module.exports = function (raw, cb) {
  try {
    var res = babel.transform(raw, options.babel || {})
  } catch (err) {
    return cb(err)
  }
  cb(null, res.code)
}

preparse the templates and replace what's inside the delimiters with the output of babel, then pass it to ejs.

Use should in tests

Convert assert usage to should.

EDIT: we don't need to convert the existing stuff. assert is perfectly fine and actually has an elegance to it. Might only use should where assert is less elegant.

Fix env vars in backend

  1. test/index.js manually sets PORT = 3000 instead of reading it in from env vars or getting it as a default from some central place
  2. Decide whether to stick with dotenv or not (#4).
  3. index.js has server.connection({port: 3000})

Group Income Simple description

Problem

People aren't telepathic.

Solution

Draft description of "Group Income Simple" for the About page. Explain what's similar to and different from Group Income.

Bundle dependencies

Problem

Dependencies can be taken offline (availability) or become compromised (security).

See: okTurtles/dnschain#175

Solution

We can create forks of all dependencies we use, and also reference them by git hash. Also, we can use Yarn (#120), and we "shrinkwrap" them (i.e. simply put them in this repo).

Get rid of unneeded dependencies on frontend

Look through dist/app.js for things we don't need or could easily replace with something else.

Off-hand I'm noticing:

  • bluebird
  • jquery

Obviously minifying the app.js file will help to reduce line count too.

Improve logging on backend

Problem

  • it's unclear how to log errors properly
  • on travis it's too verbose
  • needs colors

Solution

EDIT:

  • See Pino and popular debug logging libraries, very fast
  • bunyan was also recommended here and while it's not as fast as pino or debug, it's faster than winston

Make test/index.js run the API server so that only `grunt test` needs to be run

Low-hanging fruit, should be simple. If you don't have time for this feel free to assign to me, but it's probably less than 30 minutes of work.

Basically make npm test be an alias for grunt test (via package.json), and have it:

  • run standard (just add a call to 'standard' in the array for grunt.registerTask)
  • run test/index.js, which should launch the API server (just like DNSChain's test files launch a DNSChain instance) so that when grunt test is invoked all the tests work without having to run any other command from the terminal

Create a cross-platform sandboxed dev environment

Problem

It's insecure to download and run random code form the net.

Solution

Ideally, a simple way to chroot/sandbox it by specifying:

  • what folder it's restricted to
  • whitelisting resources it needs outside of that folder

something like containers/docker/unikernels.

See if it's possible to design project such that it's a requirement to develop using the sandbox (i.e. project won't function/run otherwise).

Payments UX

Problem

We're not sure what the best way for distributing funds (that works, & meets member needs and local laws) will be.

Solution

Define what the user experience will be in terms of sending money.

  • Should groups have a monthly meeting/party?
  • Should groups appoint a treasurer?
  • Will there be a central server with API keys? (carefully balance security and convenience)
  • etc.

Try out webpack?

This issue is somewhat related to #37.

  • Use grunt-webpack

  • See webpack for browserify users (and browserify for webpack users)

  • Get the component hot-reload thing working

  • Ensure it's simple to switch back to browserify

  • Make a note of the browserify and webpack related dev dependencies in a wiki, then replace the browserify deps with webpack equivalents

    Webpack dependencies: npm i -D grunt-webpack babel-loader css-loader ejs-html-loader vue-html-loader vue-style-loader vue-loader webpack webpack-dev-server

  • Make it clear how "vendor" related JS (i.e. jquery, modernizer, etc.) gets added and used by the project

Create easy onboarding documentation for web designers

Either in a Wiki or frontend/simple/README.md (and linked to from README.md) add docs explaining:

  • What files are relevant to designers
  • Where designers should create new files
  • How ejs/vue files work
  • How the page title is updated via main.js (consider creating an issue to create an isolated and easier-to-edit routes.js file)
  • How resources (images, css, vendor js) etc. are added to the project and loaded
  • Table of contents at the very top and for the Architecture Stack Overview section.

Add security headers (docs + impl)

Problem

HTTP(S) is an insecure mess.

Solution

Make sure the website does all the CORS / same origin stuff especially!

Useful plugins:

Useful libraries:

Misc:

Add `grunt deploy` and/or `grunt serve` (or similar)

Problem

We'll at some point need to be able to deploy GI to a running server.

Solution

Background:

  • Right now we have grunt dev as the only way of serving the app.
  • We also have an open issue for chel serve which is the ideal way that this issue would be closed
  • A temporary alternative to chel serve would be implementing grunt serve - the idea of which would be to serve an optimized production build of the app.

I think whether we do chel serve or grunt serve first, we need a command to generate a build of the app that is production optimized. Currently we only generate a development build.

So a possible route forward would be to:

  • Implement a grunt deploy command that uses esbuild to create a production bundle of the app
  • Then implement grunt serve <folder> that just runs the server on port 8000 by default (and not browsersync). Make sure to take into account the contracts folder (perhaps grunt deploy would copy the contracts folder into a directory containing the groupincome bundle).
    • Note: chel serve is essentially the same thing, but more difficult to implement because the chel command doesn't have the Chelonia server in it (that's still here in Group Income under the backend/ folder)

Old Commentary/notes

See:

EDIT: Another possibility is making it possible install a groupincome command via npm install -g and running that.

The point is our current approach of running grunt dev is not appropriate for deploying to a server, and we need something simpler and without the overhead of grunt dev.

Document differences between "Group Income Simple" & "Group Income"

Problem

Differences between "Group Income Simple" (GIS) and "Group Income" (GI) will impact the tests of GIS.

Solution

Brainstorm and document differences between GIS and GI. Where possible and feasible, include suggestions of how to adjust GIS to be as close to GI as possible

Create components out of Aaron's work

This issue can be easily split up among multiple people.

First we should make a survey of all of the components to be extracted out of the HTML and into .vue files (i.e. make a list here), and then have at it!


EDIT: Many of these components are too simple to be worth creating .vue files out of. For those we just stick to the regular old markup and ignore (unless there's an obvious reason not to) the idea of making Vue components out of them. These I've marked, for now at least, "TOO SIMPLE — SKIP!"

For now we will use .vue files primarily as pages. Only if it meaningfully improves the markup should we be spending our times creating components out of things that are already effectively components (like <button>). It may even be worth considering avoiding the use of Vue.js and simply relaying on the Hapi backend to render template-based views directly (that would mean serving "normal" HTML files instead of this tiny skeleton). I've created issue #6 for this purpose.


Here are the components I've isolated:

  • Green Button TOO SIMPLE — SKIP!

button1
button2

  • Custom input field TOO SIMPLE — SKIP!

field_1
field_2
field_4
field_3

Note that as per new-user.html it can have a $ at the start and an optional image in the description!

  • Panel

panel1
panel2

This is made up of the above components!

It should also be flexible enough to look like the box on user-profile.html!

  • Small buttons (these are a component themselves) + Payment row (made up of them and other things)

row

  • The weird payments tally widget sidebar thing on the left of pay-group.html

Set up trials to test various payment structures

Problem

We don't know for certain what UX for payments groups will like best.

Solution

Set up a trial of various payment structures:

  • all members receive universal payment (like UBI)
  • only some members send payments (to individuals or to group pot) and only some members receive payments (like initial GIS draft)
  • ?

cookies HTTPS only

  server.auth.strategy('cookie_strategy', 'cookie', {
    password: 'abcdef',
    cookie: 'group-income-simple',
    ttl: 2592000000, // 1 month
    isSecure: false // HTTP allowed
  })

What's the reason isSecure is set to false there?

Script2 enhancements

  • Use loadjs (or code based on it) to remove the hackish "waitfor" stuff. See also if you can get the script2's to execute in order specified in the HTML
  • Use a global promise object to serialize the loading/running of scripts in the order they appear on the page
  • figure out whether we're keeping the unloading feature? seems handy.
  • Vue 2.0 deprecates elementDirective, so see if script2 can be done as a component
  • update docs accordingly
  • consider switching to Riot or at least mentioning it in the docs

Useful libraries:

Useful links:

Go through TODOs in the source

Problem

There are TODOs in the code that need to-doing to to-get-rid-of-ing.

Solution

  • Create issues out of them
  • Delete them
  • Or leave them for later

Get EJS working within .vue templates

EJS currently doesn't work within .vue files, which isn't a big deal but would be neat if it did:

<template lang="ejs">
  <div><%- include views/included %></div>
<template>

Corresponding issue in vue-loader: vuejs/vue-loader#197

Note: if views/included.ejs is modified and saved the change might not propagate through webpack-dev-server (which we aren't using atm, so might not be an issue).

EJS via Hapi for the frontend markup, Vue.js (if needed) for creating components

See http://hapijs.com/tutorials/views + new edits to #6.

Hapi's vision plugin homepage has great examples of how to set this up and what templating languages are supported.

Tasks

  • Figure out whether (and how) we should make the site both CDN-friendly (i.e. keeping it deliverable as purely static files) and designer-friendly. On-the-fly rendering of the front-end markup using EJS via Hapi is not a good long-term solution. Maybe the right thing to do is to render/compile the EJS templates to static .html files like jekyll does it?
  • Remove any .vue files that are unneeded.

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.