@netflix-clone/types
v2.1.9
Published
Shared DTOs, interfaces and constants for Netflix Clone
Readme
@netflix-clone/shared
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
npm install @netflix-clone/types
# or
yarn add @netflix-clone/typesUsage
DTOs
import { CreateUserDto } from '@netflix-clone/types';
const dto = new CreateUserDto();
dto.email = "[email protected]";
dto.password = "superSecret";Interfaces
import { User } from '@netflix-clone/types';
const user: User = {
id: "1",
email: "[email protected]"
};
Constants
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.
