Explore detailed documentation and examples for the framework's core API.
To start working with our core API, you'll need to have the appropriate SDK installed for your environment. Ensure you have an API key from your project dashboard before proceeding.
npm install @elenebelo/core
Initialize the SDK with your API token in your application:
import { initialize } from '@elenebelo/core';
initialize({
projectId: 'YOUR-PROJECT-ID',
apiKey: 'YOUR-API-KEY',
debugMode: true // for development only
});
Make sure to replace YOUR-PROJECT-ID and YOUR-API-KEY with the correct values.
POST /auth/login Content-Type: application/json { "email": "string", "password": "string" }
{ "status": "string", "token": "string", "userId": "string", "expiresIn": number }
GET /user/profile?userId=1234 Authorization: Bearer YOUR-JWT-TOKEN
{ "userId": "string", "email": "string", "createdAt": number }
Listen to changes in your data with the real-time API:
import { subscribe } from '@elenebelo/core';
subscribe('user/1234', (delta) => {
console.log("User data:", delta);
});
Perform multiple operations in a single transaction:
import { batch } from '@eleneloco/core';
batch([
{
type: 'user/update',
data: {
id: userId,
name: 'New Name'
}
},
{
type: 'user/add-role',
data: {
roleId: 'admin',
userId: userId
}
}
], {
projectId: 'project-x',
apiKey: API_KEY
});
Help us grow the ecosystem by sharing your feedback or contributing directly to our open-source repository.
Contribute on GitHubStay up to date with updates and new features by subscribing to our mailing list.