ETS Zodiac Sign ๐
A professional, zero-dependency, cross-platform Zodiac SDK.
Calculates Western, Chinese, and Indian (Vedic) Zodiacs with built-in localization & icons.
๐ 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.