This package provides lightweight services to supabase to make it easier to work with databases, tables and storage buckets.
- Database Service: Easy access to database tables and views.
- Data Service: Perform CRUD operations, fuzzy search, pagination, filtering and more on a specific table or view.
- Storage Service: Access to storage buckets and files, with support for file uploads, downloads, deletions, and more.
- Embedding Service: Generate and manage embeddings for file content stored in Supabase Storage, with support for custom embedding providers.
Install the package, e.g. using bun:
bun install @freehour/supabase-coreThe package includes SQL files for setting up the necessary database schemas and extensions.
These files are copied post-installation to the supabase/ directory of your project.
If you get a warning that the post-install script is blocked, you need to run the follwing command to trust the dependency:
bun pm trust @freehour/supabase-coreIf you generate migrations from schemas, make sure to include the supabase-core db schema in your schema_paths in supabase/config.toml.
schema_paths = ["./schemas/supabase-core/*.sql", /* your app schema paths */]If you chaged the database schema run the build script:
./scripts/build.shotherwise, you can just build the package:
bun run buildTo publish a new version of the package, update the version in package.json and run:
bunx npm login
bun publish --access public