Core API Reference

Explore detailed documentation and examples for the framework's core API.

🚀 Getting Started

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.

📚 API Endpoints

POST /auth/login

POST /auth/login
Content-Type: application/json

{
  "email": "string",
  "password": "string"
}

Returns:

{
  "status": "string",
  "token": "string",
  "userId": "string",
  "expiresIn": number
}

GET /user/profile

GET /user/profile?userId=1234
Authorization: Bearer YOUR-JWT-TOKEN

Response:

{
  "userId": "string",
  "email": "string",
  "createdAt": number
}

⚙️ Advanced Features

Real-Time Updates

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);
});

Batch Processing

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
});

🚀 Contributing to Core API

Found a bug or want to suggest a feature?

Help us grow the ecosystem by sharing your feedback or contributing directly to our open-source repository.

Contribute on GitHub

Stay Connected

Stay up to date with updates and new features by subscribing to our mailing list.

ElenéBelCocCociaiaPipiPia
© 2025 Open Source Project | Licensed under MIT