Giter VIP home page Giter VIP logo

darg's People

Contributors

lagoja avatar venantius avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

darg's Issues

team_users table should set foreign-key constraint to ON DELETE CASCADE

Issue needs to be resolved less we trigger a resonance cascade scenario and find ourselves trapped in Xen.

See error below: Lobos migration should set foreign-key constraints to ON DELETE CASCADE for team_users table, since deleting a user/team should also delete the relationship with their teams/users.

We may want to think about how we handle tasks from different users: deleting a user currently would maintain their unique id linked to the task, but Darg would be unable to find the user's name or email address.

org.postgresql.util.PSQLException: ERROR: update or delete on table "users" violates foreign key constraint "team_users_fkey_users_id" on table "team_users"
Detail: Key (id)=(3) is still referenced from table "team_users".

RFC: Different login CSS

What the default looks like:
screen shot 2014-09-12 at 1 00 28 pm

Taking away the outer border:
screen shot 2014-09-12 at 1 00 38 pm

Taking away the outer border and setting the inner text to "clouds" / ECF0F1
screen shot 2014-09-12 at 1 00 58 pm

Behavior for this form is controlled by

.navbar-inverse .navbar-form .form-control:focus {
  border-color: #1abc9c;
  color: #1abc9c;
}

in flat-ui.min.css

Set up an actual website

Right now there's a ring server set up to provide the barest hello world minimum. This should be expanded, presumably with some decent design.

Right now the DNS records point to my jackalope1-1 linode, and Mailgun is configured off of that. I suspect that Linode is not going to be the ideal deployment route (especially when compared to something like Heroku or aws), but it can suffice for now.

Get rid of side arrow in `login-form`

.login-form:before {
content: '';
border-style: solid;
border-width: 12px 12px 12px 0;
border-color: transparent #edeff1 transparent transparent;
height: 0;
position: absolute;
left: -12px;
top: 35px;
width: 0;
-webkit-transform: rotate(360deg);
}

On line 4400 of flat-ui.min.css

Frontend: Settings

The settings page. Assuming this is gonna live at /settings

User settings

  • Personal e-mail time of day
  • Digest time of day

Team settings

  • Add / remove team members
  • Payment settings.

Test Mailgun API endpoint

