ets_zodiac 0.1.1 copy "ets_zodiac: ^0.1.1" to clipboard
ets_zodiac: ^0.1.1 copied to clipboard

Cross-platform Zodiac SDK — Western & Chinese Zodiac data, calculations, optional icons, and localization for Dart & Flutter.

ETS Zodiac Logo

ETS Zodiac Sign 🌟 #

A professional, zero-dependency, cross-platform Zodiac SDK.
Calculates Western, Chinese, and Indian (Vedic) Zodiacs with built-in localization & icons.

NPM Version Pub Version License: MIT


📖 Overview #

ETS Zodiac is the ultimate astrology and zodiac calculation engine for developers. Built on a philosophy of a Single Source of Truth, all data, translations, and mathematical boundaries live in a central JSON core. This data is strictly compiled into high-performance, native SDKs for JavaScript (Web/Node) and Dart (Flutter).

✨ Key Features #

  • 🌍 3 Complete Astrology Systems:
    • Western Zodiac: Calculates the correct sign, ruling planet, element, and modality.
    • Chinese Zodiac: Mathematically maps Gregorian dates to the exact Lunar Calendar bounds (1900–2100). Provides animal, element, and yin/yang.
    • Indian (Vedic) Zodiac: Calculates the precise Rashi based on Sidereal dates (Lahiri Ayanamsa), complete with Sanskrit names.
  • 🌐 Built-in Localization: Fully translated into 11 languages out of the box (English, Bengali, Hindi, Arabic, Chinese, Spanish, French, Portuguese, Japanese, Russian, German).
  • 🚀 Zero Dependencies: Incredibly lightweight. No third-party packages required.
  • 🎨 Integrated Icons: Comes with built-in SVG and PNG icon mappings for all signs.
  • 🛡️ Type-Safe & Tested: 100% written in TypeScript and Dart with comprehensive automated test coverage.

💻 Getting Started #

Choose your platform to get started instantly.

🌐 For Web & Node.js (JavaScript / TypeScript) #

Installation:

npm install ets-zodiac

Usage:

import { getWesternSign, getChineseZodiacByDate, getIndianZodiac } from 'ets-zodiac';

// Western Zodiac (Localized in Bengali)
const western = getWesternSign(10, 24, { locale: 'bn' });
console.log(western.localizedName); // "বৃশ্চিক" (Scorpio)

// Chinese Zodiac
const chinese = getChineseZodiacByDate(new Date(1995, 9, 24));
console.log(chinese.animal.name); // "Pig"

// Indian / Vedic Zodiac
const indian = getIndianZodiac(10, 24);
console.log(indian.rashi.sanskritName); // "तुला" (Tula)

👉 Read the full JS/TS Documentation


📱 For Flutter & Dart #

Installation:

flutter pub add ets_zodiac

(Or dart pub add ets_zodiac for pure Dart projects)

Usage:

import 'package:ets_zodiac/ets_zodiac.dart';

void main() {
  // Western Zodiac
  final western = getWesternSign(10, 24);
  print(western.sign.name); // "Scorpio"

  // Chinese Zodiac (Localized in Hindi)
  final chinese = getChineseZodiacByDate(DateTime(1995, 10, 24), options: ChineseOptions(locale: 'hi'));
  print(chinese.localizedName); // "सुअर" (Pig)

  // Indian / Vedic Zodiac
  final indian = getIndianZodiac(10, 24);
  print(indian.rashi.name); // "Tula"
}

👉 Read the full Dart/Flutter Documentation


🏗️ Monorepo Architecture #

This project is a monorepo structured as follows:

  • /core-data: The absolute source of truth. Contains pure JSON files defining zodiac boundaries, characteristics, and multi-language strings.
  • /packages/zodiac-js: The NPM package. Contains the TS calculation logic.
  • /packages/zodiac-dart: The pub.dev package. Contains the Dart calculation logic.
  • /scripts: Build tools that validate the JSON data and compile it directly into the native SDK packages at build time.

🤝 Contributing #

We welcome contributions! Whether it's adding a new language translation, expanding the Chinese cycle dates beyond 2100, or adding a new astrology system, please feel free to open a Pull Request.

📜 License #

This project is licensed under the MIT License - see the LICENSE file for details.

0
likes
160
points
107
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Cross-platform Zodiac SDK — Western & Chinese Zodiac data, calculations, optional icons, and localization for Dart & Flutter.

Homepage
Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

More

Packages that depend on ets_zodiac