6 ms·
Show HN: Mega Boilerplate
- gepesz 10y agoGood stuff!
- sleepychu 10y agoPage isn't loading for me. Github is though. https://github.com/sahat/megaboilerplate https://github.com/sahat/megaboilerplate
- sahatyalkabov 10y agoRequests per second were going through the roof during initial announcement due to a lot of images, css, and javascript being served by the main Node.js app. Assets are now served from CDN, albeit hardcoded, but that I can fix later.
- deleted 10y ago[deleted]
- rosalinekarr 10y agoWow, as a long time RoR dev set in my ways, you may have finally given me the tool to overcome my laziness and check out this new fangled "server-side javascript" thing.
- sahatyalkabov 10y agoThe server-side JavaScript hype is real and it is awesome! React option comes with Redux, React Router and with server-side rendering enabled. I have also gone through all the obstacles of setting up authentication with server-side rendering. If the code doesn't make sense, I will try to create a small diagram of the user auth flow.
- dinosaurs 10y agoI wouldn't mind seeing that diagram. Just downloaded the React option and I'll definitely be going through the code as a learning process; server-side rendering still doesn't really click with me. Thanks!
- pheelicks 10y agoThe layout is broken when viewed on mobile (iPhone 6). While this might seem like a minor nitpick, first impressions count.
- pc86 10y agoA. I am fairly certain you are being downvoted not for your overall comment but for the last sentence, which is irrelevant and needlessly judgmental. B. "iPhone 6" says nothing about what browser or iOS version you are using.
- sahatyalkabov 10y agoI don't see any layout rendering issues on iPhone 6s Plus/iOS 9.3.2/Safari Mobile. If you could open a GitHub issue and include a screenshot, that would be great.
- PhrosTT 10y agoYou building a single page app from your iPhone?
- dimxasnewfrozen 10y agoWow! As someone who struggles to configure all of these dependencies, I love this. I also have difficulty learning new stacks by following the hello world/todo examples in the documentation so having a real boilerplate app built helps tremendously. Maybe I'll finally try and learn React ;)
- dvcc 10y agoI hate to sound negative, but what does it offer over yeoman and the individual generators out there? If I use a Mega Boilerplate setup, I lose scaffolding post-setup stage, so what do I gain?
- projectramo 10y agoI agree that it serves almost the same purpose, but for a beginner, seeing all the layers, what they do, and choosing them piecemeal is a great way to learn quickly before graduating to the yeoman ecosystem.
- blowski 10y agoYep - I get confused between Grunt, Gulp, Yeoman, Bower, Node, React, Angular, jQuery, TypeScript. How do these things fit together? Why would I choose one over another? As a predominantly backend developer, If I just want to have a 2016-style workflow for the frontend part of my site, it's really hard!
- underwater 10y agoI used React Starter Kit for a project and greatly regretted it. In the end I would have been better off taking the time to learn how the parts fit together myself. With the boilerplate I was locked into the questionable decisions and brittle implementation of the original author. Changing anything usually broke my app and because I had taken the starter kit shortcut I didn't have the understanding of how to fix it.
- projectramo 10y agoI think of the download button as optional. What I like about the site is the visualization. So, for instance, you know that Express is an alternative to Meteor, not a complement. And that Jade/Handlebars work with Express and are alternatives to each other. Just having that for all the combination of names is valuable. Basically, it helps you understand the taxonomy.
- dvcc 10y ago
- rufus42 10y agoAt least the AngularJS + NodeJS boilerplate isn't using the latest suggested style guidelines and folder structure. But great first start!
- sahatyalkabov 10y agoLast time I have used AngularJS was in 2014, so that's why the project structure looks a bit dated. I am open to suggestions on how to improve it, or even simplify it further.
- rblstr 10y agoI'm so impressed with your project's documentation (README), nicely done!
- sahatyalkabov 10y agoThank you! It is still work in progress. It will be improved upon in the next several days.
- AbraKdabra 10y agoBeautiful README.
- GnomeChomsky 10y agoLooks really helpful! How would I get started learning when combining this with Cloud9?
- fredwu 10y agoAwesome effort! I love the folder structure, very easy to follow. A small feedback: I just generated a React-based stack with a few Auth options - Email, Facebook, Google and Twitter. The resulting `user.js` controller is 550 LoC. It would be great if by default some of these logic are encapsulated in a service layer rather than littered in the controller itself. :)
- sahatyalkabov 10y agoThanks for the feedback! Agreed, it makes sense to refactor those routes into its own Auth controller. I will open a GitHub issue. However, some of the code is intentionally written that way to keep things stupid simple and easy to understand for developers of all skill levels, which you would normally encapsulate into a service in your own app.
- rhizome 10y agoYou can call it "refactor-ready." ;)
- kristiandupont 10y agoVery nice! One small bit of UI feedback: your checkboxes look disabled and checked when unchecked IMO.
- sahatyalkabov 10y agoThanks! You should see the updated checkbox if refresh the page.
- wigster 10y agonice - could do with a none option on the template engine
- sahatyalkabov 10y agoIt was originally there, but was later removed to keep things simple, specifically with rendering the initial React layout.
- noonespecial 10y agoThat's really cool. Even if you don't find the project itself all that useful, bounce on over to the github and have a look. This is a good example of how to put a project together and share it with the world. Kudos.
- joeyspn 10y agoGood Job. Hope it gets traction... Looking forward to Angular2 and Meteor additions. Express tip: add swig template engine Angular tip: use a feature per folder structure for better componentization and "controller as" syntax (checkout John Papa's styleguide).
- sahatyalkabov 10y agoLooking forward to Angular 2 myself! I have actually started with swig template engine until seeing NO LONGER MAINTAINED notice on their GitHub page. Many have recommended to use Mozilla's Nunjucks instead.
- anonymous_shoe 10y agoWould love to see an option to use Relay and GraphQL
- sahatyalkabov 10y agoI will consider adding it in the near future. It was originally on the roadmap, but don't have any experience with either Relay or GraphQL. In any case, I will open an issue on GitHub for this and do some research later.
- anonymous_shoe 10y agoThat would be awesome! I've been working with Relay and GraphQL since they were released. Having messed with most of the boilerplates in that ecosystem, this one is the best IMO: https://github.com/fortruce/relay-skeleton https://github.com/fortruce/relay-skeleton But I would love to see it with a testing framework, a css pre-processor and a production build script. I'll track the issue and see how I can help.
- ef4 10y agoI'm going to go against the JS ecosystem grain and say that boilerplates are a total anti-pattern. And not because you should be doing this stuff by hand either, which is probably the second most popular answer. "Boilerplate" implies copying a bunch of code into your project that should be library code but isn't because it's too poorly designed to have an API cleaner than "just fork it, YOLO". It's dramatically harder to update than something with well-designed API boundaries. Your web app really isn't a unique snowflake. Shared, standardized toolchains are harder to build but once you do they're a dramatically better long-term investment. In Javascript it's really just ember-cli that operates this way, which started in the Ember community and has now also been adopted by Angular.
- pmelendez 10y ago> "Boilerplate" implies copying a bunch of code into your project that should be library code but isn't because it's too poorly designed to have an API cleaner than "just fork it, YOLO". That's a bit too simplistic. Even if the majority of the boilerplate code live in libraries, you don't need all the libraries for all your cases. Then your options would be either something like this or adding unnecessary dependencies for the sake of reducing boilerplate. To me this is the lesser evil between those two options.
- andrewstuart2 10y agoAs always, there are trade-offs between the two approaches. Libraries may be a great approach, but they lock you into the implementation they chose, and the individual components they chose. With many boilerplate/scaffolding solutions (yeoman, for example), you're given some quick templated code and left to implement logic yourself. You're free to swap out implementations anytime you want, without having to fork the library, or force library developers to maintain overbearingly abstract interfaces so that dependents are free to swap in some other component. Neither is a perfect approach. The best solution will vary with the flexibility you need for a given system. Anecdotally, the best projects I've worked on were built using a combination of libraries, frameworks, and scaffolding tools. I attribute this to the fact that the tools we used were (at least among) the best at doing one specific thing (render the app, scaffold, build, serve, etc.) and worked well together by not trying to do all things equally well.
- hookshot 10y agoJust a heads up, using safari on OSX there are big blank boxes over the hero text and I can't select radio boxes.
- Jean-Philipe 10y agoIt's not exactly how I would do it (of course!), but close enough for me to try it on my next project! I love the choice of modules on the server side. Seems like a lot of thinking went into this boilerplate. I'm curious how it will work out for me in practice.
- romanovcode 10y agoAm I the only one who likes to build his own projects from scratch?
- pssdbt 10y agoClicked and said "Ha, funny satire, boilerplates really ARE getting ridiculous", but from comments this is for real. Sounds good.
- neil_s 10y agoThis is so awesome, great way to understand the current options and common choices in the ecosystem at a glance. I've been choosing Meteor recently precisely to avoid having to write a bunch of boilerplate Gulp/Grunt code to piece all the tools together and run the code and asset files through the pipeline.
- kaimaoi 10y agoGreat project. Thanks for sharing! Any plans to add hapi as one of the framework options?
- sahatyalkabov 10y agoI had originally started working on Hapi generator (there are still some leftover files in the Git repo), but decided against it after running a quick Node.js Framework survey among my Twitter followers. Given the amount of effort it would take to add a second Node.js framework and the low demand for it, it was simply not worth it.
- matthijs_ 10y agoCan understand that, but it does seem that hapi is gaining popularity, hope you'll reconsider!
- abustamam 10y agoAwesome! Will definitely use it for my next project!
- soared 10y agoI really like the design of this site. Is it full custom bootstrap?
- sahatyalkabov 10y agoI started with vanilla Bootstrap, but then it was iteration upon iteration of small UI changes. Here is how it looked in December 2015: https://twitter.com/EvNowAndForever/status/678428799780851712 https://twitter.com/EvNowAndForever/status/67842879978085171...