@cv/system#
Infrastructure and foundation package for the CV Generator monorepo.
Overview#
This package provides reusable infrastructure services and utilities that form the foundation layer of the application. It contains database services, mail services, base entities, and domain error classes.
Package Structure#
src/
├── database/ # Database services
│ ├── prisma.service.ts
│ └── database.module.ts
├── base/ # Base utilities
│ ├── base.entity.ts
│ ├── pagination.service.ts
│ ├── cursor.service.ts
│ ├── raise.util.ts
│ └── unauthorized.util.ts
├── mail/ # Email services
│ ├── mail.module.ts
│ ├── resend/ # Resend implementation
│ └── template/ # Email templating
├── errors/ # Domain errors
│ └── domain-error.ts
└── index.ts
Usage#
Installation#
This package is part of the monorepo and is automatically available to other packages via npm workspaces.
Importing#
import { PrismaService, DatabaseModule, BaseEntity } from "@cv/system";
Key Exports#
- Modules:
DatabaseModule,ResendModule,TemplateModule,BaseModule - Services:
PrismaService,MailService,HandlebarsTemplateService,TemplateRegistryService - Entities:
BaseEntity - Utilities:
raise,unauthorized,PaginationService,CursorService - Errors:
DomainError
Dependencies#
- Peer Dependencies:
@nestjs/common,@nestjs/core,@prisma/client,resend,handlebars - Internal Dependencies: None (foundation layer)
Architecture#
This package is the foundation layer and has no dependencies on other monorepo packages. It provides:
- Database access via Prisma
- Email sending and templating
- Base entity classes
- Pagination and cursor utilities
- Domain error base classes
All packages in the monorepo depend on this package, but this package depends on nothing within the monorepo.