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.

Libraries

ets_zodiac