Skip to Content
GuideCore Libraries

Core Libraries

The @orbitusdev/core package is the backbone of the Orbitus monorepo, providing shared utilities, services, hooks, and configurations used across all applications and packages.

Structure

@orbitusdev/core/ ├── hooks/ # Custom React hooks ├── services/ # Business logic services (Email, Logger, etc.) ├── utils/ # General utility functions ├── providers/ # React Context providers ├── config/ # Environment and URL configurations ├── constants/ # Shared constants and enums ├── lib/ # Third-party library wrappers (Cache, API Response) ├── pwa/ # Service Worker and Manifest generation ├── seo/ # Metadata and Sitemap helpers └── types/ # Shared TypeScript type definitions

Key Modules

Services (/services)

Modular services for external integrations and core logic.

  • Email: Send emails transactional emails.
  • Logger: Structured logging.
  • Payment: Payment processing integration.
  • Storage: File upload and storage.

Hooks (/hooks)

Reusuable React hooks. See React Hooks specifically.

  • useClickOutside
  • useMobile
  • useHotkeys

Utils (/utils)

Helper functions. See Utilities.

  • cn (ClassMerger)
  • formatDate
  • delay

Providers (/providers)

Global state and context. See React Providers.

  • OrbitusProvider: The main wrapper for applications.

Usage

Import directly from the package subpaths to keep bundle sizes optimal.

// Import a hook import { useMobile } from '@orbitusdev/core/hooks'; // Import a utility import { cn } from '@orbitusdev/core/utils'; // Import a service import { Logger } from '@orbitusdev/core/services/logger';
Last updated on