open-index/open-npm huggingface dataset:
npm package: @netflix-clone/common
Description: Shared filters, interceptors, decorators, guards, and exception handlers for Netflix Clone
Author: Cao Nguyen Tri Ngoc
Latest version: 1.2.0

# @netflix-clone/common

[![npm version](https://img.shields.io/npm/v/@netflix-clone/common.svg?color=blue&logo=npm)](https://www.npmjs.com/package/@netflix-clone/common)
[![npm downloads](https://img.shields.io/npm/dm/@netflix-clone/common.svg?color=green)](https://www.npmjs.com/package/@netflix-clone/common)
[![license](https://img.shields.io/github/license/Netflix-Nest/Netflix-Common.svg)](./LICENSE)

**Shared Guards, Interceptors, Decorators, and Exception Filters for Netflix Clone**  
A reusable NestJS package to keep your **microservices** consistent and DRY (Don’t Repeat Yourself).

---

## Features

- **Guards**: JWT Auth Guard, Local Auth Guard
- **Decorators**: `@Public()`, `@SkipCheckPermission()`, `@User()`
- **Interceptors**: Logging, Caching, Transform response
- **Filters**: Global exception filter (support both HTTP & RPC)
- Designed for **NestJS microservices architecture**

---

## Installation

```bash
npm install @netflix-clone/common
# or
yarn add @netflix-clone/common
```

Peer dependencies (must be installed in your NestJS project):

```bash
npm install @nestjs/common @nestjs/core @nestjs/passport @nestjs/microservices @nestjs/cache-manager rxjs
```

## Usage

1. Guards

```bash
import { JwtAuthGuard, LocalAuthGuard } from '@netflix-clone/common';
import { Controller, Get, UseGuards } from '@nestjs/common';

@Controller('profile')
export class ProfileController {
  @UseGuards(JwtAuthGuard)
  @Get()
  getProfile() {
    return { message: 'Protected route with JWT!' };
  }
}
```

2. Decorators

```bash
import { Controller, Get } from '@nestjs/common';
import { Public, User } from '@netflix-clone/common';

@Controller('auth')
export class AuthController {
  @Public()
  @Get('login')
  login() {
    return { message: 'Public endpoint (no JWT required)' };
  }

  @Get('me')
  getMe(@User() user: any) {
    return user;
  }
}

```

3. Interceptors

```bash
import { Controller, Get, UseInterceptors } from '@nestjs/common';
import { LoggingInterceptor, TransformInterceptor, CacheInterceptor } from '@netflix-clone/common';

@Controller('movies')
@UseInterceptors(LoggingInterceptor, TransformInterceptor, CacheInterceptor)
export class MovieController {
  @Get()
  findAll() {
    return [{ id: 1, title: 'Inception' }];
  }
}
```

4. Exception Filters

```bash
import { AllExceptionsFilter } from '@netflix-clone/common';
import { APP_FILTER } from '@nestjs/core';

@Module({
  providers: [
    {
      provide: APP_FILTER,
      useClass: AllExceptionsFilter,
    },
  ],
})
export class AppModule {}
```

## License

MIT © 2025 Cao Nguyen Tri Ngoc 😎.
npm package: @netflix-clone/types
Description: Shared DTOs, interfaces and constants for Netflix Clone
Author: Cao Nguyen Tri Ngoc
Latest version: 2.1.9

# @netflix-clone/shared

[![npm version](https://img.shields.io/npm/v/@netflix-clone/shared.svg?color=blue&logo=npm)](https://www.npmjs.com/package/@netflix-clone/shared)
[![npm downloads](https://img.shields.io/npm/dm/@netflix-clone/shared.svg?color=green)](https://www.npmjs.com/package/@netflix-clone/shared)
[![license](https://img.shields.io/github/license/netflix-clone/shared.svg)](./LICENSE)

**Shared DTOs, Interfaces, and Constants for Netflix Clone**  
A reusable package designed to be consumed by **Backend (NestJS)**, **Frontend (Next.js)**, and **Mobile (React Native)** clients.

---

## Features

-   Common **DTOs** (Data Transfer Objects) for API communication
-   Shared **Interfaces** for strong typing across services
-   Centralized **Constants & Enums** for consistency
-   Works out-of-the-box with **NestJS**, **Next.js**, and **React Native**
-   Designed for **scalable microservices architecture**

---

## Installation

```bash
npm install @netflix-clone/types
# or
yarn add @netflix-clone/types
```

## Usage

DTOs

```bash
import { CreateUserDto } from '@netflix-clone/types';

const dto = new CreateUserDto();
dto.email = "user@example.com";
dto.password = "superSecret";
```

Interfaces

```bash
import { User } from '@netflix-clone/types';

const user: User = {
  id: "1",
  email: "user@example.com"
};

```

Constants

```bash
import { ROLES } from '@netflix-clone/types';

console.log(ROLES.ADMIN); // "admin"
```

---

Tips: Use this package to keep your Backend, Web, and Mobile apps always in sync with shared types.

## License

This project is licensed under the terms of the MIT License.
See the LICENSEfile for details.
npm package: @netflix/eslint-config
Description: An ESLint config for JavaScript projects, brought to you by Netflix
Latest version: 3.0.0

# eslint-config-netflix

See ESLint docs on [flat configuration](https://eslint.org/docs/latest/use/configure/configuration-files-new)

```sh
npm install --save-dev @netflix/eslint-config
npm test
```

Philosophy:
* Share rules that identify syntax associated with common software bugs (e.g. `no-fallthrough`)
* Adopt rules that steer developers away from outdated language features (e.g. `no-var`)
* Avoid the temptation to enforce stylistic preferences; integrators should do this locally
* Be more useful than `js.configs.recommended.rules`

---

Example usage:

```js
import globals from 'globals';
import NetflixCommon from '@netflix/eslint-config';

export default [
  {
    files: ['**/*.js'],
    languageOptions: { globals: globals.browser },
    ...NetflixCommon,
  },
  {
    ignores: ['node_modules'],
  },
];
```