See: http://documentation.mailgun.com/user_manual.html#routes for how e-mail via mailgun can either be forwarded, or stored with a callback.

  • Create an endpoint at /api/v1/email
  • Write tests (200 response code with mocked get requests, etc.)
  • Write code to parse "accomplishments" / "dargs" from general e-mails
  • Write code to parse "dargs" but exclude reply context
  • Write parsed accomplishments/dargs into the database.
  • Verify the token hash that gets forwarded from Mailgun. (#17)

Email Parsing Improvements

Current Status:

We can parse an email map returned from Mailgun, retrieve the relevant task list and metadata, and insert the list into the database

To-Do's:

  • improve task-list parser to handle context, block quotes, ordered and unordered lists (NOT DOING)
  • verify emails to ensure user is authorized to post tasks.
  • create auto-reply for failure scenarios
  • Verify Mailgun token for authentication
  • improve date parser to handle different date formats and placements in subject line (NOT DOING)

Add Eastwood linting to CI

I had to implement a custom Phabricator linter yesterday, and in reading through the Phab docs I came across this:

Code review is most valuable when it's about the big ideas in a change. It is substantially less valuable when it devolves into nitpicking over style, formatting, and naming conventions.

The best response to receiving a review request full of style problems is probably to reject it immediately, point the author at your coding convention documentation, and ask them to fix it before sending it for review. But even this is a pretty negative experience for both parties, and less experienced reviewers sometimes go through the whole review and point out every problem individually.

Lint can greatly reduce the negativity of this whole experience (and the amount of time wasted arguing about these things) by enforcing style and formatting rules automatically. Arcanist supports linters that not only raise warnings about these problems, but provide patches and fix the problems for the author -- before the code goes to review.

Good linter integration means that code is pretty much mechanically correct by the time any reviewer sees it, provides clear rules about style which are especially helpful to new authors, and has the overall effect of pushing discussion away from stylistic nitpicks and toward useful examination of large ideas.

It can also provide a straightforward solution to arguments about style, if you adopt a policy like this:

If a rule is important enough that it should be enforced, the proponent must add it to lint so it is automatically detected or fixed in the future and no one has to argue about it ever again.
If it's not important enough for them to do the legwork to add it to lint, they have to stop complaining about it.
This may or may not be an appropriate methodology to adopt at your organization, but it generally puts the incentives in the right places.

While we're not going to start using Arcanist, I think we should get a Clojure linter - Eastwood - set up as part of our CI process, so that it just becomes a natural part of the development flow.

Refactor Model

Creating issue here to use as notepad for model refactoring

Properly set logging levels

Proposal: create darg.config and darg.logging, which set the logging levels for the application. Right now logging levels are basically being set willy-nilly by various libraries, which is BUNK! It's super annoying and we need a central place where logging levels are set.

Perfect sign-up flow

There's a bunch of stuff that needs to happen in order for us to have a solid sign-up flow:

  • Team configuration page
  • E-mail welcome message
  • "Invite" message to follow team members (assuming the team lead can just sign other people up)
  • Probably a "personal" message from me after a few days

The e-mail stuff above should probably be handled through Intercom rather than through Mailgun.

Authentication roadmap

Authentication roadmap

  • User inputs email and password to form
  • Form hits Darg API endpoint for login: /api/v1/login
  • Darg backend sets encrypted session cookie, and also sets a cleartext login cookie.
  • Angular uses cleartext login cookie as cue for UI rendering
  • Visible logout button appears
  • Maybe write the /api/v1/logout/ endpoint first on the backend.
  • Angular retrieves resources from backend in AJAX calls, all of which explicitly require the encrypted info in the session cookie (NOTE - MAKE SURE TO HAVE AUTHENTICATION REQUIREMENTS FOR ALL SIGNIFICANT RESOURCE ENDPOINTS)
  • ...
  • Profit!

Backend auth resources

This StackOverflow question is the best thing I've read on authentication so far. It says that as far as your Angular app goes, you can keep track of whether a user is "logged in" but ultimately it's only for UI purposes - it means nothing as far as actual auth goes. All resources are still AJAX calls to the backend, and pass session cookies along; there's no resource that can actually be retrieved without validating the session cookie.

Authentication resources for Angular

Should we verify e-mails?

Open question - not sure what the right answer is. Stormpath supports an e-mail verification workflow but that's an extra step in the sign-up process obviously.

RFC: API endpoint scheme

As the model starts to come together, we should probably start thinking about the secret blend of herbs and spices we want to follow. This will help us figure out how to structure the backend to best support the front end.

May also help to whiteboard the chicken for bawk bawk bkawk bawk bawk

Strawman Proposal:

darg.io/team
darg.io/team/user
darg.io/team/user/tasks
darg.io/team/user/tasks?taskID={{taskID}}
darg.io/team/user/tasks?date=DDMMYYYY
darg.io/team/user/tasks?minDate=DDMMYYY&maxDate=DDMMYYYY
darg.io/team/tasks
darg.io/team/tasks?date=DDMMYYYY
darg.io/team/tasks?minDate=DDMMYYY&maxDate=DDMMYYYY
darg.io/team/admin
darg.io/team/

darg.io/user
darg.io/user/tasks
darg.io/user/tasks?date=DDMMYYYY
darg.io/user/tasks?minDate=DDMMYYY&maxDate=DDMMYYYY

Mute logging in tests

If I'm doing lein test I don't really need to have access to server-style logs. Maybe. I haven't made up my mind on this one.

Clean up the Stripe imports

This issue has a dependency: #6

We don't need all the sub-libraries of clj-stripe. Clean those up once the main library has been put together.

Gravatar support

Right now we have a "placeholder" dropdown menu in the top right, but this should be replaced by a user's gravatar image.

Details on the Gravatar API can be found here, but the short version is that the gravatar API looks up images based on an MD5 of the user's e-mail (lowercased and stripped of whitespace). We could do this either in pure JS (in which case we'd either have to keep the e-mail or the MD5 of it in the cookie) or server-side (and keep nothing in the cookie and just retrieve the image based on what's in the encrypted session cookie); my inclination is that if we really consider someone's e-mail to be sensitive data then we should do it server-side (since MD5 is not cryptographically secure), and if we don't mind keeping an MD5 of their e-mail in the cookie then we should do it in pure Angular.

Frontend roadmap

This is a roadmap/task-tracking issue

  • [meta] Familiarize self with Angular.js (https://docs.angularjs.org/guide/module)
  • [meta] Familiarize self with bootstrap
  • Learn how to make API calls to the darg API
  • Learn how to set cookies
  • Figure out how to handle login, authentication, etc.

Get rid of boneCP parsing

clj-bonecp-url.core - I think this library is altering how logging is handled and I think that's BS. We should pull it out and replace it with the URI parser used elsewhere and just deal with connection strings like that.

Define Data Model

Need models and relationships for different parts of darg.io. The major entities that come to mind are:

  • Team - a group of users working on a project, that will receive a regular darg email. Each group receives one email
  • Users - member of one or more groups who can post and read events
  • Event - a single update or line item from a user, which are gathered into distributions
  • Digest - a collection of events for a particular group, available for viewing on Darg.io and sent via the regular email

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.