@brainstack/core
TypeScript icon, indicating that this package has built-in type declarations

1.2.150 • Public • Published

@brainstack/core

A collection of micro packages designed to streamline and enhance the development of modular applications.

Installation

You can install the package using npm:

npm install @brainstack/core

Packages Included

The @brainstack/core package is a bundle that includes the following micro packages, each tailored to address specific aspects of application development:

  • @brainstack/inject: A lightweight dependency injection library for JavaScript and TypeScript. Simplify the management of object dependencies and promote code reusability.

  • @brainstack/log: A micro logger package that offers a simple and efficient way to manage logs and improve debugging processes.

  • @brainstack/hub: A micro pub/sub package that facilitates seamless communication between different parts of your application, enabling efficient event-based architectures.

  • @brainstack/state: A micro state management library that empowers you to handle application state effortlessly, making it ideal for managing complex UI components or global application data.

  • @brainstack/store: A package that combines @brainstack/hub and @brainstack/state unlocking state management with event handling, providing a convenient solution for managing application state and responding to state changes using event-driven programming.

  • @brainstack/config: A micro config manager package that lets you manage configuration settings efficiently and flexibly, ensuring smooth application setup and behavior.

  • @brainstack/auth: The Brainstack Auth SDK is a powerful tool for managing user authentication in various applications. It provides a unified interface to interact with authentication methods, abstracting the underlying complexities and offering a streamlined API.

  • @brainstack/crud: A micro CRUD package that provides a convenient way to perform Create, Read, Update, and Delete operations on data sources, making data manipulation straightforward.

Usage

The @brainstack/core package serves as a convenient entry point to access and utilize the included micro packages in your application.

Importing

To use the various micro packages, simply import them from @brainstack/core. For example:

import { inject, Dependency } from '@brainstack/core';
import { createLogger } from '@brainstack/core';
import { createHub } from '@brainstack/core';
// Import other packages as needed

Example Use Case

Imagine you're building a sophisticated web application that requires efficient communication between components, detailed logging, and centralized state management. Instead of manually integrating separate libraries for these tasks, you can leverage the power of @brainstack/core.

import { createLogger, createHub, createStateManager } from '@brainstack/core';

// Create a logger instance
const logger = createLogger();

// Create a hub for event communication
const hub = createHub();

// Create a state manager for managing application state
const stateManager = createStateManager();

// Now you can use these instances throughout your application
// ... other code ...

Use Cases

The @brainstack/core package is ideal for:

  • Building modular applications that follow best practices for dependency management, logging, and communication.
  • Streamlining development by providing simple and focused solutions for common challenges.
  • Simplifying the setup and management of application-wide configuration and state.
  • Promoting code reusability and maintainability through encapsulated logic and agents.
  • Ensuring consistent and efficient data manipulation with the CRUD package.

Contributing

Contributions are welcome! If you would like to contribute to this module, please follow these guidelines:

Fork the repository
Create a new branch for your changes
Make your changes and commit them with descriptive commit messages
Push your changes to your fork
Submit a pull request

License

This module is released under the MIT License.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.2.1503latest

Version History

VersionDownloads (Last 7 Days)Published
1.2.1503
1.2.1441
1.2.1431
1.2.1421
1.2.1411
1.2.1401
1.2.1391
1.2.1381
1.2.1371
1.2.1361
1.2.1351
1.2.1342
1.2.1331
1.2.1321
1.2.1311
1.2.1301
1.2.1291
1.2.1272
1.2.1262
1.2.1251
1.2.1241
1.2.1232
1.2.1221
1.2.1211
1.2.1202
1.2.1192
1.2.1182
1.2.1171
1.2.1163
1.2.1152
1.2.1141
1.2.1131
1.2.1122
1.2.1111
1.2.1102
1.2.1092
1.2.1081
1.2.1071
1.2.1061
1.2.1051
1.2.1041
1.2.1031
1.2.1022
1.2.1011
1.2.1002
1.2.991
1.2.981
1.2.971
1.2.961
1.2.951
1.2.942
1.2.711
1.2.692
1.2.611
1.2.602
1.2.591
1.2.581
1.2.571
1.2.562
1.2.553
1.2.542
1.2.531
1.2.522
1.2.512
1.2.501
1.2.491
1.2.481
1.2.471
1.2.462
1.2.451
1.2.441
1.2.431
1.2.421
1.2.411
1.2.401
1.2.393
1.2.381
1.2.371
1.2.352
1.2.342
1.2.332
1.2.321
1.2.301
1.2.261
1.2.252
1.2.241
1.2.231
1.2.221
1.2.211
1.2.202
1.2.192
1.2.181
1.2.171
1.2.162
1.2.151
1.2.141
1.2.131
1.2.122
1.2.111
1.2.101
1.2.91
1.2.81
1.2.71
1.2.61
1.2.51
1.2.41
1.2.31
1.2.21
1.2.12
1.2.01
1.1.42
1.1.22
1.1.12
1.1.01
1.0.131
1.0.122
1.0.111
1.0.101
1.0.91
1.0.82
1.0.72
1.0.61
1.0.51
1.0.42
1.0.31

Package Sidebar

Install

npm i @brainstack/core

Weekly Downloads

170

Version

1.2.150

License

MIT

Unpacked Size

11.2 kB

Total Files

13

Last publish

Collaborators

  • infinisoft-world
  • amitbasunia
  • bincharkey
  • hgharbi