Giter Site home page Giter Site logo

kenthackenough's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

kenthackenough's Issues

Non-kenthackenough Compatibility and Setup Documentation

getting this set up to work under any name but Kent Hack Enough is a struggle, there are a lot of files to change and directories to note when changing, including a list of all the files where you need to change directory/name notation in the setup wiki would be wonderful.
Partial List:

provision.sh
config/dev.conf
config/api.khe.conf

I'm sure there are others, but I'm not sure what they are.
Also, the setup doesn't say, nor does the provision file move api.khe.conf to /etc/nginx/sites-vailable nor link it to sites-enabled. It only does anything with dev if there is anything down.

All of these are also the case if for kenthackenough-ui-main and kenthackenough-ui-staff

School statistics order

Make sure that schools returned from the /stats/schools route are being ordered before slicing the top 10.

Topic-based GCM

Send GCMs like this:

{
  "to": "/topics/messages",
  "data": {
    "action": "create|update|delete|notify",
    "body": {}
  }
}

I can then stop storing device IDs on the server side, and the GCM API will be similar to the Socket.IO API.

Better errors

I'm not quite sure what went wrong with resumes this year, but it should have generated an error on our end. We also need to either integrate our own fault tracker or use an existing one so that we get a heads up if a lot of API calls are failing and can start to investigate why.

Weird cross-origin error when sending emails.

When I send a new email, it shows a cross-origin request error in the developer console.

The email does not get sent, however, it still gets added to the database successfully. I'm suspicious of something in the actual mailer.

Query strings on sub-documents isn't working properly

You should be able to query users by properties of their application like this:

User
.find()
.populate({
  path: 'application',
  match: req.query
})

But something mysterious and weird is going on here.

This isn't a crucial feature but it'd be nice to have fixed.

ES6 Refactor

Ideas for refactor:

  • 'use strict';
  • Use ES6 features
    • let
    • Classes
    • Promises (although I think this is already mostly implemented)
    • Shorthand object properties
    • Template strings
    • Arrow functions
  • Define routes in a routes file
  • Better organization of modules
  • Separate tests into multiple files
  • Cleaner rootRequire method
  • Better logging

Not sending email after registration

It used to be working, but now it's not. Could have something to do with environment variables in production. Needs debugged. Will be annoying to debug.

Thin out controllers

Move a lot of logic into models, especially for statistics

Also, for socket.io and GCM

Firefox - Links Not Clickable

On FireFox 37.0.1 and 36.0.4 If you try to click a link on khe.io the background changes to blue and the links are unable to be clicked. The background changes to blue no matter where you click on the screen.
Also, the email field is not getting scope.

Better support for multiple years

Right now we're throwing away everything from last year and starting fresh to set up the site for the next year. This seem inefficient, leads to filling up the hard drive and takes resources from the server and personnel to maintain.

We either need a way to archive old content, or tagging each year's records so we can switch between them

Device IDs Should be Unique

If possible can we on the server side prevent double adding device IDs? I've got code on my side now to prevent double adding but while I was testing I double resisted and now I get four notifications every time a change is made. A bit of Googling leads me to mongoose's documentation which seems to imply we could change https://github.com/hacksu/kenthackenough/blob/master/app/devices/model.js#L9-L11 to

var Device = mongoose.model('Device', {
  id: {type: String, index: { unique: true }}
});

but I don't feel confident this is actually the case

Shorter token expiration

A user's token should need refreshed every day or two. We can fix this once the front-end refreshes tokens seamlessly.

Deleting a ticket that has already been deleted crashes the server.

calling DELETE /tickets/ID after the ticket has been removed crashes the server with the exception

    TypeError: Cannot read property '_id' of null
        at /var/www/kenthackenough/app/tickets/controller.js:78:22
        at Query.<anonymous> (/var/www/kenthackenough/node_modules/mongoose/lib/query.js:2120:28)
        at /var/www/kenthackenough/node_modules/mongoose/node_modules/kareem/index.js:177:19
        at /var/www/kenthackenough/node_modules/mongoose/node_modules/kareem/index.js:109:16
        at doNTCallback0 (node.js:407:9)
        at process._tickCallback (node.js:336:13)

Cannot resubmit application

After a user's application is deleted, it cannot be submitted again.
Replicate this error by following these steps:

  1. curl KEY:TOKEN@API_URL/users/application -X POST -F APPLICATION_DATA...
  2. curl KEY:TOKEN@API_URL/users/me/application -X DELETE
    Then repeat step 1.

You will receive the following error:

HTTP/1.1 500 Internal Server Error
Server: nginx/1.7.10
Date: Tue, 24 Mar 2015 22:11:29 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 69
Connection: keep-alive
X-Powered-By: Express
Access-Control-Allow-Origin: *
Vary: Origin, Accept-Encoding

{
  "errors": [
    "You have already submitted an application"
  ]
}

This is obviously a rarely encountered error, but let's take care of it anyway.

should create a shortened url fails

  1. API URL Shortener should create a shortened url:
    Uncaught TypeError: Cannot read property 'should' of undefined
    at Test. (/Users/isaac/Documents/hacksu/kenthackenough/test/test.js:303:24)
    at Test.assert (/Users/isaac/Documents/hacksu/kenthackenough/node_modules/supertest/lib/test.js:221:6)
    at Server.assert (/Users/isaac/Documents/hacksu/kenthackenough/node_modules/supertest/lib/test.js:132:12)
    at Server.g (events.js:199:16)
    at Server.emit (events.js:104:17)
    at net.js:1392:10
    at process._tickCallback (node.js:355:11)

I'm not really sure what's causing this. Probably something I did when trying to install and setup libraries but I'm not sure.

Add a route to get usernames

There should be a route to map user IDs to usernames for display.

/user/name/:userID
Returns: the name of that user

Tokens never expire

Need to implement a token expiration/refresh system.

  • Tokens expire after given period of time
  • A way for admins to force refresh of every user's token
  • Trigger token refresh on password change

Search not working on servers

The /users/application/search?q=String route works on Vagrant machines, but on development and production servers, it does not.

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.