Code Monkey home page Code Monkey logo

vellup's Introduction

Overview

Vellup is a web service and API for easily integrating user accounts into web applications without the hassle of managing it yourself.

Local Development

When running the app locally, make sure to set the following environment variables for any shells you start processes from:

$ source .env

Optionally, unset DATABASE_URL if you want to run against a local PostgreSQL server.

Migrations

Supported tasks are :reset, :up, :down and :to (used with VERSION).

$ bundle exec run rake db:migrate:reset
Running rake db:migrate:reset attached to terminal... up, run.3
(in /app)
<= sq:migrate:reset executed

Starting the web processes

$ ruby bin/vellup-web
Cannot find or read /Users/jdixon/Projects/vellup/config/newrelic.yml
== Sinatra/1.3.1 has taken the stage on 4567 for development with backup from Thin
>> Thin web server (v1.2.11 codename Bat-Shit Crazy)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop
$ ruby bin/vellup-api 
== Sinatra/1.3.1 has taken the stage on 4568 for development with backup from Thin
>> Thin web server (v1.2.11 codename Bat-Shit Crazy)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4568, CTRL+C to stop

Monitoring the Redis queue

$ redis-cli -h <host>.redistogo.com -p <port> -a <key>
redis viperfish.redistogo.com:9MONITOR
OK
1323175440.891197 "MONITOR"

Starting the worker process

$ bundle exec rake queue:work QUEUE=*

Running Tests

$ bundle exec rake test --trace

vellup's People

Contributors

dependabot[bot] avatar gorsuch avatar obfuscurity avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vellup's Issues

Unit Tests

Unit tests for all class models and modules.

Unable to Signup

Needed to create a test user, and was unable to. Tracking things here.

Noted this in the logs:

Sequel::Error - method firstname= doesn't exist:

GUI schema composer

A web form that helps site owners point-and-click their way to a user schema.

Sessions

Ability to store end-user session data within Vellup. Haven't fleshed out the idea fully yet.

Remove Requirement for Firstname and Lastname

At the moment, Vellup will tell you that it creates a user if you only provide an email and a password. However, it won't. At a skim, it looks like our problem is with the first migration:

      String      :firstname,     :size => 20, :null => false
      String      :lastname,      :size => 40, :null => false

I don't think we should require either of these fields, as email and password should be enough.

Integration Tests

Integration tests for everything outlined in the API documentation. Ignore any web UI stuff for now as that's likely to be rewritten soon to use the API. Ideally we want to test all permutations of any particular endpoint using the mandatory and optional parameters, and testing failure conditions for the proper error codes.

Walk through the typical workflow: create a site, add a user, modify the user, modify the site, destroy the user and site, etc. If possible we should delete the test user/site from the database, as the destroy endpoint actually just disables and hides them.

Authentication Seems Hard

Was adding auth to an app of mine, but could not find a way to do it easily. As it looks now, I have to provide a user id when I make a call to auth. In order to get that user id, I'm going to have to make a call to the api and find my user by email address.

I'd much rather do POST to something like https://vellup.herokuapp.com/sites/UUID/auth, passing that an email and a password. The result would ideally containing the user hash upon success.

Support for custom fields

Such as address, twitter handle, etc. As part of this change, firstname/lastname should be moved out of the base schema and treated similarly.

Schema error objects

Catch errors returned by json-schema and return them in an orderly fashion to the user.

errors = JSON::Validator.fully_validate(schema, data, :errors_as_objects => true)
[
  {
    :message=>"The property '#/a' of type String did not match the following type: integer in schema 03179a21-197e-5414-9611-e9f63e8324cd#",
    :schema=>#<URI::Generic:0x103a76198 URL:03179a21-197e-5414-9611-e9f63e8324cd#>,
    :failed_attribute=>"Type",
    :fragment=>"#/a"
  }
]

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.