open-index/open-npm huggingface dataset:
npm package: @mohasinac/db-firebase
Description: Firebase Firestore + Realtime DB implementation of @mohasinac/contracts repository interfaces
Latest version: 1.4.3

# @mohasinac/db-firebase

> **Layer 3** — Firebase Firestore + Realtime Database implementation of the `@mohasinac/contracts` repository interfaces. Includes Sieve filter parsing and real-time subscription support.

## Install

```bash
npm install @mohasinac/db-firebase firebase-admin
```

---

## Quick start

```ts
import { registerProviders } from "@mohasinac/contracts";
import { firebaseDbProvider } from "@mohasinac/db-firebase";

registerProviders({ db: firebaseDbProvider });
```

Then anywhere on the server:

```ts
import { getProviders } from "@mohasinac/contracts";

const { db } = getProviders();
const repo = db!.getRepository<Product>("products");

const result = await repo.findAll({
  filters: "status==published,category==electronics",
  sort: "-createdAt",
  page: 1,
  perPage: 20,
});
```

---

## Repository classes

### `FirebaseRepository<T>`

Full CRUD — implements `IRepository<T>`.

```ts
import { FirebaseRepository } from "@mohasinac/db-firebase";

class ProductRepository extends FirebaseRepository<Product> {
  constructor() {
    super("products");
  }
}
```

Methods: `findAll(query)`, `findById(id)`, `create(data)`, `update(id, data)`, `delete(id)`, `count(filters)`

### `FirebaseSieveRepository<T>`

Extends `FirebaseRepository` with Sieve filter string parsing — translates `"field==value,field2>value2"` into Firestore `where()` chains.

### `FirebaseRealtimeRepository<T>`

Wraps Firebase Realtime Database. Adds `subscribe(path, cb)` and `subscribeWhere(path, field, op, val, cb)` for real-time listeners.

---

## Admin SDK helpers

```ts
import {
  getAdminApp,
  getAdminAuth,
  getAdminDb,
  getAdminStorage,
  getAdminRealtimeDb,
} from "@mohasinac/db-firebase";
```

Singletons initialized lazily from `FIREBASE_ADMIN_KEY` or `GOOGLE_APPLICATION_CREDENTIALS`.

---

## Firestore utilities

```ts
import {
  removeUndefined,
  prepareForFirestore,
  deserializeTimestamps,
} from "@mohasinac/db-firebase";
```

---

## Exports

`FirebaseRepository<T>`, `FirebaseSieveRepository<T>`, `FirebaseRealtimeRepository<T>`, `firebaseDbProvider`

Helpers: `getAdminApp()`, `getAdminAuth()`, `getAdminDb()`, `getAdminStorage()`, `getAdminRealtimeDb()`, `_resetAdminSingletons()`, `removeUndefined()`, `prepareForFirestore()`, `deserializeTimestamps()`

Types: `SieveModel`, `SieveFields`, `SieveFieldConfig`, `SieveOptions`, `SieveResult`

---

## Required environment variables

| Variable             | Description                                            |
| -------------------- | ------------------------------------------------------ |
| `FIREBASE_ADMIN_KEY` | Base64-encoded Firebase Admin SDK service account JSON |

---

## License

MIT — part of the `@mohasinac/*` monorepo.
npm package: @mohasinac/feat-blog
Description: > **Layer 5** — Blog feature module: post listing, post detail, Sieve repository, and API route handlers.
Latest version: 1.4.1

# @mohasinac/feat-blog

> **Layer 5** — Blog feature module: post listing, post detail, Sieve repository, and API route handlers.

## Install

```bash
npm install @mohasinac/feat-blog
```

Peer dependencies: React ≥ 18, Next.js ≥ 14, next-intl ≥ 3.

---

## Add to your project

```ts
// features.config.ts
export default { blog: true, ... } satisfies FeaturesConfig;
```

```ts
// app/api/blog/route.ts
import { withProviders } from "@/providers.config";
import { blogGET as _GET } from "@mohasinac/feat-blog";
export const GET = withProviders(_GET);

// app/api/blog/[slug]/route.ts
import { withProviders } from "@/providers.config";
import { blogSlugGET as _GET } from "@mohasinac/feat-blog";
export const GET = withProviders(_GET);
```

