Git Product home page Git Product logo

drywall's People

Contributors

coryarmbrecht avatar danielktaylor avatar iamthechad avatar ieugen avatar jedireza avatar kahlkevin avatar mnyon-grandkru avatar moklick avatar msnyon avatar sahat avatar titaniumlou avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

drywall's Issues

Convert /views/admin/search/index.js to use Sequelizejs

The following methods within /views/admin/search/index.js are still using Mongoosejs queries to accomplish their goals, which means that search won't work with this implementation. The following methods need to be changed to use SequelizeJS equivalents:

  • searchUsers
  • searchAccounts
  • searchAdministrators

It also looks like drywall uses the async methods for asynchronous JavaScript. Those should be converted to using Bluebird promises.

Can't log in

Thanks for the great work on getting Drywall to work with PostgreSQL! It's really valuable. But I'm having problems with logging in. I've debugged and seem to loose track of what's going on when views/login/index.js does:

workflow.emit('response');

and then util/workflow/index.js does:

res.send(workflow.outcome);

What's supposed to happen here? The outcome being sent is { success: true, errors: [], errfor: {} }, but when it is handled by public/views/login/index.js, it is just setting location.href back to the /login/ URL. Why?

login: function() {
  // ...
  success: function(model, response) {
    if (response.success) {
      location.href = '/login/';
    }
    // ...
  }
}

I was expecting a session cookie to be created, but no cookies besides _csrf and _csrfToken are being created by the Drywall application. It seems like Passport's authenticate('local') with req.login(user, function(err) {}) somehow doesn't work, but I get no exceptions.

Is the cookie supposed to be created by Backbone? By the login function running in the browser? What am I missing here? Do you know? :)

Connection error upon executing Travis run

When running tests on Travis, the following errors are occurring:

Unhandled rejection SequelizeConnectionRefusedError: connect ECONNREFUSED 127.0.0.1:5432
    at /home/travis/build/trystant/drywall/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:89:20
    at null.<anonymous> (/home/travis/build/trystant/drywall/node_modules/pg/lib/client.js:176:5)
    at emitOne (events.js:77:13)
    at emit (events.js:169:7)
    at Socket.<anonymous> (/home/travis/build/trystant/drywall/node_modules/pg/lib/connection.js:59:10)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at emitErrorNT (net.js:1256:8)
    at nextTickCallbackWith2Args (node.js:441:9)
    at process._tickCallback (node.js:355:17)

While this does not make the tests fail, this is worthy of note.

Create demo site for this fork

Right now, the README directs the user to the main drywall demo, which uses MongoDB as a backend.

A demo site for this fork would be good to have.

A heroku instance would suffice.

Application database needs to be created manually

When using Drywall, the database needs to be created manually. Starting the app server with npm start
without the created database results in the following error:

Server is running on port 3000
Unhandled rejection SequelizeConnectionError: database "drywall-development" does not exist
    at /Users/mnyon/code/drywall/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:73:20
    at null.<anonymous> (/Users/mnyon/code/drywall/node_modules/pg/lib/client.js:171:5)
    at emit (events.js:107:17)
    at Socket.<anonymous> (/Users/mnyon/code/drywall/node_modules/pg/lib/connection.js:109:12)
    at Socket.emit (events.js:107:17)
    at readableAddChunk (_stream_readable.js:163:16)
    at Socket.Readable.push (_stream_readable.js:126:10)
    at TCP.onread (net.js:538:20)

A potential fix to this would be to create a SequelizeJS migration that can create databases as well.

Drywall needs a testing suite

I plan on using the testing strategy I used on the Red Cross project; mocha and Supertest to do "Unit" Testing. I'm familiar with it as end-to-end testing, but having that suite will be helpful. The second stage will be to have that testing suite up and running on Travis or another Continuous Integration server.

A DEVELOPMENT.md file should be added

This file adds information about style guides & best practices to use when developing, explains the motivation behind development decisions and HOWTOs for specific development tasks.

Outline Drywall / Sequelizejs Development Path

While some parts of the app functionality have been ported over to using Promises with Sequelize models, other queries are still using Mongoose to return results through async. There needs to be a way to outline how to go about that path.

Fixture files need to be created for the install process and the initial admin user

The current install process includes creating an admin user in the database and then going through the "forgot password" section in order to create the first user. There should be an easier way to start things up. One piece of that includes creating a fixture file(s) in order to handle that request. The following code

db.admingroups.insert({ _id: 'root', name: 'Root' });
db.admins.insert({ name: {first: 'Root', last: 'Admin', full: 'Root Admin'}, groups: ['root'] });
var rootAdmin = db.admins.findOne();
db.users.save({ username: 'root', isActive: 'yes', email: '[email protected]', roles: {admin: rootAdmin._id} });
var rootUser = db.users.findOne();
rootAdmin.user = { id: rootUser._id, name: rootUser.username };
db.admins.save(rootAdmin);

needs to be turned into a JSON fixture used by sequelize-fixtures

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.