
Security News
Node.js Drops Bug Bounty Rewards After Funding Dries Up
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.
@folksdo/shared-lib
Advanced tools
Shared infrastructure library: event bus, exceptions, domain models, repositories, utils
Here is your updated, polished, and production-grade README.md with enhanced clarity, formatting consistency, and alignment with your architecture and tooling (e.g. tsc-alias, tsconfig.paths.json, etc.).
# @folksdo/shared-lib
**Shared Infrastructure Library for Microservices**
A reusable, composable set of modules designed to standardize common patterns across all microservices in a distributed architecture. Published as an NPM package, this library includes:
- **bus**: Event bus interfaces and implementations (e.g. RabbitMQ)
- **domain**: Core domain types, entities, and event structures
- **eventstore**: Interfaces and implementations for event sourcing (Mongo, in-memory)
- **exceptions**: Standardized error classes for consistent exception handling
- **repositories**: Generic repository interfaces and in-memory/DB adapters
- **utils**: Utilities for logging, configuration, health checks, and more
---
## 📦 Installation
```bash
npm install @folksdo/shared-lib
# or
yarn add @folksdo/shared-lib
```
import {
RabbitMQEventBus,
MongoDBEventStore,
NotFoundException,
InMemoryRepository,
logger,
healthCheck,
} from '@folksdo/shared-lib';
| Module | Exports | Description |
|---|---|---|
| bus | IEventBus, RabbitMQEventBus, InMemoryEventBus | Abstract event bus interface + concrete implementations |
| domain | Entities, Aggregates, Commands, Queries, Events | Core domain modeling primitives |
| eventstore | EventStore, Snapshot, MongoDBEventStore, InMemoryStore | Event sourcing store interfaces and backends |
| exceptions | NotFoundException, InvalidOperationException, ... | Typed, reusable error classes |
| repositories | IRepository<T>, InMemoryRepository<T>, MongoRepository<T> | Persistence abstractions for aggregates and entities |
| utils | logger, config, healthCheck, backoff | Logger, health check helpers, backoff, and more |
import { RabbitMQEventBus } from '@folksdo/shared-lib';
const bus = new RabbitMQEventBus({ uri: process.env.AMQP_URL! });
await bus.connect();
await bus.publish({
type: 'UserCreated',
payload: { id: '123', email: 'a@b.com' },
});
import { MongoDBEventStore } from '@folksdo/shared-lib';
const store = new MongoDBEventStore({ uri: process.env.MONGO_URI!, dbName: 'events' });
await store.connect();
await store.appendEvent({
aggregateId: 'acc-1',
type: 'AccountOpened',
payload: { balance: 0 },
});
import { logger, BasicException } from '@folksdo/shared-lib';
logger.info('Service started');
try {
// some operation
} catch (err) {
logger.error('Unexpected error:', err);
throw new BasicException('Processing failed');
}
import express from 'express';
import { healthCheck } from '@folksdo/shared-lib';
const app = express();
app.get('/health', async (_req, res) => {
const status = await healthCheck();
res.status(status.healthy ? 200 : 503).json(status);
});
git clone https://github.com/chammart/folksdo-shared-lib.git
cd folksdo-shared-lib
yarn install
yarn build
yarn test
yarn lint
yarn typecheck
yarn typecheck:tests
We welcome contributions!
git checkout -b feat/my-featuregit commit -m "feat: add new utility"git push origin feat/my-featureMake sure to:
Licensed under the ISC License.
© 2025 FolksDo Inc. — Built with passion for clean architecture and scalable microservices.
Let me know if you'd like a badge section (e.g., `npm version`, `build passing`, etc.) or GitHub Actions CI workflow reference added at the top.
FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.