Brandon Bayer

Blitz.js - Rails-like framework for React apps, built on Next.js

⚡️Blitz is a Rails-like framework for monolithic, full-stack React apps — built on Next.js

Add a comment

Replies

Best
Victor G. Björklund
Using Next.js but never used ruby on rails. Whats the benefit of using this instead of next.js?
Brandon Bayer
@victorbjorklund Blitz provides all the stuff Next.js doesn’t and eliminates the majority of decisions and grunt work for starting a fullstack React app. Straight out of the box you get best-in-class integrations for all the things every app needs: DB migrations, authn, authz, testing, async jobs, etc. The special sauce is the Blitz queries & mutations. You import them directly into your components like a local function, but at build time Blitz swaps in an RPC layer that runs the query/mutation on the server. So as a developer you don't have to build an API or think about fetching from your API, but it does use an API behind the scenes.
Gabe O'Leary
This sounds a lot like https://redwoodjs.com/ How would you compare the two?
Brandon Bayer
@golear great question! Redwood is tooling and conventions around the normal React/GraphQL stack. The frontend and backend are deployed together, but they are very much still separate projects (it requires yarn workspaces). Also, the GraphQL API is a key part of it. But Blitz takes a totally different approach that’s never been done before with React. You don’t have to build or use an API for Blitz apps. It's truly fullstack — the frontend and backend blend together. The developer experience is very much like a traditional SSR framework such as Rails/Laravel but this is all JS and React. You import Blitz your server-side queries/mutations directly into your components like a local function, but at build time Blitz swaps in an RPC layer that runs the query/mutation on the server. A final key difference: Blitz is built on Next.js, but Redwood is not.
Junaid Kabani
@golear @flybayer How do you think it differs from this project: https://github.com/nice-boys/pro...? They make Prisma a Next.js API route. Projects seem similar.
Brandon Bayer
@golear @openshiporg that is like a new app boilerplate, so it’s not even close to being a framework.
Gabe O'Leary
@flybayer Thanks for the response. I'm curious if I have an application that is heavy on business logic is it more sensible to use something like Redwood or does Blitz enable easily adding business logic to the "backend"?
Brandon Bayer
@golear No, Blitz would be perfect. We’ve designed Blitz explicitly for complex business logic!
Brandon Bayer
Hey Product Hunt! I'm super excited to launch this new framework I and 28 other contributors have been working on for the past 11 weeks! ----------------- Blitz brings back the simplicity and conventions of server-rendered frameworks like Ruby on Rails while preserving everything we love about React and client-side rendering! Blitz is the framework for the 99% of us at companies with <100 employees. This means we don't force you to use advanced technologies like GraphQL. We let you add advanced technologies on your terms and at your pace. Blitz maximizes your productivity both when starting an app and when scaling it to lots of code and users. ✅Features: ⚡️ Built on Next.js ⚡️ Don't have to build an API for client-side rendering ⚡️ Client-side rendering, Server-side rendering, and fully static pages all in the same app ⚡️ Full Typescript support with static, end-to-end typing (no code generation step needed like with GraphQL) ⚡️ React Concurrent Mode enabled ⚡️ Database/ORM agnostic, but Prisma 2 is default ⚡️ CLI with code scaffolding, Rails-style console REPL, etc ⚡️ GraphQL Ready ⚡️ Deploy serverless or serverful 👀Other key features coming: ⚡️ Highly secure authentication ⚡️ Authorization you can use on both server and client ⚡️ Model validation you can use on both server and client ⚡️ Plugins for easily adding libraries like Tailwind, CSS-in-JS, etc. ⚡️ React native support ⚡️ GUI so you don't have to use the CLI ⏳Timeline 🚩 1 week from idea to prototype & first announcement 🚩 7 weeks of research 🚩 3 weeks of development ✅ 11 weeks from idea to fully functional alpha + 28 amazing contributors, ~10 who are active 🤓Try it yourself! > npm i -g blitz > blitz new myapp P.S. There's still a lot of work to do, so you are especially invited to join us in building Blitz! A good place to start is The Contributing Guide: https://github.com/blitz-js/blit...
Wilbert Liu
Congrats for launching, Brandon! It’s truly ambitious idea and I hope it would be an important tool to get things done quickly, as what Rails has done. Have fun on your launching day! 😊
Brandon Bayer
@wilbertliu Thank you Wilbert! It's been SO fun to work on!
Aaron Clark
Looks interesting. Are you planning to post any tutorials or example quick apps built w/Blitzjs?
Brandon Bayer
@byaaronc yes, we have a tutorial in the works, and you can see an example app in the repo at `examples/store/` But we also encourage anyone else to create tutorials, videos, blog posts, etc!
Yogeshwar Tanwar
is it similar to https://www.meteor.com/ with more flexible options and react frontend focus ? or hows its different to meteor concepts wise ?
Brandon Bayer
@yogeshwar_tanwar yeah, sort of that! But I’ve never used Meteor, so I can’t compare! I do know Meteor locks you into a lot of things like MongoDB. But the only thing Blitz locks you into is Next.js. Everything else is totally replaceable.
Ty Cooper ( ₿ )
Do you have this for vue?
dylan
@tycooperaow Hey! Vue support is in our backlog, but that likely would be a long way off, if it ever happens at all.
Darshan Gajara
Congrats on the launch, Brandon.
Anthony Lee
Interesting. I love Rails and still use it for most of my projects. I like the Convention over Configuration approach of things. Congrats and will definitely will test it out this week.