open-index/open-npm huggingface dataset:
npm package: @katarsaad/infrastructure
Description: Infrastructure components and external service adapters
Latest version: 1.0.4

# @katarsaad/infrastructure

Enterprise-grade infrastructure components and external service adapters for the System monorepo.

## Installation

```bash
npm install @katarsaad/infrastructure
```

## Features

- **Database Abstraction** - Prisma-based repository pattern
- **Caching Layer** - Redis and in-memory cache support
- **Query Builder** - Type-safe query construction
- **Repository Factory** - Dynamic repository creation
- **Domain Services** - Base classes for domain logic

## Quick Start

```typescript
import { InfrastructureModule, Infrastructure } from '@katarsaad/infrastructure';

@Module({
  imports: [
    InfrastructureModule.forRoot({
      database: {
        url: process.env.DATABASE_URL,
        provider: 'postgresql'
      },
      cache: {
        provider: 'redis',
        url: process.env.REDIS_URL
      }
    })
  ]
})
export class AppModule {}
```

## API Reference

### Infrastructure
Core infrastructure service providing database and cache access.

### Repository Factory
Creates type-safe repositories for domain entities.

### Query Builder
Constructs complex database queries with type safety.

## Configuration

```typescript
interface InfrastructureConfig {
  database: {
    url: string;
    provider: 'mysql' | 'postgresql' | 'sqlite';
  };
  cache: {
    provider: 'redis' | 'memory';
    url?: string;
    ttl?: number;
  };
}
```

## License

MIT