Live data from Hacker News

Ask HN: Hunting for a Framework

news.ycombinator.com

31–40 of 70 posts

Re: Ask HN: Hunting for a Framework

#31
I think...Rails is what you're looking for.

Reactivity is not an issue anymore with the HOTWIRE stack in rails or there's the even better StimulusReflex gem that you can use for reactivity and realtime features.

Re: Ask HN: Hunting for a Framework

#33

When it comes to Authentication and Authorization, these are both core components of a system but undifferentiated building blocks so wouldn’t recommend building them yourself. Typically using something like Auth0, Cognito, Firebase Auth, FusionAuth, Clerk or many of the other authentication services will get you a full feature set for user management with little to no work. On the authorization front consider a simi…

I could not disagree more — allowing a third party to own the most crucial data in your app (the users) is a big mistake. I’ll admit to only having experience with Firebase for third-party auth, but in my experience the drawbacks of splitting auth and user related code between two systems soon outweighs the benefits of getting up and running quickly. Auth code is undifferentiated, but if you have experience building…

I want to disagree with both of you - the sweet spot is often 3rd-party authN, 1st-party authZ:

* don’t try to implement the hard/annoying bits (strange access detection, account recovery, sending emails, password storage)

* keep ownership of your user list and users’ capabilities

Re: Ask HN: Hunting for a Framework

#34
Ruby on Rails https://rubyonrails.org/ seems to meet all of these requirements:

- ActiveRecord is wonderful for data schemas: https://guides.rubyonrails.org/active_record_migrations.html

- ActiveRecord form validations is excellent and defined only on the model

- Scaffolds automatically generate create/read/update/delete endpoints: https://guides.rubyonrails.org/v3.2/getting_started.html#get...

- Websocket-driven updates provided by Hotwire / Turbo Streams: https://turbo.hotwired.dev/handbook/introduction

- Authorization and Authentication by Devise: https://github.com/heartcombo/devise

HAML is wonderful as a templating language as well.

Re: Ask HN: Hunting for a Framework

#35
T3 stack: https://create.t3.gg/ https://github.com/t3-oss/create-t3-app

It's Next.js, Typescript, TailwindCSS, Prisma, NextAuth, tRPC.

> I know about Node.JS, Angular, React, Express

You already know just JS. Stick with JS framework, not these Rails suggestions. Next.js is by far the biggest JS framework (ChatGPT page? half the recent YC co's? Next.js), the rest are the niceties around it to get to a full solution.

> A central definition of data schemas. I don't want to define my schema or validation twice, once in the frontend and once in the backend.

T3 stack uses Prisma, a JS/TS "ORM". Your data schema will live in a .prisma file.

> Automatic generation of REST endpoints. I hate boilerplate code and don't want to reimplement Get/GetOne/Add/Update/Delete and Websocket for each data model. Even better would be a GraphQL interface.

Includes tRPC setup. Give the automated tRPC endpoints a whirl. It's not auto-gen get/delete/etc. (like Django/Rails models) on the server, but the endpoint you create on server very quickly will auto-gen the func call available on the frontend.

> Authorization and Authentication

Includes NextAuth.js setup

Re: Ask HN: Hunting for a Framework

#38

Remix, zod, tRPC(if/when API endpoints are needed), Typescript, Prisma. This stack is gorgeous. Same language and type definitions front to back is a game changer. The realtime aspect of what you are looking for is the hard part. The only options I know of are the remix stack above (you still have to do some extra plumbing), elixir/Phoenix (or other turbo links like options but most aren't fast enough). To do realtim…

Aside from replacing Remix with Next.js, this is also what I would recommend.

Remix makes things that were simple hard (apparently with the goal of doing _everything_ on the server again).

Re: Ask HN: Hunting for a Framework

#39
This is what ChatGPT says about your question:

> There are a few full-stack JavaScript frameworks that you may want to consider, such as Meteor and Sails.js. These frameworks can help you to avoid writing boilerplate code and automatically generate REST endpoints for your data models.

> Meteor is an open-source framework that includes a number of features to help you build full-stack web applications quickly and easily. It has a central database that allows you to define your data schemas, and it can automatically generate REST endpoints for your data models. Meteor also includes built-in support for real-time data synchronization and automatically updates the client whenever the server data changes.

> Sails.js is another popular full-stack framework for JavaScript. It is built on top of the popular Express web framework and uses a Model-View-Controller (MVC) architecture. Sails.js can automatically generate REST endpoints for your data models and also includes support for real-time data synchronization using WebSockets. It also has built-in support for authentication and authorization, so you can easily add user login and security to your application.

> Both Meteor and Sails.js are open-source and can be easily extended to add additional features or support for custom data schemas. They can help you to avoid writing boilerplate code and focus on building the business logic of your application. I hope this helps! Let me know if you have any other questions.

---- Human again: At a glance, both of these seem worth investigating! Combine them with Next and you can stay within the JS ecosystem.

Re: Ask HN: Hunting for a Framework

#40
RedwoodJS seems to tick the boxes although I'm not super clear on the real-time aspect. I don't see it from scanning the docs. I think RedwoodJS has to be tried given your requirements.

Personally, I'd say go with Supabase, and then try SvelteKit or use React/next.js. Supabase handles the data access, mails the real-time, and bakes in auth in the right way. Decoupling the front end lets you choose and adapt the right front-end framework.

This stack does not come with schema migrations, so that is a compromise. Your data access can be typed (generate typescript from Schema). For a side project, you could edit the DB and save the schema. Maybe someone has built a good two-way Supabase typescript bridge. Supabase comes with a one way typescript generator.

Post reply on HN