Skip to content

rowstile in your stack ​

The policy and the database work the same everywhere. What changes from one stack to another is how the app signs in each transaction, reads a refusal, and ships the policy with its migrations.

stackpageSDK
FastAPI, SQLAlchemy (async), Alembicfastapi.mdpip install --pre rowstile
Next.js, Prisma, React; preview: Neon's serverless driver, the edge runtime, BullMQnextjs.md@rowstile/prisma, /next, /react
Node: pg, postgres.js, Drizzle (Express, Hono, workers); preview: Neon's serverless driver, BullMQnode.md@rowstile/pg, /postgres, /drizzle
Python: SQLAlchemy (sync), SQLModel, psycopg, asyncpg; Celery and RQ workers (preview)python.mdpip install --pre rowstile
Go: pgx, sqlc, net/http, goose (preview)go.mdgo get github.com/rowstile/rowstile/sdk/go
Django (a preview)django.mdpip install --pre "rowstile[django]"
ASP.NET Core, EF Core, Npgsql (a preview)aspnetcore.mdRowstile.EntityFrameworkCore, Rowstile.AspNetCore, from the repository
Rails, Active Record, Active Job (preview)rails.mdthe rowstile gem, from the repository
Spring Boot, JPA, JdbcClient, Flyway (preview)spring.mddev.rowstile:rowstile-spring-boot-starter, from the repository
Kotlin: Ktor, Exposed, coroutines, Flyway (preview)ktor.mddev.rowstile:rowstile-kotlin, from the repository
Rust: Axum, sqlx, tokio-postgres (preview)axum.mdthe rowstile crate, from the repository
Phoenix, Ecto, Postgrex, Oban (preview)phoenix.md:rowstile in mix.exs, from the repository
Laravel, Eloquent, queued jobs; PHP on PDO (preview)laravel.mdrowstile/rowstile, from the repository
Electric, the sync engine, behind a Node app (preview)electric.md@rowstile/client
Zero, the sync engine, with a Node app's endpoints (preview)zero.md@rowstile/client
PowerSync, the sync engine, on the policy's mirrors (preview)powersync.md@rowstile/client
Anything elsesql.mdnone: a few SQL statements

Every line of code these pages show is in a tested app (integrations/fastapi, integrations/nextjs, integrations/node, integrations/go, integrations/django, integrations/aspnetcore, integrations/rails, integrations/spring, integrations/ktor, integrations/axum, integrations/phoenix, integrations/laravel, integrations/electric, integrations/zero, integrations/powersync, the conformance suites), in docs/getting-started.md, which runs as written, or, for the SQL the SDKs send, in the SDKs' own code. core/tests/unit_test.py checks each line, and that the install lines have each rowstile package the code imports. A block is lines of one file, in their order, though it may leave lines out; a comment naming a file (# app/worker.py) starts the lines of that file. So read the text around a block too.

Problem details ​

Every SDK answers a refused write, a row that is hidden or isn't there, and each code a call meets as its page says, with an RFC 9457 problem body that is the same in every language. Its type is a page of this site: Refused (403), Not found (404), Not signed in (401), Bad argument (400) and Conflict (409). Anything else is the app's mistake: no body, a 500.

SDKanswers for youthe body of an error, for a handler of your own
Pythonrowstile.fastapi, Django's rowstile.django.MiddlewareRefused.problem(), NotFound.problem()
TypeScriptroute() and action() in @rowstile/next, the routes authzRoutes() makesproblemOf(e), problemResponse(e)
Gorowstile.Handler, rowstile.MiddlewareProblemOf(err), WriteProblem(w, err)
.NETUseRowstile() of Rowstile.AspNetCoreErrors.ProblemOf(e)
RubyRowstile::Middleware, which the Railtie addsRowstile.problem_of(e)
Javathe Spring Boot starterErrors.problem(e)
Kotlinthe Ktor plugin Rowstilee.problem(), call.respondProblem(problem)
RustError, an Axum response (the axum feature)error.problem()
ElixirRowstile.Plug.FallbackRowstile.problem(e), Rowstile.Plug.send_problem(conn, e)
PHPLaravel's service providerRowstile::problemOf($e)

Start with getting started for the policy itself. Or from an app that already runs, as a template repository: the FastAPI starter and the Next.js and Prisma starter.