Skip to main content

choosing & FAQ

Pick the right adapter for your stack and answer common questions about persistence, scoped roles, idempotency, and migration.

Quick comparison

AdapterUse casePersistencePeer depIdempotent assignNative scoped roles
MemoryDev, testingNoneNoneyes (in-memory check)yes
FileCLIs, dev fixtures, single-processJSON on disknode:fs/promises (pluggable)yes (in-memory check)yes
PrismaPrisma appsAny DB@prisma/clientno (throws on dup)yes
DrizzleDrizzle appsPG/MySQL/SQLitedrizzle-ormyes (onConflictDoNothing)yes
RedisDistributed deploysRedisioredis or redisyes (set semantics)yes
HTTPMicroservice splitRemote APINonedepends on backendyes

All adapters are interchangeable. Engine, builder, and middleware code stays the same - migration is data movement only.


Decision tree

Are you in production?
|
+- No
|  +- Need persistence between runs? -> IamFileAdapter
|  +- Otherwise                      -> IamMemoryAdapter
|
+- Yes
   |
   +- CLI / single-process daemon? -> IamFileAdapter
   +- Already use Prisma?           -> IamPrismaAdapter
   +- Already use Drizzle?          -> IamDrizzleAdapter
   +- Need distributed cache + multi-instance? -> IamRedisAdapter
   +- Splitting auth across services? -> IamHttpAdapter (consume centrally)
   +- Custom backend?               -> Implement IamAdapter.IAdapter (see "Custom" doc)

FAQ