@otak-udang/shared

v1.11.4

Published

Shared library for Otak Udang AI platform

Readme

Otak Udang AI Shared Library

A shared library for the Otak Udang AI platform, containing common types, DTOs, utilities, and constants used across microservices.

Installation

npm i @otak-udang/shared

Usage

import { CreateUserDto, Package, Role, ErrorCode } from "ouai-shared";

Features

  • Constants

    • Error Codes and Messages
    • User Roles and Permissions
    • Package Types and Features
  • DTOs

    • Authentication DTOs
    • User Management DTOs
    • Farm Management DTOs
  • Interfaces

    • Common Types
    • User Types
    • Event Types
  • Utilities

    • Error Handling
    • Google Pub/Sub Integration

Package Features

Small Package

  • Real-time monitoring
  • Basic alerts
  • Basic reporting
  • Single plot management

Medium Package

  • All Small package features
  • Device control
  • Advanced alerts
  • Advanced reporting
  • Multi-plot management

Large Package

  • All Medium package features
  • AI-driven insights
  • Predictive analytics
  • Automated control
  • Enterprise reporting

Development

# Install dependencies
npm install

# Build
npm run build

# Test
npm test

# Lint
npm run lint

# Format
npm run format

Breaking Changes

When making breaking changes:

  1. Update the version following semantic versioning
  2. Document changes in CHANGELOG.md
  3. Update affected services

Contributing

  1. Create a feature branch
  2. Make your changes
  3. Run tests and linting
  4. Submit a pull request

License

ISC