Ashtakoot Guna Milan out of 36, with Rajju and Vedha checked as classical vetoes, from the Asterwise API via its TypeScript SDK. One server action, one form, no client-side key.
Tutorial: asterwise.com/blog/nextjs-vedic-matchmaking
git clone https://github.com/asterwise/nextjs-vedic-matchmaking
cd nextjs-vedic-matchmaking
npm install
cp .env.example .env.local # paste a key from https://asterwise.com/dashboard (free: 500 calls a month)
npm run dev # http://localhost:3000npm run smoke calls the same endpoint once from the command line and prints the score, the koota breakdown and whether the response carried Asterwise's signature header.
src/lib/asterwise.tsbuilds one SDK client fromASTERWISE_API_KEY. It is imported only by server code, so the key never ships to the browser.src/app/actions.tsis a server action. It reads the two people from the form, callsmatchmaking()withperson1(groom in the classical method) andperson2(bride), and returns either the typed response or an error message.src/app/page.tsxrenders the form withuseActionState, then the score, the veto line, the eight kootas, and the narrative.
Birthplaces are geocoded by the API, so a city name is enough. Leave the time blank and the API uses a sunrise chart for that person and sets birth_time_provided: false; Moon-based kootas stay exact, ascendant-based checks become approximate.
| Field | Meaning |
|---|---|
total_score |
Guna Milan points out of 36 |
breakdown |
Varna, Vashya, Tara, Yoni, Graha Maitri, Gana, Bhakoot, Nadi |
classical_vetoes |
has_veto, rajju (with rajju_type), vedha, veto_note |
doshas, dosha_cancellations |
Varna, Bhakoot and Nadi doshas and their cancellations |
mangal_compatibility |
Manglik status of each person and the match status |
supplementary_checks |
Mahendra and Stree Deergha |
compatibility_narrative |
overall, strengths[], concerns[], recommendation |
A veto is reported separately from the score on purpose: a 30/36 match with Rajju present is not a good match, and folding the veto into the points would hide that. Background: Rajju and Vedha as hard vetoes.
Next.js 16 (App Router, server actions), React 19, asterwise 0.2.3 (generated from the API's OpenAPI document). MIT licensed.