taijinlee / eulermarks

2 stars 2 forks source link

EulerMarks, a Project Euler Benchmarking site

Install procedure

  1. Install nvm
  2. Install latest version of node (check on nodejs.org)
  3. Install and run Mongodb on standard port
  4. Install node modules in base directory via npm install
  5. Create a new app on github and point url: http://localhost:4000/, callbackurl: http://localhost:4000/api/auth/github (assuming you're using the default port 4000)
  6. Copy config file config/default.js.sample to config/default.js and fill in the appropriate fields
  7. Manually change web/js/router.js urlFragment for github client_id. Yes. Very hacky. Need to fix this.

Makefile

High level framework documentation

The framework is built in layers. Layers can be asynchronous.

  1. PreRoutes -- code for segments of the site based on route (think admin) (app/preRoutes)
  2. Routes -- routes for a single resource only to transform parameters (app/routes/)
    • calls middleware for parameter checks (app/middleware)
  3. Handlers -- handles insertion into history (app/handlers/)
    • returns data when read operations
    • writes minimal amount of data to log what happened in history for write operations (history/history)
  4. Historian -- business logic of what tables to populate based on what has happened (historian/)
    • async
    • right now called right after a history element is inserted, but can be decoupled more

Rebase workflow

For collaborators, I prefer rebase workflow as opposed to merge workflow. I believe all pull requests are merge workflow so I don't know what to do about that yet. At this point I think all potential contributers are collaborators on the project.