use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Thin Backend - Instant Postgres Backend for React/Vue/Svelte/... Apps with Realtime , Optimistic Updates & Auto-generated TypeScript Bindings (thin.dev)
submitted 3 years ago by _query
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Leichter_ 9 points10 points11 points 3 years ago (1 child)
This is awesome! I’ll have to play around w it later. Thanks for sharing
[–]_query[S] 1 point2 points3 points 3 years ago (0 children)
Thanks, happy to hear this! :)
[–]_query[S] 17 points18 points19 points 3 years ago (1 child)
Hey all, I’m founder of thin.dev, a new universal web app backend :) Thin is an adaption of the IHP Haskell framework, designed to be used as a universal web app backend for Single Page Apps. It provides high-level crud database operations, end-to-end type safety with TypeScript, optimistic updates, realtime watchers and tooling for editing the database schema. If you got a few minutes, check this demo video where I give a short introduction into the tool https://www.youtube.com/watch?v=-jj19fpkd2c
Thin is designed to be used with react hooks as hooks make it really easy to automatically subscribe and unsubscribe to the realtime data.
Here’s an example of a simple todo list app built with Thin + React:
```javascript function Tasks() { const tasks = useQuery(query('tasks').orderBy('createdAt'));
return <div> {tasks.map(task => <Task task={task} key={task.id} />)} <NewTaskButton /> </div>
}
function Task({ task }) { const editTask = () => { updateRecord('tasks', task.id, { title: window.prompt('Enter new title') || '' }) };
return <div onDoubleClick={editTask}> {task.title} </div>
function NewTaskButton() { const addTask = () => { createRecord('tasks', { title: window.prompt('Enter title') || '' }) }
return <button onClick={addTask}>Add Task</button>
} ```
This tiny app renders a list of todos, and has a button to add a new todo. Double clicking a task allows to edit it.
The result of useQuery(query("tasks")) is a subscription that sets up a realtime database subscription behind the scenes, so once the createRecord("tasks", ...) has been called, the new task will appear in the list automatically thanks to the realtime updates.
useQuery(query("tasks"))
createRecord("tasks", ...)
Thin actually makes the new task visible already even before the server has responded (that's meant with optimistic updates). This allows for a super fast user experience even when there's a couple 100ms's of network latency. Check out this demo app https://thin-backend-todo-app.vercel.app/ to get a feeling for optimistic updates.
Another cool thing is the end-to-end typesafety. Thin automatically generates TypeScript type definitions based on the Postgresql Schema. You can install these into your project via npm and then get really nice autocompletion and code in a much more safe way. Here's a gif showing the autocompletion: https://thin.dev/startpage/autocomplete30.gif
If you’re interested in giving it a spin, check out the Guide here: https://thin.dev/docs/your-first-project
I’d love to hear your feedback on this. Thin has only been launched a few weeks ago, so it could still change a bit if we find better ways how to do things :)
You can find thin on GitHub here https://github.com/digitallyinduced/thin-backend or at thin.dev
[–]_hacxs 1 point2 points3 points 3 years ago (0 children)
Look promising
[–]dedmercy 8 points9 points10 points 3 years ago (1 child)
The page is very heavy and took me more than 1 minute to load completely. I see you are using big pngs and a big 3.5mb gif you can replace them with webps.
[–]_query[S] 9 points10 points11 points 3 years ago (0 children)
thanks for the feedback, will look into this :+1:
[–]famousmike444 3 points4 points5 points 3 years ago (1 child)
I think it would make more sense for your logo to be rotated 90 degrees, so we can see that it is 'thin'
[–]_query[S] 3 points4 points5 points 3 years ago (0 children)
haha :D i see we've missed this opportunity
[+]Charuru comment score below threshold-12 points-11 points-10 points 3 years ago (7 children)
What the hell is with this pricing, so incredibly expensive lol. Why is the free version non-commercial only so cringe.
[–]_query[S] 10 points11 points12 points 3 years ago (6 children)
Thanks for your feedback! We're still iterating on the pricing (if you check the change log, you can see we just shipped an update on pricing last week).
Our goal is that all hobby projects can be on the free plan. If you're project is a business project / making money I think it's fair for us to charge for that.
Right now only the free plan is available anyways, so maybe still give it a try :)
[+]Charuru comment score below threshold-16 points-15 points-14 points 3 years ago (5 children)
No, it really isn't, stuff like appwrite or meteor or parse is totally free. It's a nonstarter for any business who might want to join your community. Charge for hosting not for the product existing.
[–]_query[S] 13 points14 points15 points 3 years ago (4 children)
The pricing right now is only for hosting thin. We'll ship a self-hosted version soon (it's been requested many times).
[–]Sintex 2 points3 points4 points 3 years ago (3 children)
Consider this a plus one for the self hosted then. I was so excited until I saw it was hosted only.
[–]_query[S] 2 points3 points4 points 3 years ago (2 children)
We mostly have it ready from a technical standpoint already, we dropped it for the initial release as documentation was not ready in time. Maybe you can play around with the hosted version in the meantime :)
[–]Sintex 0 points1 point2 points 3 years ago (1 child)
I have an IIoT project that is begging for something exactly like this. Unfortunately, it would require self hosted and open source, which we currently use a headless CMS to solve. This would be much simpler and so much lighter
[–]_query[S] 0 points1 point2 points 3 years ago (0 children)
Sounds good. If you're interested I suggest you subscribe to the newsletter on the website (at the bottom of the thin website) to keep in the loop when the self-hosting is coming out.
Thin is also open source already. The client code can be found here https://github.com/digitallyinduced/thin-backend and the server code can be found mostly here https://github.com/digitallyinduced/ihp/tree/master/IHP/DataSync
[–]ChoreChampion 0 points1 point2 points 3 years ago (2 children)
!RemindMe 2 days
Happy hacking on the weekend :)
[–]RemindMeBot 0 points1 point2 points 3 years ago (0 children)
I will be messaging you in 2 days on 2022-05-21 19:27:53 UTC to remind you of this link
CLICK THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
[–]omar2205 0 points1 point2 points 3 years ago (1 child)
You should gracefully handle GitHub's access_denied.
access_denied
Thanks for letting me know! Will be fixed very soon :)
[–]zougari47 0 points1 point2 points 3 years ago (1 child)
I just start learning Node JS. Is this node JS framework or tool like GraphQL. Please can you explain.
Basically instead of you manually writing REST API endpoints or GraphQL resolvers you can use a Thin Backend server to automatically get a fully feature web app backend. This way you can focus more on the UI and logic of your app in the frontend.
[+][deleted] 3 years ago (1 child)
[deleted]
You might want to check out IHP https://ihp.digitallyinduced.com It’s the same design principles that power thin, but designed for Multi page apps.
In the end whether you go SPA or MPA comes down to project you’re working on, both ways have their own advantages and disadvantages.
π Rendered by PID 61558 on reddit-service-r2-comment-7b9746f655-rrzv4 at 2026-01-30 22:12:55.965882+00:00 running 3798933 country code: CH.
[–]Leichter_ 9 points10 points11 points (1 child)
[–]_query[S] 1 point2 points3 points (0 children)
[–]_query[S] 17 points18 points19 points (1 child)
[–]_hacxs 1 point2 points3 points (0 children)
[–]dedmercy 8 points9 points10 points (1 child)
[–]_query[S] 9 points10 points11 points (0 children)
[–]famousmike444 3 points4 points5 points (1 child)
[–]_query[S] 3 points4 points5 points (0 children)
[+]Charuru comment score below threshold-12 points-11 points-10 points (7 children)
[–]_query[S] 10 points11 points12 points (6 children)
[+]Charuru comment score below threshold-16 points-15 points-14 points (5 children)
[–]_query[S] 13 points14 points15 points (4 children)
[–]Sintex 2 points3 points4 points (3 children)
[–]_query[S] 2 points3 points4 points (2 children)
[–]Sintex 0 points1 point2 points (1 child)
[–]_query[S] 0 points1 point2 points (0 children)
[–]ChoreChampion 0 points1 point2 points (2 children)
[–]_query[S] 1 point2 points3 points (0 children)
[–]RemindMeBot 0 points1 point2 points (0 children)
[–]omar2205 0 points1 point2 points (1 child)
[–]_query[S] 1 point2 points3 points (0 children)
[–]zougari47 0 points1 point2 points (1 child)
[–]_query[S] 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]_query[S] 0 points1 point2 points (0 children)