Gravity allows you to call functions defined in your server directly in your client. It is a modern back-end framework that can integrate with your front-end like Svelte, React, Solid and Vue.
I started to work on Gravity because I was frustrated by the Nest + GraphQL + Apollo architecture that we used on my previous company. It was so boilerplatey and unnecessary complicated to exchange data between the client and the server.
Gravity closes this server/client gap by bringing to the client the capacity to call functions defined server-side… like it’s just a normal Javascript function.
No need to learn a query language like GraphQL. No more 100% unsafe REST apis. I aimed to bring simplicity and safety to full-stack development, along with a very enjoyable developer experience.
I’m using Gravity for the SAAS I’m working on full-time (a modern writing software for literature) and I’m having a great time with it. I hope you will like it as much as I do.
Every comment and idea of future development is very welcome 😉
@richiemcilroy I just realised that thanks to your comments 😅 The logo looks very much the same, it’s confusing. The two frameworks can look similar at first but they are actually very different.
usegravity.app:
- is a boilerplate for a Node.js & React app. It means is just a template with a lot of stuff preinstalled, and you can only use it when you have a Node server and a React frontend.
- you must pay for it
- comes with a lot of stuff like Stripe integration, analytics dashboard, socials integration, database connection, pre-made ui components
- use a standard REST api to communicate between client and server
Gravity by Digital loukoums:
- is a lower-level framework to help communicating between a server and a client both written in Typescript (you can use Javascrit as well but that’s not recommended)
- is open-source and free
- integrates very well with other frameworks like React, Next, Svelte & SvelteKit, Vue, Nuxt, SolidJS, and Prisma
- can be used upon a Node server but also a SvelteKit or Next server - which means it’s compatible with serverless and edge functions
- will provide you a end-to-end safe way to call your server functions from your client. (You can see Gravity as a SDK-on-demand.)
@vezaynk it actually couples tighter than necessary. The only information needed by the server to perform parameters validation is the types of the parameters. The schema holds more information like the return type of the functions, the types of the non-function exposed properties, the modifiers (async, readonly, private, etc…).
You can be sure that the typescript type is the actual type of the data you receive. It even works for generics and template literals.
Gravity uses Typezer to create the schema, and right now there is only one known caveat documented here : https://github.com/digital-louko...
It’s when you do a **circular generic**, which is a quite complex type form very unlikely to happen.
Talers
Talers
Cap
Talers
Talers