Ask HN: Hunting for a Framework

64 points by JaFu0815 a year ago

Hello HN!

My primary background is in desktop development and my knowledge of web development is a little rusty by now. I know about Node.JS, Angular, React, Express and the like and have done a few small projects with these technologies. So far, I have implemented the below requirements for each project myself or copied them from previous projects. Now I am looking for a reasonable fullstack framework with the following requirements:

- 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.

- 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.

- Authorization and Authentication

- No manual HTTP calls for standard cases. I want to define my model at the server and have the data available in an array at the client. As soon as a client inserts a record in his list I want that automatically a POST with the new record is sent to the server, it verifies the model and the authorization and inserts the record into the database. Then the server notifies the other clients about the change using websockets. The other clients see the new data record in their array without having to write a single manual HTTP call or websocket connection.

- Open Source Only. No Firebase or similar.

I've been searching for a while, but haven't found anything that seems reasonable. If I don't find anything I will write a small framework myself. I apologize if I seem lazy and don't want to search myself, but I'm really getting desperate. I want to spend as little time as possible on writing boilerplate and instead write business logic. There are thousands of javascript frameworks out there but none of them seem to handle these simple standard cases very well. They all require manual implementation of CRUD for each model or manual data fetching and subscription. Please make suggestions for frameworks and help me to see through the framework jungle!

compumike a year ago

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.

eagsalazar2 a year ago

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 realtime updates natively you need to move to evented data front to back and that is a very big move away from models the way we normally think of them. Check out eventide or resolv.js.

  • ch4s3 a year ago

    > elixir/Phoenix (or other turbo links like options but most aren't fast enough

    Phoenix specifically doesn't work like turbolinks. LiveVIew in Phoenix uses a websocket to transport data, morphdom to patch the dom, and a light process on the server to manage state. It's as fast as the internet connection for insertions into a list. In fact it is quite capable of parallel data loading just like remix, and the server can work share in parallel across as many cores as you have available on the server.

    • lakomen a year ago

      How many concurrent connections can elixir handle on an average 5 year old xeon e3 with 32gb RAM?

      • ch4s3 a year ago

        Probably a lot depending on your workload. Here's a 2015 article about getting to 2 million concurrent connections[1] with Phoenix channels. They used a bigger rack space box, but it was 7 years ago and Phoenix and Elixir have both improved a lot here. Here's another example of someone hitting a laptop with 840,000 connections[2] on an intel mac with the following specs:

        > 2.5 GHz Quad-Core Intel Core i7 16 GB 1600 MHz DDR3

        Obviously memory starts to be a constraint for doing anything meaningful, but you can squeeze a lot out of 32gb of ram.

        [1]https://phoenixframework.org/blog/the-road-to-2-million-webs...

        [2]https://josephmate.github.io/2022-04-14-max-connections/

  • Aeolun a year ago

    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).

    • bcjordan a year ago

      create-t3-app is a great starting point for folks going this path. Has optional checkboxes for db/ORM/migrations (prisma.js), auth/sessions (next-auth.js), tailwind CSS, typed client/server communication (trpc).

      https://create.t3.gg/

      https://github.com/t3-oss/create-t3-app

      I hadn't touched much webdev for a few years, the ecosystem / build tooling has gotten a LOT better. It's back to being fun and painless to spin up a new webapp.

      • zulvkr a year ago

        A few hours ago, I tried to setup trpc using recommended boilerplate, I also tried fresh default T3 after that.

        Both got error, which seems to be due to next/next auth dependency breaking. So it's not that painless I guess.. I found this situation quite often with nextjs example template

        T3 author is very responsive though, so my issue resolved quickly

    • eagsalazar2 a year ago

      I can speak to a handful of things Remix needs to improve, but "makes things that were simple hard" is a very big generalization. Remix nets out for me big time. I've never been as productive with another framework. Also, remix does SSR but so do a lot of frameworks, is that what you mean when you say "__everything__ on the server again"??

matus_congrady a year ago