---

## Hook

```ts
import { useBlog } from "@mohasinac/feat-blog";

const { posts, total, isLoading } = useBlog({ page: 1, perPage: 10 });
```

---

## Repository

```ts
import { BlogRepository } from "@mohasinac/feat-blog";

const repo = new BlogRepository(db!.getRepository("blog"));
const post = await repo.findBySlug("my-post-slug");
```

---

## Exports

Types · `BlogPostDetailResponse` · `useBlog` · components · schemas · columns · `BlogRepository` · `manifest` · route handlers: `blogGET`, `GET`, `blogSlugGET`, `GET_BLOG_SLUG`

---

## License

MIT — part of the `@mohasinac/*` monorepo.
npm package: @mohasinac/feat-events
Description: > **Layer 5** — Events feature module: event listing, detail, ticket selector, attendee management, and API route handlers.
Latest version: 1.4.1

# @mohasinac/feat-events

> **Layer 5** — Events feature module: event listing, detail, ticket selector, attendee management, and API route handlers.

## Install

```bash
npm install @mohasinac/feat-events
```

Peer dependencies: React ≥ 18, Next.js ≥ 14, next-intl ≥ 3.

---

## Add to your project

```ts
// app/api/events/route.ts
import { withProviders } from "@/providers.config";
import { eventsGET as _GET } from "@mohasinac/feat-events";
export const GET = withProviders(_GET);

// app/api/events/[id]/route.ts
import { withProviders } from "@/providers.config";
import { eventIdGET as _GET } from "@mohasinac/feat-events";
export const GET = withProviders(_GET);
```

---

## Hooks

```ts
import { useEvents, useEvent } from "@mohasinac/feat-events";

const { events, isLoading } = useEvents({ filters: "status==upcoming" });
const { event } = useEvent(eventId);
```

---

## Components

```tsx
import { EventCard, EventList, EventDetail, TicketSelector } from "@mohasinac/feat-events";
```

---

## Exports

Types · `useEvents`, `useEvent` · components · schemas · columns · `EventsRepository`, `EventEntriesRepository` · `manifest` · route handlers: `eventsGET`, `GET`, `eventIdGET`

---

## License

MIT — part of the `@mohasinac/*` monorepo.
npm package: @mohasinac/feat-products
Description: > **Layer 5** — Products feature module: product listing, detail, variants, Sieve-based repository, and full CRUD API routes.
Latest version: 1.4.1

# @mohasinac/feat-products

> **Layer 5** — Products feature module: product listing, detail, variants, Sieve-based repository, and full CRUD API routes.

## Install

```bash
npm install @mohasinac/feat-products
```

Peer dependencies: React ≥ 18, Next.js ≥ 14, next-intl ≥ 3.

---

## Add to your project

```ts
// features.config.ts
export default { products: true, ... } satisfies FeaturesConfig;
```

```ts
// app/api/products/route.ts
import { withProviders } from "@/providers.config";
import { GET as _GET, POST as _POST } from "@mohasinac/feat-products";
export const GET = withProviders(_GET);
export const POST = withProviders(_POST);

// app/api/products/[id]/route.ts
import { withProviders } from "@/providers.config";
import { productItemGET as _GET, productItemPATCH as _PATCH, productItemDELETE as _DELETE } from "@mohasinac/feat-products";
export const GET = withProviders(_GET);
export const PATCH = withProviders(_PATCH);
export const DELETE = withProviders(_DELETE);
```

---

## Hooks

```ts
import { useProducts, useProductDetail } from "@mohasinac/feat-products";

const { items, total, isLoading } = useProducts({ filters: "status==published", page: 1 });
const { product, isLoading } = useProductDetail(slug);
```

---

## Repository

