Skip to content

Latest commit

 

History

History
153 lines (108 loc) · 7.02 KB

File metadata and controls

153 lines (108 loc) · 7.02 KB

FOT Libraries

A collection of production-ready TypeScript libraries built with Bun, covering domains from financial calculations to content processing.

Libraries

Crypto & Signatures

Library Description Version
@f-o-t/asn1 ASN.1 DER encoding, decoding, and builder helpers npm
@f-o-t/crypto PKCS#12 parsing, CMS/PKCS#7 SignedData, hashing, and PEM utilities npm
@f-o-t/digital-certificate Brazilian A1 digital certificate handling with .pfx/.p12 parsing, XML-DSig signing, and mTLS npm
@f-o-t/e-signature PAdES PDF signing with ICP-Brasil compliance npm

Documents & Content

Library Description Version
@f-o-t/pdf PDF generation, parsing, and editing npm
@f-o-t/xml XML parsing, manipulation, canonicalization, and XPath npm
@f-o-t/csv CSV parsing and generation npm
@f-o-t/markdown Markdown parsing and processing npm
@f-o-t/ofx OFX (Open Financial Exchange) parser and generator npm
@f-o-t/qrcode QR code generation to PNG buffer npm

Business Logic

Library Description Version
@f-o-t/condition-evaluator Flexible, typesafe condition evaluator for building rule engines npm
@f-o-t/rules-engine Business rules engine with condition evaluation npm
@f-o-t/money Type-safe money handling with BigInt precision and ISO 4217 currency support npm
@f-o-t/bigint BigInt utilities for precision arithmetic npm
@f-o-t/tax-calculator Brazilian tax calculation npm

Utilities

Library Description Version
@f-o-t/brasil-api Brazilian government API integrations npm
@f-o-t/content-analysis Content analysis and processing utilities npm
@f-o-t/datetime Date and time utilities npm
@f-o-t/spelling Spelling correction and validation npm
@f-o-t/uom Unit of measure conversions npm

Tooling

Library Description Version
@f-o-t/cli FOT build CLI (fot build, fot test, etc.) npm
@f-o-t/config Shared build configuration for FOT libraries npm

Requirements

  • Bun v1.0 or higher
  • Node.js v20 or higher (for compatibility)

Quick Start

Clone the repository and install dependencies:

git clone https://github.com/F-O-T/contentta-nx.git fot-libraries
cd fot-libraries
bun install

Development

Available Commands

# Build all libraries
bun run build

# Run type checking
bun run typecheck

# Format code with Biome
bun run format

# Run tests
bun run test

# Clean build artifacts
bun run clean

# Release a library
bun run release:libraries

Working with Libraries

Each library is independently versioned and published. To work on a specific library:

cd libraries/<library-name>

# Development mode with watch
bun run dev

# Build the library
bun run build

# Run tests
bun run test

# Type check
bun run typecheck

Monorepo Structure

This is an Nx monorepo using Bun workspaces:

fot-libraries/
├── libraries/          # Published libraries
│   ├── condition-evaluator/
│   ├── rules-engine/
│   ├── money/
│   └── ...
├── scripts/           # Build and release automation
├── biome.json        # Code formatting config
├── nx.json           # Nx configuration
└── package.json      # Workspace config

Code Standards

  • Formatting: Biome with 3 spaces, 80 char line width, double quotes
  • TypeScript: Strict mode, explicit types, camelCase variables
  • Commits: Conventional format: type(scope): description
  • Testing: Bun test framework
  • Versioning: Independent library versioning with semantic versioning

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

License

Licensed under the MIT License. Individual libraries may have their own licenses (typically MIT) - check each library's package.json.

Support

  • Issues: Report bugs and feature requests at GitHub Issues
  • Documentation: Each library contains its own README with detailed usage examples

Built with Bun and Nx