Hacker Newsnew | comments | show | ask | jobs | submit login
Hackathon Starter – Boilerplate for Node.js web application (github.com)
277 points by sahat 454 days ago | 50 comments



If you want boilerplate, the Yeoman collection tools: http://yeoman.io/ is what you need. There's boilerplate for a huge amount of projects, with generators of the parts (like: service for Angular, models for Ember, routes for Backbone...). The angular-generator is a very complex piece of work, but is extremely efficient. I highly suggest you to try it twice: once to fuck things up, another to understand the good way.

You can eventually use these CSS and HTML skeletons (http://html5up.net/) to do something neat, but I don't think someone will judge you because you used bootstrap.

In term of javascript development, I've found SugarJs (http://sugarjs.com) to be extremely productive and efficient for what I need, combined with the front-end framework of your choice.

And you, what's yours ?

-----


If you find that the Yeoman flow requires too much setup and ceremony, Brunch (http://brunch.io/) is a good lightweight alternative - faster to set up and also just faster in general at compiling assets. They have a lot of community-created app skeletons, and I've found it pretty useful at getting projects bootstrapped quickly without reinventing the wheel.

-----


Thanks ! I'll definitely test that !

-----


I love Yeoman, but after a very quick search I didn't see a nice generator with the OAuth 2.0 Authentication worked out, which can be handy.

There's the possibility that this project could be especially handy if it were turned in to a generator.

-----


This is, i think, the main problem of their approach of the yo-catalog. So many packages who does so little things when we prefer to have little that do many.

We are the community, it's ours to think of a way to make a better yeoman ecosystem.

-----


Web development newbie here: So how would I have used Yeoman to create something like Hackathon Starter?

-----


Well, yeoman provides 3 tools: Yo, Grunt, and Bower. The first handle boilerplate and scaffholding, the second automation and the third is for 3rd party libraries provided to the browser (npm/gem/pip for the browser).

They have a catalog and as soon as you have choosen what you wanted inside, it keep things updated, clean dependencies, etc. The thing is, you still have to do the choices yourself. So, as a newbie, you quickly find the profusion of packages overwhelming.

So, assuming you want to make Hackathon Starter and you know how to do it you could:

1. Use this Generator: https://github.com/lukelarsen/generator-node-express that will boilerplate + scaffold your backend

2. change the rendering engine in server.js to Jade

3. Install front-end componnents: (do `bower install <component>` * font-awesome * lato * jquery * bootstrap

4. Then you'll write these nices views because that can't be generated. That's where the value of this project is.

5. This yeooman generator doesn't provide passport (auth system for Node) so you'll have to write it too. Maybe i didn't pick the best generator, sorry for that. Again, the project has lot of value with the working Passport system.

6. Glue things together with Js and CSS in the front-end, because that can't be generated neither.

There is work in this project, and yeoman is not the silver bullet. Just another tool to make things faster.

-----


We use our product Exponential.

Exponential.io is Tooling as a Service. Basically, it creates 3 things really well via automation:

1. API

2. Angular app (and connects to the API)

3. Express app (optional. used for SEO)

-----


signed up for your beta, was a bit confused there was no confirmation of sign up (email, or web) as it just returns to the homepage.

-----


Same. No download available. As a big MEAN fan I would love to try it out.

-----


Thanks for the links. I'm just getting started with Angular, in particular, so the link to the generator is an interesting piece of tech for me to pick through.

-----


So I visited html5up.net and none of the demos want to load in firefox or chrome. Is it just me? Some of those templates looked quite usable :(.

-----


Oddly enough it works perfectly fine in Chrome Version 33.0.1750.46 beta-m but it doesn't load in Firefox V 24.0, V 25.0 or V 26.0 so something is wrong with the page. It seems to load the iframe but instead of loading the whole page it just loads some widget div with nothing in it.

-----


There's also a nice tool called Lineman http://www.linemanjs.com/. It's a simple convention-over-configuration-get-out-of-your-way command line utility that does all the heavy lifting so you can just code your app.

There are a number of templates[1] to get you started and once you get over the initial learning curve lineman fades into the background while you iterate on your app.

For a comparison with Yeoman see: http://www.linemanjs.com/#lineman-vs-yeoman

[1]: http://www.linemanjs.com/#project-templates

-----


Wow thanks for the kind words!

-----


The use of the word "kickstarter" is pretty confusing here. My first thought was that this was something people at hackathons could use to put up ideas and see who's interested in joining them. I guess I should have noticed the lowercase "k".

-----


You should also checkout Drywall (http://jedireza.github.io/drywall/)

Has all major oauth integrations and a fantastic user system... I have also heard that it was used a bunch at node knockout recently. Definitely worth checking out-

-----


I've used Drywall - it makes standing up a service nice, however I dislike their backbone on every page vs single page app. I wish they would have done that diff, but its easy to use the existing API for things like resetting passwords and sending emails.

-----


Another vote on Drywall as well. I do agree though with your backbone vs single page comment. That bugged me - but can't complain.

-----


Is XCode or Visual Studio really a prerequisite? I guess I'm missing something, but looks like I could do this in IntelliJ or even sublime. Looks very interesting but I don't use either of those and don't have the current ability to run out and buy a Mac and have no interest in developing on Windows.

-----


Via the GH issues list:

> Both mongoose and bcrypt libraries (and could be a few others) require gcc build tools in order for those packages to be installed. On Ubuntu you would do sudo apt-get install build-essential. On Mac you would need to install Xcode to get the command line tools, and on Windows you would need Visual Studio.

-----


On newer versions of OS X, invoking gcc will prompt you to install the command line tools. This means you don't need all of XCode.

The best (visual) example I could find is on this page: http://railsapps.github.io/xcode-command-line-tools.html (scroll down a bit).

-----


or just mingw. No need to download 3Gigs+ of software just to compile C++ code.

-----


This is so cool! Has anyone seen anything similar for a python flask app boilerplate (with OAuth + how to use guide)?

-----


Not that this will particularly help you, but if anyone else has the same question about Rails:

* http://www.johnhenryrails.com [1]

* http://www.railsbricks.net

* http://railsapps.github.io/rails-composer/

Full disclosure: I'm the author of the [1]

-----


I'm working on one for this Wednesday. Let me know if you're interested.

-----


Definitely! Let me know

-----


Sure thing - just drop me a line (email in profile).

-----


I know it's shameless, but what are comments for if not self-promotion... I'm working on something like that too:

https://github.com/rocco/node-base

My focus is on clean structure, completeness of tools and documentation (mostly inline) so you not only get a node/express/jade/everyauth/mongodb app but also can learn what's going on and how it all works together.

SPA app on top coming up ...

-----


Can I ask why you chose everyauth over Passport? (I'm the developer of Passport.)

By all accounts, Passport is by far the more popular authentication package (95,000 downloads from npm in the last month vs. 2,100 for everyauth). Furthermore, maintenance of everyauth seems to have come to a halt, leaving outstanding bugs and issues unaddressed. In contrast, Passport has 100% test coverage, and has an API that's been proven stable over ~2 years.

-----


Sure!

I guess when I decided everyauth over passport about 4 months ago (there was an actual decision process IIRC) it seemed like everauth was more mature, I found more examples and other repos explaining how I could bend it to my needs.

Recently I've come across passport quite often and it appears to be the gold standard nowadays... So yes it's going in at some point in time (this is a minor side project only).

I will happily merge a pull request if you care to go for it - I currently only support facebook and twitter and was working on local user/pass up until an hour ago ... ;)

-----


A boilerplate for Node.js would be less confusing.

-----


Very nice! This is a much better (and updated) version of my express-foundation project I created for hackathons: https://github.com/driverdan/express-foundation

I've pretty much abandoned express-foundation since I haven't been to a hackathon in a while. This repo pretty much seals its fate.

-----


I think the differentiator here is the amount of documentation and that they make no assumptions about your system. For instance, telling me I need XCode to even build some of the libraries - not something I see in very many docs but absolutely something I see people run into at events like Startup Weekend.

-----


As a casual hackathon participant, this is a really great tool. I've seen countless teams with winning ideas go down in flames when they spent two days on the log-in page. And I attribute any success I've had at hackathons more to my ability to prioritize away from those activities than my actual programming chops, which are average at best.

The biggest advantage you'll get out of this system is that it's simple, and you know it in and out because you built it. With all of the other tools that do the same thing, you run into the same problem: you don't have time to learn a new tool at the hackathon. By the time you've figured out Yeoman (which looks really cool), you only have a few hours to implement your app's actual functionality.

-----


I don't think I've ever even tried to implement a login page at a hackathon. I just pretend that every user is authed and go to work on the cool stuff that I'll actually demo.

Since it takes up valuable time to show off "auxiliary" pages like account setup, I think it's okay to just skip 'em. Most people won't mind, as it's well understood that hackathon projects are not ready for prime-time.

-----


Unfortunately requires Mongodb as every other boilerplate Node.js app.

-----


Eh, typical HN hip technology framework ;).

-----


Cool work, but like others say, the title here is confusing.

-----


I wondered when this day would come. This project doesn't consider Linux a platform you develop on https://github.com/sahat/hackathon-starter#prerequisites, but rather a platform you deploy to, if that. Heroku is so abstract it could be almost any OS.

-----


Jesus, this is an enormous step up from mean.io and also from CLEAN[1], my fork of mean. Huge thanks for this, will become my new boilerplate. Anyone up for mantaining a Coffee fork? I think I'll do it.

[1] https://github.com/gadr/clean

-----


Kudos !!

Awesome, this is what I wanted to make. We should make this config driven. say what Oauth/logins to be enabled, etc.

Any one starting a new project should use this this config and be able to get desired features up and running in minutes.

-----


The instructions for setting up authentication accounts on github and google saved me so much time. I wish I could give this all the stars.

-----


Thanks for posting this. I am particularly interested in the OAuth2 portion. I'm going to go pick through your code now. :D

-----


Cool! Is there anything like this for Rails?

-----


I usually reach for Rails App Composer to spin up quick apps. http://railsapps.github.io/rails_apps_composer/

-----


Or you could use http://hull.io and not even need backend code

-----


Awesome work! I think the tag line "boilerplate for node.js hackathon apps" would be more fitting.

-----


Does anyone know of a similar project in Ruby?

-----


I think it should include a Gruntfile.

-----




Guidelines | FAQ | Support | API | Lists | Bookmarklet | DMCA | Y Combinator | Apply | Contact

Search: