Thin Backend is a Blazing Fast, Universal Web App Backend for Making Realtime Single Page Apps
Thin Backend is a Blazing Fast, Universal Web App Backend for Making Realtime Single Page Apps
Thin Backend
Instant API for your Postgres DB
thin.dev »Thin Backend is a blazing fast, universal web app backend for making realtime single page apps.
Instead of manually writing REST API endpoints or GraphQL resolvers, use a Thin Backend server to automatically get a fully featured API backend on top of your Postgres DB. Thin exposes high level functions to create, read, update and delete database record.
This example shows a simple CRUD example for building a Todo app with Thin:
…The TypeScript definitions not only provide safety, they also provide really nice autocompletion.
Blazing Fast, Low Latency: Delight your end-users with superior speed and lowest latency. With built-in Optimistic Updates your app doesn't need to wait for the server to respond back until the changes are visible on the screen.
Realtime: Provide a delightful experience to your end users: With Thin Backend Live Queries your app state is synchronized in real-time across all users.
…javascript import { withTransaction } from 'thin-backend';
await withTransaction(async transaction => {
const team = await transaction.createRecord('teams', { title: 'New Team' });
const project = await transaction.createRecord('projects', {
title: 'Project 1',
teamId: team.id
});
return [ team, project ];
})
```
[Learn more in the Docs](https://thin.dev/docs/database#transactions)Batch Operations:
You can use createRecords, updateRecords and deleteRecords to effiently run operations on a large
set of database records:
// Example:
const todoA = { title: 'Finish Guide', userId: '49946f4d-8a2e-4f18-a399-58e3296ecff5' };
const todoB = { title: 'Learn Haskell', userId: '49946f4d-8a2e-4f18-a399-58e3296ecff5' };
const todos = await createRecord('todos', [ todoA, todoB ]);You can find extensive documentation on the Thin Backend website.
Learn how to get started in the Getting Started Guide
You can also self-host Thin Backend.
You can find some example apps here:
Questions, or need help? Join our Thin Community
We are happy to merge your pull requests!
See CONTRIBUTING.md for more info.
No open issues yet, or sync has not completed.