I recently created ~25 full-stack example projects using the most recent technologies and frameworks. I believe the following stack is the most productive, yet very scalable (doesn't use "leaky" abstractions).

Frontend:

  - Good, old, Single Page App. I believe that all these SSR/isomorphic rendering frameworks are a lot of times just unnecessary complexity.
  - Vite.js + your preferred framework (Vite supports React/Vue/Svelte, etc).
Backend:

  - Node.js + Typescript.
  - Trpc.io - while it's not "automatic generation of REST endpoints", it's very close. It's very easy to write your endpoints, and the added flexiblity/control is definitely worth the time spent writing them.
  - Trpc also has a built-in support for subscriptions: https://trpc.io/docs/subscriptions
  - Prisma + Postgres. Good, old, proven, flexible SQL database is always a safe bet. And Prisma makes interacting with it an order of magnitude easier.
  - The whole "network layer" is completely and very efficiently handled by Trpc. It also uses React-query under the hood: https://github.com/TanStack/query.
Infrastructure + deployments:

  - I would recommend going for AWS.
  - Frontend (statically built) can be hosted in S3 bucket behind a CDN. You should also properly configure caching headers returned by Cloudfront to make it work with SPA.
  - You can run your TRPC API in AWS Fargate container (behind ALB, or behind HTTP API GW). Alternatively, you can also run it in a lambda function.
  - To make the configuration of your Infrastructure/Packaging/Deployments 97% easier, have a look at
https://stacktape.com

(disclaimer: I'm a founder)

aviavi a year ago

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.

quechimba a year ago

I'm working on a framework in Ruby that uses Haml for templating. It is inspired by React and has a VDOM, but it's 100% server side and DOM-patches are streamed to the browser as state updates on the server. Callback handlers are just POST-requests and they are set up like this:

   ruby:
     def self.get_initial_state(initial_count: 0, **) = {
       count: initial_count
     }

     def handle_click
       update do |state|
         { count: state[:count] }
       end
     end

   %div
     %p Current count: #{state[:count]}
     %button(onclick=handle_click) Increment
I don't know if anyone would be interested in using anything like this.
  • shortcake27 a year ago

    I’m pretty sure there will be interest in this. I like working with FE frameworks but a lot of Rubyists don’t. Ideally many devs just want to work with haml/slim/erb and have an interactive UI without any writing any JS. Your example is really nice because it avoids an entire layer of FE state management / synchronisation. Not sure how much overlap there is with Hotwire as I haven’t really looked into it yet.

peteforde a year ago

Honestly, it sounds like you're describing Rails without saying Rails.

Is there a specific reason that you need to have an SPA framework?

  • czbond a year ago

    ^ This. Rails or even some mixup of Laravel with liveview. If OP is needing it for a personal project, just buy a starter template kit in one of these languages.

    Do NOT make your own framework, that is a doom loop of death. Lots of smart (and not smart) people have created frameworks for you..... focus on productivity only.

josefrichter a year ago

Phoenix LiveView. Some learning curve, but once it clicks, you’ll understand there’s very little reason to use anything else for web apps.

freddref a year ago

I would recommend Django, but it's really only the backend half of what you're looking for.

What you're describing sounds very nice though.

I've often wanted a VB6 equivalent for the web, but open source.

jcpst a year ago

After looking for enough time, it may be worth it to make some compromises, pick one and try building your application with it.

You may never find “the” framework.

Lately my default has been AspNet Core and C# (or F# if I’m feeling frisky). Not because it’s the ultimate framework for me (although it _is_ very good), but it’s what I learned, thanks to learning on the job.

I remain a microsoft skeptic though. I continue to dabble in other tooling just in case they lock down the framework or tools in the future. I like django, for example.

  • JaFu0815 a year ago

    I am in a similar situation. I have written most backends in AspNet Core, mostly because C# is usually my go-to language. I have looked into Blazor a bit. There are some aspects it does well and writing frontend in C# is very appealing to me, however, the way of datafetching is not the most elegant, as far as I have seen and can judge.

    • jcpst a year ago

      I’ve been using razor pages. For me it takes the abstractions I enjoyed with aspnet MVC, with less of the boilerplate- controllers, etc

tln a year ago

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.

  • Kabootit a year ago

    The Supabase CLI does have migrations (merge-diff approach that is wonderful) and codegen for DB types for the front-end to use. We've even dispensed with Prisma recently as the ORM and just use the Supabase Client for data access on the front-end. Whole API layer disappears.

    Add in a SvelteKit and deploy to a Vercel and you have a minimal yet powerful stack with everything you need for 90% of business CRUD app demands.

    • belmont_sup a year ago

      I agree with the usefulness of supabase. A product we built moved quickly with supabase. But as product(s) mature, you inevitability have to create api routes that can perform sql transactions, call other apis, and do basically any other special work that the supabase client can’t do.

      I still prefer keeping almost all work server side but then load it in the client ala remix/sveltekit loader style. This means I don’t have to build an API at all. Unless it’s a backend for a native client app (mobile, desktop, tv).

reducesuffering a year ago

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

bitexploder a year ago

Check out Elixir/Phoenix LiveView tech. It is the only easy system that will push updates to clients easily I can think of. Their twitter clone demo is cool anyhow.

simonbarker87 a year ago

Would RedwoodJS cover what you need?

You put Firebase in with open source only - would you consider an open source Firebase like Supabase? You can host it yourself and it’s open source.

OJFord a year ago

Consider OpenAPI for the first two points - you can define a schema (YAML or JSON) and use it to generate both server & client stubs.

Depending on the language/framework used it'll validate too - e.g. the python backend framework connexion (a thin wrapper around flask) will 500 if you return a non-conforming response, and 400/405/etc. if the request doesn't fit the declared schema, automatically.

cjblomqvist a year ago

I'm not fully sure but maybe Blazor (.NET) could suit your needs?

I have no idea what the status of MeteorJS is, but looks like it could fit your requirements.

alex-olivier a year ago

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 similar approach of decoupling the the component out of your codebase where the permissions logic is defined as policy rather than code. I work on Cerbos[1] which is an open-source, decoupled authorization layer for your software which does exactly this.

[1] https://cerbos.dev

  • jakelazaroff a year ago

    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 apps it’s also not particularly difficult. I’d recommend either picking an open source solution that you host yourself or just taking a few days to grind it out.

    • plugin-baby a year ago

      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

      • atsjie a year ago

        I disagree with all three of you.

        It depends on the use case.

necatiozmen a year ago

I recommend looking at open source react framework for building CRUD apps.

GitHub repo: https://github.com/refinedev/refine

It is headless by default and supports Material UI, AntDesign, Chakra UI, and Mantine.

It has connectors for 15+ backend services including REST API, GraphQL, NestJs CRUD, Airtable, Strapi, Strapi v4, Strapi GraphQL, Supabase, Hasura, Nhost, Appwrite, Firebase..

shivekkhurana a year ago

Not a framework but I'm tinkering with the following stack:

1. Hasura - DB + Basic APIS

2. Ory.sh for Auth/Authz

3. React on the frontend

4. Windmill.dev for Scheduling/Batch processing/ Background tasks

5. Docker for deployment

6. Fastify + Node JS for glue code (can use Windmill for Glue code too)

I have used Hasura extensively at 2 companies. It's well done and saves a ton of time.

You might also want to look at Retool (and its open-source alternatives). Web dev has become simpler now.

----

If you like code-focused solution: Rails, Laravel and Django are good options.

  • ta3411 a year ago

    I am loving Hasura so far. However, I am getting stuck with how to best write custom logic on top of this. For example: I have a products table, which Hasura will automatically generate schema for. But now I want to do a custom getProducts GraphQL query to do more advanced filtering (search, sort, ranking etc). What I end up doing it to have a remote schema. And now my clients need to understand two different product types (one generated by Hasura, and one generated by my custom remote schema. Do you have any advice on how to best resolve this?

    On top of that, do you typically parse these Hasura Apollo into your client models? Or do you use the fragments directly in UI code since it already support types.

  • cies a year ago

    > 1. Hasura - DB + Basic APIS, 2. Ory.sh for Auth/Authz

    Great choices!

    3. React on the frontend

    Here I'd go with Elm, and a generated GraphL API client. Here an example to play with (which btw also includes ZomboDB for ElasticSearch integration into Postgres)

    https://github.com/cies/low-code-backend-dockered

    > 4. Windmill.dev

    Look awesome, never heard of it. Tnx

    > If you like code-focused solution: Rails, Laravel and Django are good options.

    I think Kotlin/KTor, while not as full featured, is a much better alternative due to the strong typing discipline.

    • JaFu0815 a year ago

      Wohah, did not know about elm-graphql! I'm a big fan of functional programming and have written minor projects in elm, but the "slowness" of development has always discouraged me from actually doing something big with it. This stack might make this a whole lot better. Will look into it. Thanks

      • cies a year ago

        I tried it and it is INSANE how you can just focus on the UX/features and not have to worry about the boilerplate.

        This is not just FP, this is "no runtime errors possible" FP.

        With Elm-GraphQL your QUERY BUILDER is even fully type safe!

        Robust productivity for the masses.

  • belmont_sup a year ago

    Are any of your Hasura apis used for public APIs? For internal only APIs, hasura is great. But I wanted to craft a public api with a particular schema, but that leads to difficulties because it’s all database driven. It reveals too much internal workings.

yonixw a year ago

Apollo server on Express + Mongo can give you all of the above except "No manual HTTP calls for standard cases.", But I suggest watching a simple guide about those as it need some adjustment (like running yarn task of a watcher to fetch types from server to the client ect.)

Chris_Newton a year ago

As wonderful as a fully automated full stack framework would be, you might be hoping for too much magic here. Building distributed systems is fundamentally different to working locally and you can’t escape some of the extra complexity that comes with it.

For example, if you don’t want to make any manual HTTP requests to fetch data then the logical alternative is to fetch it automatically. What should be the trigger for your ideal framework to do that? Without any extra information, the framework can only know you need the data when your other code asks for it. It will have to fetch everything on demand, in real time, and that could be extremely inefficient both in terms of the number of requests you’re making over your HTTP channel and the database queries that will ultimately run on your servers. Even if the framework somehow has perfect caching on the client side and it pushes notifications when cached data needs to be refreshed, there will still be questions around which notifications to push to which clients, because in general the server will have no way to know which data that was requested earlier is still relevant to each client at some later time.

You’d also like updates sent to the back end automatically when you change your front end data structures, and not only that, you’d like them propagated out to other clients automatically as well. How would your ideal framework manage what is now shared mutable state? For example, maybe there are constraints in your data model and you need transactional behaviour that updates multiple data points at once to avoid violating those constraints. In general, the framework can’t know when you’ve finished making a set of related changes that should be batched up and sent back to the server, unless you tell it explicitly. And when you do, how would your ideal framework resolve conflicting updates if multiple clients are sending incompatible changes around the same time? What happens if communication links break down and you have to deal with the CAP Theorem? There are no universal “right answers” to any of these questions, and the behaviour you want will often be highly specific to an individual application and its particular data model.

I fear the reason you haven’t found what you’re hoping for is that no framework exists that can magic away all these practical questions about building a distributed system. Even specifying the required behaviour in a realistic application is a non-trivial problem, never mind implementing that specification once you’ve decided what it should be.

So for whatever it’s worth, my advice would be to lower your expectations a little. It’s very reasonable to want a single source of truth for your data models and to generate the types and the simple cases for REST/GraphQL endpoints, DB queries, HTTP request wrappers on the client, API documentation, etc. It’s also very reasonable to want some standard mechanism for authentication and authorisation checks, possibly using middleware in your own code or other facilities provided by any cloud hosting service you’re using, that can be applied on top of the above. But maybe look for a starting point that can handle a lot of the boilerplate for you and leave you free to concentrate on the more difficult questions, rather than hoping to achieve everything you described out of the box.

lewisinc a year ago

Check out the Ash framework that's built on top of Phoenix+Elixir.

ushakov a year ago

I'm currently involved in something similar, shoot me an e-mail if you want to learn more

meanwhile, try: Hasura, postgraphile or RedwoodJS

if you want a lower-level framework: tRPC, GraphQL Yoga

recently, there's also grafbase.com

  • fbjork a year ago

    Founder of Grafbase here. We are currently in private beta, but at working closely with the community on our way to public beta. Ping me in our Discord if you want to chat!

_448 a year ago

Vapor[0] based on Swift. Advantage of this is that you don't have to evaluate multiple frameworks for Swift and suffer paralysis by analysis. All the Swift community is behind one framework.

The next is Actix[1] based on Rust. There are many frameworks in Rust and most of them have not reached 1.0 And which framework will survive becomes a question.

Other not so well-known is Wt[2] based on C++. This actually is created for programmers who are not web developers. The development experience is similar to desktop app development like Qt.

If that is not acceptable then Django[3], based on Python, is the one that will be good for you.

For the front-end I would recommend Flutter[4]. As much as I dislike getting tied to a single company for whom the framework is not their bread-and-butter, I don't see any other viable options to Flutter that will cover all web, mobile and desktop out of the box.

For databases, I would recommend BedrockDB[5], if you are not averse to SQLite. Or FoundationDB[6], if you want NoSQL. But if you are not concerned about horizontal scalability or okay with self-managing database availability, then PostgreSQL[7] is a very good option.

For push notifications, PushPin[8] is a good option.

[0] https://vapor.codes

[1] https://actix.rs

[2] https://webtoolkit.eu

[3] https://www.djangoproject.com

[4] https://flutter.dev

[5] https://bedrockdb.com

[6] https://www.foundationdb.org

[7] https://postgresql.org

[8] https://pushpin.org

akmittal a year ago

Sadly there is no single good framework for this.

You can better fo with Remix+prisma. You probably don't need REST endpoints just fetch, post using remix.

conradfr a year ago

You could consider LiveView but you would need to learn Elixir and the Beam.

dlojudice a year ago

Hi, you should check Herbs JS [1]. No frontend, but all the backend requirements (and more) checked.

[1] https://herbsjs.org/

Disclaimer: Herbs JS author here

yhoiseth a year ago

Supabase may be what you’re looking for

lakomen a year ago

I love reading the comments. There are no simple answers.

I was and still am in a similar situation. Since performance, ease of use and resource consumption are important my backend language of choice is Go.

So I wrote a simple backend generator with RESTful CRUD endpoints. The workflow is, you define the data models in your models package. The generator then analyzes those models, creates all the routes and repositories and handlers, then creates Angular model definitions (interfaces) and finally vuex-orm model definitions.

It's very simple and primitive. If you want to change anything you have to regenerate. So this gives you a skeleton backend app. No auth. But that's the general idea. It uses mongodb as a database target. And most importantly it supports data updates via websocket. I initially worked with Angular on the frontend but have been using Vue for the last 2 years. Angular sadly only has ngrx-data which is incomplete. Relationships are not supported and have to be done manually. So I found vuex-orm, which is far from perfect, but works well and is productive, supports relationships. However vuex has been deprecated in favor of Pinia. Someone did a Pinia version of vuex-orm-next, but I haven't tried it yet.

So that's all I have.

I've been thinking to rewrite it. I wanted a simple tool, that doesn't get in my way. I've been thinking to have a clumsy model definition way like entgo.io . And the more I worked with it, the more I see that their way is a better way. Have elaborate model definitions and relationship definitions. I was thinking about that for a while and ent made it. But ent is far from perfect too. It doesn't generate client models, it's complicated, the documentation is lacking. The developers assume you're smart. I'm not smart when I have to crawl through someone else's code. They're going a certain route, and both their graphql and grpc implementations are lacking. I tried to write an extension but the learning curve was too steep. And now they have migrations with some external library, am I'm just sitting there thinking, why do you assume your libraries are a part of my world. The whole thing is a mix of marketing and hype development. They have their own company now and of course they want to make money. I prefer something less hype driven. Something where when you criticize you don't self censor in order to not hurt their reputation. And I hate that.

So I'm thinking make such library myself but how can I monetize? Who would pay me to create a useful tool to solve this 20+ year old problem? This a serious question.

I could open source my tool so far. But I didn't because it could be used by competitors to provide what I provide. Currently my income is so low that I'm actually seeking either employment or freelance work, which I haven't done in at least 8 years.

An alternative would be Spring Boot 3. Learn Java. But could I handle the Java bs on a regular basis? Sometimes when I hate Go, I experiment doing that same backend with Spring Boot. I do the JPA definitions, do the security setup and then I just say fuck it because deep diving requires more Java knowledge and the community is very unfriendly and walled-off.

I'll continue reading the other comments now.

  • a8m a year ago

    Hey, I am the creator of entgo.io. I'm sorry to hear that your experience with the project was not great. I try to be available on our Discord, Slack, or the issue tracker, but sometimes I do miss some messages. If you ever consider to rejoin the community, please don't hesitate to drop me a message on our Discord.

    I would also like to emphasize that Ent is an open-source project under the Linux Foundation, and it is not monetized in any way. Most of my work on it in the last years was on my free time, including when I was working at Facebook and wanted to OSS it. We (heavily) use Ent in our own products today, and that is why we continue to sponsor and maintain the project. I love it and I find it useful.

    Thanks for the honest feedback. I appreciate it.

solardev a year ago

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.

  • smnscu a year ago

    Haha, it's funny that I wasn't the only one who had the same idea. Here's the answer I got:

    > One framework that meets your requirements is NestJS. NestJS is a full-stack web development framework for Node.js that is built on top of TypeScript. It provides a central definition of data schemas, automatic generation of REST endpoints, and support for GraphQL. NestJS also includes built-in support for authorization and authentication, and it provides a reactive programming model that simplifies the process of managing data and communication between the client and the server. NestJS is open-source and is designed to be easy to use and extend. It allows you to define your data models on the server and have them automatically synchronized with the client, so that you don't have to write manual HTTP calls or manage websocket connections. NestJS may be a good fit for your needs because it provides many of the features that you are looking for in a full-stack framework.