```ts
import { ProductsRepository } from "@mohasinac/feat-products";
import { getProviders } from "@mohasinac/contracts";

const { db } = getProviders();
const repo = new ProductsRepository(db!.getRepository("products"));

const result = await repo.findAll({ filters: "status==published", sort: "-createdAt" });
const product = await repo.findBySlug("blue-sneakers");
```

---

## Domain types

```ts
import type { ProductItem, ProductStatus, ProductCondition, ListingType } from "@mohasinac/feat-products";
```

`ListingType`: `"buy-now"` | `"auction"` | `"pre-order"`  
`ProductStatus`: `"published"` | `"draft"` | `"archived"`

---

## Exports

Types · `useProducts`, `useProductDetail` · all components · `productItemSchema`, `buildProductColumns` · `ProductsRepository` · `manifest` · route handlers: `GET`, `POST`, `productItemGET`, `productItemPATCH`, `productItemDELETE`

---

## License

MIT — part of the `@mohasinac/*` monorepo.
npm package: @mohasinac/feat-stores
Description: > **Layer 5** — Stores feature module: store listings, store profile pages, nearby stores, and the stores API route handlers.
Latest version: 1.4.1

# @mohasinac/feat-stores

> **Layer 5** — Stores feature module: store listings, store profile pages, nearby stores, and the stores API route handlers.

## Install

```bash
npm install @mohasinac/feat-stores
```

Peer dependencies: React ≥ 18, Next.js ≥ 14, next-intl ≥ 3.

---

## API routes

```ts
// app/api/stores/route.ts
import { withProviders } from "@/providers.config";
import { GET as _GET } from "@mohasinac/feat-stores";
export const GET = withProviders(_GET);

// app/api/stores/[storeSlug]/route.ts
import { withProviders } from "@/providers.config";
import { storeSlugGET as _GET } from "@mohasinac/feat-stores";
export const GET = withProviders(_GET);
```

---

## Components

```tsx
import { StoreList, StoreCard, StoreDetail, NearbyStores } from "@mohasinac/feat-stores";
```

---

## License

MIT — part of the `@mohasinac/*` monorepo.
npm package: @mohaymen/base-contract
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.0.
Latest version: 17.0.8

# BaseContract

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.0.

## Code scaffolding

Run `ng generate component component-name --project base-contract` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project base-contract`.
> Note: Don't forget to add `--project base-contract` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build base-contract` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build base-contract`, go to the dist folder `cd dist/base-contract` and run `npm publish`.

## Running unit tests

Run `ng test base-contract` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
npm package: @mohaymen/base-utilities
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.
Latest version: 17.0.9

# BaseUtilities

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.

## Code scaffolding

Run `ng generate component component-name --project base-utilities` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project base-utilities`.
> Note: Don't forget to add `--project base-utilities` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build base-utilities` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build base-utilities`, go to the dist folder `cd dist/base-utilities` and run `npm publish`.

## Running unit tests

Run `ng test base-utilities` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
npm package: @mohaymen/dia-base-contract
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.
Latest version: 17.0.15

# DiaBaseContract

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.

## Code scaffolding

Run `ng generate component component-name --project dia-base-contract` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project dia-base-contract`.
> Note: Don't forget to add `--project dia-base-contract` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build dia-base-contract` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build dia-base-contract`, go to the dist folder `cd dist/dia-base-contract` and run `npm publish`.

## Running unit tests

Run `ng test dia-base-contract` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
npm package: @mohaymen/dia-cypress-lib
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.3.0.
Latest version: 17.0.2

# DiaCypressLib

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.3.0.

## Code scaffolding

Run `ng generate component component-name --project dia-cypress-lib` to generate a new component. You can also use
`ng generate directive|pipe|service|class|guard|interface|enum|module --project dia-cypress-lib`.
> Note: Don't forget to add `--project dia-cypress-lib` or else it will be added to the default project in your
`angular.json` file.

## Build

Run `ng build dia-cypress-lib` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build dia-cypress-lib`, go to the dist folder `cd dist/dia-cypress-lib` and run
`npm publish`.

## Running unit tests

