supabase-node-kit
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Supabase Node Kit

A backend utility package for Supabase authentication and database functionality.

Installation

To install the package, run:

npm install supabase-node-kit

Configuration

Create a .env file in the root of your project and add your Supabase credentials:

SUPABASE_URL=your-supabase-url
SUPABASE_SERVICE_ROLE_KEY=your-supabase-service-role-key

Usage

Authentication Service

import { authService } from "supabase-node-kit";

// Sign up a new user
authService.signUp("user@example.com", "password123");

// Sign in an existing user
authService.signIn("user@example.com", "password123");

// Sign out a user
authService.signOut("user-id");

// Get user details
authService.getUser("user-id");

// Delete a user
authService.deleteUser("user-id");

Database Service

import { dbService } from "supabase-node-kit";

// Get all records from a table
dbService.getAll("table_name");

// Get a record by ID
dbService.getById("table_name", 1);

// Insert a new record
dbService.insert("table_name", { column: "value" });

// Update a record by ID
dbService.update("table_name", 1, { column: "new_value" });

// Delete a record by ID
dbService.remove("table_name", 1);

License

This project is licensed under the ISC License.

/supabase-node-kit/

    Package Sidebar

    Install

    npm i supabase-node-kit

    Weekly Downloads

    1

    Version

    1.1.0

    License

    ISC

    Unpacked Size

    75.6 kB

    Total Files

    14

    Last publish

    Collaborators

    • patilchi
    • skb2496