Core APIs Reference

In-depth documentation for the fundamental APIs that power the Eiseniiaiia framework.

๐Ÿ” Core API Categories

Modular System API

Manage module initialization, configuration, and lifecycle events with the base framework API.

Interoperability API

Seamlessly integrate with external frameworks and legacy systems using standardized adapters.

Performance Tools API

Access real-time profiling, memory diagnostics, and optimization utilities.

Analytics API

Measure system performance, user behavior, and API usage patterns in real-time.

๐Ÿ“˜ API Reference

Module API

The foundation for creating modular components in Eiseniiaiia.


// Basic usage
const myModule = new Module({
  name: 'my-custom-module',
  version: '1.0.0',
  dependencies: ['@eiseniiaiia/core@latest']
});

myModule.init().then(() => {
  console.log('Module ready');
});
                            

Parameters:

  • name - module identifier
  • version - semantic version
  • dependencies - array of required packages

Methods

  • init() Initializes the module and its dependencies
  • destroy() Cleanly unloads the module
  • on(event) Registers event listeners

๐Ÿ”— Interoperability API

Bridge between Eiseniiaiia modules and external frameworks/legacy systems.


import { Adaptors } from '@eiseniiaiia/core';

// Create Express integration
const expressBridge = Adaptors.create({
  framework: 'express',
  version: '4.18.2'
});

app.use(expressBridge.middleware());
                            

Supported Adaptors:

React
Vue
Next.js
Legacy Java
Node.js
REST API

Key Features

  • Automatic dependency mapping
  • Version compatibility checking
  • Built-in middleware patterns

๐ŸŽ‰ API Usage Examples

Example: Performance Monitoring

Measure API performance with the profiling tools API.


import { Profiler } from '@eiseniiaiia/performance';

const metrics = Profiler.start();

// Code to profile
for (let i = 0; i < 10000; i++) {
  // complex operation
}

const results = Profiler.stop();
console.log('Execution time:', results.duration);
                            

Expected Output


{
  duration: 8.32ms,
  peakMemory: '12.7MB',
  callCount: 9823
}
                            
Profiler.start() and Profiler.stop() return detailed metrics including execution time, memory usage, and function call counts.

๐Ÿ“ฆ API Versioning

Semver Compatibility

Current Versions

Core: 3.4.1 React: 1.2.9 Express: 2.8.0 Legacy: 1.0.0

Deprecation Policy

  • โ€ข Major versions get support for 18 months
  • โ€ข Minor versions are supported for 6 months
  • โ€ข Patch updates for security fixes only

Upgrading Notes

  • โ€ข Automatic migration tool available
  • โ€ข Migration guides in docs
  • โ€ข Semantic versioning enforced

๐Ÿ›  Need Help?

For questions about API implementation or best practices, check out our documentation portals or reach out via GitHub.