Skip to content

Choosing a Storage Backend

Bight’s storage facade needs an adapter to persist framework state (settings, plugin metadata, feature flags). The adapter you choose powers bight.storage. It does not replace your application database.

The CLI asks which adapter to use during scaffolding. You can also change it later by swapping the adapter in src/storage/adapter.ts.

Best when you don’t need a managed database for framework state.

AdapterBest forBackend
JSONLocal development, tiny botsFile on disk
KeyvLightweight production deploymentsRedis, SQLite, Mongo, Postgres via Keyv

Best when your app already uses a database and you want Bight’s state to live alongside your tables.

AdapterBest forBackend
PrismaApps already using PrismaAny Prisma-supported DB
DrizzleApps already using DrizzlePostgreSQL, MySQL, SQLite
MongooseApps already using MongoDBMongoDB

When using an ORM-backed adapter, keep the storage facade for framework state only. Use your ORM client directly (through services) for application domain queries. See Settings & Data Strategy for details.