🔐 A secure, API-key-based CRUD client for use with FormPilot or custom backend APIs.
Built with TypeScript, Axios, and fully Postgres-ready.
npm install jeet-kiit-crud
import { CrudLibrary } from "jeet-kiit-crud";
// You should retrieve these from sessionStorage, login response, or env
const crud = CrudLibrary({
apiKey: "your-api-key-here",
apiUrl: "https://your-crud-domain.com/api",
API_TODO_URL: "your-todo-domain"
});
Method | Description |
---|---|
create(data) |
Create a new record |
get(id) |
Fetch a single record |
getAll() |
Fetch all records |
update(id, data) |
Update a record |
remove(id) |
Delete a record |
getCredits() |
Check current credit usage |
getCreditLimit() |
Check current credit limit |
recharge() |
Recharge credits via backend approval |
const res = await crud.create({
value: "Learn NPM packages!",
txHash: "0x123abc",
});
console.log(res.id); // -> New record ID
const all = await crud.getAll();
console.log(all);
All requests include the x-api-key
header.
Each user has a limited number of credits (default: 4), and they can call recharge()
once for an extra 4 credits.
- ⚡ Intern assignment projects
- 🧾 Billing or credit-tracked APIs
- 🔐 Secure public access to APIs
- 🧱 Shared API client across frontend apps
Made with 💙 by Jeet Das
This project is licensed under the MIT License.
Give it a ⭐ on GitHub
And tag me if you use it in your own project!