Try It Out

Test the SGERP Frontend Library with your credentials

Interactive Demo

Try It Out

Test the library by connecting to the SGERP API with your credentials.

Code Equivalent:
import { initializeSGERP } from 'sgerp-frontend-lib';

// Initialize and get API instance
const api = initializeSGERP({
  activeConnection: 'your-username@staging',
  connections: {
    'your-username@staging': {
      id: 'your-username@staging',
      environment: 'staging',
      user: 'your-username',
      password: 'your-password',
      baseUrl: '',
    },
  },
});

// Get user details
const users = api.collections.user;
await users.fetch({ limit: 100 });
const user = users.find(u => u.username === api.getActiveConnection().user);
console.log('User:', user);

// Get projects
const projects = api.collections.project;
await projects.fetch({ limit: 20 });
console.log('Projects:', projects.models);

About the Demo

Use the interactive demo above to connect to the SGERP API with your credentials.

How It Works

The interactive demo will:

  1. Initialize the library with your chosen environment
  2. Attempt to authenticate using your username and password
  3. Display your user information if successful

Note: Your credentials are saved in your browser's local storage for interactive examples throughout the documentation. You can view and manage your saved connection in the widget at the bottom right of the page.

About This Library

The SGERP Frontend Library provides a TypeScript interface for interacting with SGERP backend APIs. It includes:

  • Connection management for multiple environments
  • Backbone.js-inspired Collections for data management
  • Full TypeScript support with type safety
  • Built-in pagination and filtering