Run `ng test dia-cypress-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out
the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
npm package: @mohaymen/dia-graph-contract
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.3.0.
Latest version: 17.0.4

# DiaGraphContract

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.3.0.

## Code scaffolding

Run `ng generate component component-name --project dia-graph-contract` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project dia-graph-contract`.
> Note: Don't forget to add `--project dia-graph-contract` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build dia-graph-contract` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build dia-graph-contract`, go to the dist folder `cd dist/dia-graph-contract` and run `npm publish`.

## Running unit tests

Run `ng test dia-graph-contract` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
npm package: @mohaymen/dia-outsourcing-shared-services
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.
Latest version: 17.0.6

# DiaOutsourcingSharedServices

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.

## Code scaffolding

Run `ng generate component component-name --project dia-outsourcing-shared-services` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project dia-outsourcing-shared-services`.
> Note: Don't forget to add `--project dia-outsourcing-shared-services` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build dia-outsourcing-shared-services` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build dia-outsourcing-shared-services`, go to the dist folder `cd dist/dia-outsourcing-shared-services` and run `npm publish`.

## Running unit tests

Run `ng test dia-outsourcing-shared-services` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
npm package: @mohaymen/dia-shared-components
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.
Latest version: 17.0.10

# DiaOutsourcingSharedServices

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.

## Code scaffolding

Run `ng generate component component-name --project dia-outsourcing-shared-services` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project dia-outsourcing-shared-services`.
> Note: Don't forget to add `--project dia-outsourcing-shared-services` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build dia-outsourcing-shared-services` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build dia-outsourcing-shared-services`, go to the dist folder `cd dist/dia-outsourcing-shared-services` and run `npm publish`.

## Running unit tests

Run `ng test dia-outsourcing-shared-services` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
npm package: @mohaymen/extension-methods
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.3.0.
Latest version: 0.0.4

# ExtensionMethods

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.3.0.

## Code scaffolding

Run `ng generate component component-name --project extension-methods` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project extension-methods`.
> Note: Don't forget to add `--project extension-methods` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build extension-methods` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build extension-methods`, go to the dist folder `cd dist/extension-methods` and run `npm publish`.

## Running unit tests

Run `ng test extension-methods` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
npm package: @mohaymen/manage-data-structure-plugin-lib
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.
Latest version: 17.0.0

# PluginLib

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.

## Code scaffolding

Run `ng generate component component-name --project plugin-lib` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project plugin-lib`.
> Note: Don't forget to add `--project plugin-lib` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build plugin-lib` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build plugin-lib`, go to the dist folder `cd dist/plugin-lib` and run `npm publish`.

## Running unit tests

Run `ng test plugin-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
npm package: @mohaymen/mohaymen-cypress-lib
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.
Latest version: 17.0.3

# MohaymenCypressLib

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.

## Code scaffolding

Run `ng generate component component-name --project mohaymen-cypress-lib` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project mohaymen-cypress-lib`.
> Note: Don't forget to add `--project mohaymen-cypress-lib` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build mohaymen-cypress-lib` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build mohaymen-cypress-lib`, go to the dist folder `cd dist/mohaymen-cypress-lib` and run `npm publish`.

## Running unit tests

Run `ng test mohaymen-cypress-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
npm package: @mohaymen/plugin-requirement-abstractions
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.
Latest version: 17.0.6

# PluginRequirementAbstractions

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0.

## Code scaffolding

Run `ng generate component component-name --project plugin-requirement-abstractions` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project plugin-requirement-abstractions`.
> Note: Don't forget to add `--project plugin-requirement-abstractions` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build plugin-requirement-abstractions` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build plugin-requirement-abstractions`, go to the dist folder `cd dist/plugin-requirement-abstractions` and run `npm publish`.

## Running unit tests

Run `ng test plugin-requirement-abstractions` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
npm package: @mohaymen/termeh
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.0.
Latest version: 17.0.36

# Termeh

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.0.

## Code scaffolding

Run `ng generate component component-name --project termeh` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project termeh`.
> Note: Don't forget to add `--project termeh` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build termeh` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build termeh`, go to the dist folder `cd dist/termeh` and run `npm publish`.

## Running unit tests

Run `ng test termeh` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.