kundli-js
v1.0.1
Published
NPM SDK to generate Vedic Kundli using FastAPI backend
Maintainers
Readme
kundli-js
A lightweight JavaScript SDK to generate Vedic Kundli (birth chart) using a FastAPI-powered backend.
🚀 Features
- Generate Kundli using date, time, and location
- Simple and clean API
- Works in Node.js (v18+)
- Built on top of a high-performance FastAPI backend
📦 Installation
npm install kundli-js🧑💻 Usage
import { getKundli } from "kundli-js";
const data = await getKundli({
datetime: "1998-05-12T10:30:00",
lat: 20.2961,
lon: 85.8245,
});
console.log(data);📘 API Reference
getKundli(params)
Generates a Kundli based on birth details.
Parameters
| Name | Type | Required | Description | | -------- | ------ | -------- | ------------------------------ | | datetime | string | ✅ Yes | Birth date & time (ISO format) | | lat | number | ✅ Yes | Latitude of birth location | | lon | number | ✅ Yes | Longitude of birth location |
Example
await getKundli({
datetime: "2000-01-01T12:00:00",
lat: 28.6139,
lon: 77.2090,
});⚠️ Notes
- First request may be slower due to backend cold start (Render free tier)
- Ensure valid ISO datetime format (
YYYY-MM-DDTHH:mm:ss)
🌐 Backend API
This SDK uses the following API:
https://kundli-python-npm.onrender.com/kundli🛠️ Error Handling
try {
const data = await getKundli(payload);
} catch (error) {
console.error("Error fetching Kundli:", error.message);
}🔮 Future Improvements
- Dasha calculations
- Compatibility matching
- Transit analysis
- API key authentication
- Caching & performance optimizations
📄 License
MIT License
👨💻 Author
Rudranarayan Sahu
⭐ Support
If you find this useful, consider giving it a ⭐ on GitHub (if published there).
