ostro is a web page that computes and draws Western astrology charts. Enter a birth date, time and place, and it draws the chart wheel and writes a full report: positions, houses, aspects, and a reading of each of them, in English or in Vietnamese.
Everything is computed in your browser. There is no account, no server doing the maths, and nothing you type leaves the page.
One, two, or a whole group
The page is a form with one card per person, and the number of cards decides the kind of chart:
- One card — natal chart. Twelve bodies (Sun to Pluto, the North Node and Lilith), the Ascendant and Midheaven, Placidus houses, the aspects between them and an aspect grid.
- Two cards — synastry. Both people on one wheel, the first inside and the second outside. The lines in the middle are the aspects between the two charts, and each person’s planets are placed in the other’s houses.
- Three or more — combined chart. One ring per person, each pair with its own line colour. Only close aspects between people are kept, and the report points out hot spots: narrow zones of the zodiac where at least three people have a planet.
Before you enter anything, the page shows the sky over Greenwich at this moment, so there is always a chart to look at.
Filling in the form
- Birthplace on a map. “Choose on map” opens a map with a search box: find a town or click the place, and latitude and longitude are filled in.
- UTC offset filled in for you. Once the place is chosen, the page finds its time zone and works out the offset for the birth date and time, daylight saving included. For a birth long ago it tells you to double-check, because old time zone records describe the main city of a zone, not every town in it.
- No birth time? Still fine. Leave time and place empty: the chart is computed for noon UTC, houses and angles are left out, and the report says clearly which parts could not be computed instead of guessing.
- Saved charts. Every chart you draw is kept in a list in your browser. One click puts a saved chart back into the form, so a synastry or a group chart can be put together from people you entered before. Correcting someone’s birth time updates their saved entry.
- Examples and files. Load the built-in examples, or open chart files in JSON to fill several cards at once.
The report
The report sits next to the wheel in three tabs:
- Chart — positions with declination (marking a planet that goes out of bounds), house cusps and their rulers, the aspects and an aspect grid, and a summary.
- Planets and houses — each planet read in its sign and in its house, with its dignity (domicile, exaltation, detriment, fall), and each house read twice: by the sign on its cusp and by where its ruler sits.
- Aspects — a reading of every aspect.
For two or more people the report is written about them by name: a reading of each aspect between their charts, where each person’s planets fall in the other’s houses, what each group hot spot means, and a compatibility score from 0 to 100 — overall and for emotions, love and attraction, communication, identity and direction, and commitment. The score is a rule of thumb built for ostro, not a standard method: close, harmonious contacts between personal planets raise it, tense ones lower it, and a few aspects alone can never push it to an extreme.
All the reading texts — well over a thousand of them — were written for ostro, in both languages.
When you’re done, save the wheel as SVG or PNG, save the report as Markdown, or copy the report to paste somewhere else.
English and Vietnamese
The page opens in English and switches to Vietnamese with one click; the choice is remembered. The switch covers everything: the form, the wheel, and every line of the report.
Private by design
All computing happens in the browser, and the form and your saved charts stay in that browser’s local storage — clearing its site data removes them, and they don’t follow you to another device.
The map is the one part that talks to other servers, and nothing is requested until you open it: map tiles and place search come from OpenStreetMap services, and the time zone lookup sends the chosen place rounded to about 1 km. The map dialog says all of this up front. If the map can’t be reached, the form still works — latitude, longitude and offset can always be typed by hand.
Under the hood
ostro is a static site with no backend: the browser downloads one WebAssembly module and does all the work itself.
| Layer | Technology |
|---|---|
| Astronomy | Swiss Ephemeris (C), in Moshier mode |
| Chart logic, drawing, report | Odin — about 13,000 lines, most of it the reading texts |
| Compiling to the browser | Odin’s js_wasm32 target + Emscripten |
| Page | Plain HTML, CSS and JavaScript — no framework, no npm packages |
| Map | Hand-written, on OpenStreetMap tiles, Nominatim / Photon search |
| Time zones | Open-Meteo for the zone name, the browser’s Intl API for the offset |
| Hosting | Cloudflare Pages, deployed by GitHub Actions with Wrangler |
Swiss Ephemeris for the positions
Planet positions, houses and the Ascendant/Midheaven come from Swiss Ephemeris, the C library behind most serious astrology software. It runs in Moshier mode, which computes positions from built-in analytical theories instead of reading ephemeris data files — so the page needs no data download, at the cost of Chiron, which Moshier mode can’t compute. Odin talks to it through a small hand-written binding of five functions (swe_julday, swe_revjul, swe_calc_ut, swe_houses, swe_close), with array parameters typed as fixed-size arrays so the compiler rejects a wrong size.
Odin for everything else
Odin is a small, fast systems language in the C family, with no garbage collector and a good standard library. ostro’s code is split into packages that depend in one direction only:
astro— dates and time zones, positions, houses, aspects, dignities, hot spots, the compatibility score;svg— the chart wheel, written out as SVG text;report— the Markdown report and all the reading texts;compose— puts the three together for natal, synastry and combined charts;wasm— the entry point the web page calls.
Some choices along the way: local time is converted to UTC with plain integer day counting, so midnight, month ends and leap years need no special case. Aspects are found by measuring the angular distance directly, so a conjunction or opposition can never slip through. Every text is written as tr("tiếng Việt", "English") right where it is used, so a missing translation is a compile error.
From Odin and C to one .wasm file
The build has three steps:
- Emscripten compiles Swiss Ephemeris (C) to a WebAssembly library.
- Odin compiles its packages for
js_wasm32into a single object file, not yet linked. - Emscripten links the two into
ostro.wasmplus a small JavaScript loader, bringing along the C standard library that Swiss Ephemeris needs.
Two runtimes in one module need some glue. Odin expects a few host functions and an entry point called _start rather than main; a short pre-script supplies both. More importantly, Odin’s default wasm allocator and Emscripten’s malloc would each carve up the same memory without knowing about each other, so ostro routes every Odin allocation through Emscripten’s malloc. Each request works in a temporary region that is freed in one go before the next one, and a test draws 300 charts in a row to make sure memory doesn’t grow.
The page talks to the module through one function: it sends the form as JSON and gets back JSON holding the SVG wheel and the report. The language goes along with each request, so switching between English and Vietnamese redraws everything without reloading.
A page without a framework
The front end is about 1,900 lines of plain JavaScript and 1,000 lines of CSS:
app.js— the form, saved charts, calling the wasm module, showing the result, exporting SVG/PNG/Markdown;map.js— the birthplace map: tiles laid out in Web Mercator, dragging, zooming, keyboard control and search, in under 500 lines. A map library would have been bigger than the rest of the page;i18n.js— every text of the page in both languages.
The report is Markdown, but it only uses headings, tables, paragraphs, quotes and bold, so the page renders it itself, inserting every piece as plain text — a name typed into the form can never become HTML. The time zone lookup only returns a zone name like Asia/Ho_Chi_Minh; the offset for the birth date is then worked out with Intl.DateTimeFormat, because the browser already carries the full history of every time zone. When a map service can’t be reached, a second one is tried, and the form always accepts coordinates and offsets typed by hand.
Locked down
The page ships a strict Content-Security-Policy: scripts only from its own origin (plus permission to compile WebAssembly), images only from itself and the two OpenStreetMap tile servers, network requests only to the search and time zone services. Cloudflare adds nosniff, a no-framing rule and a referrer policy that sends the map servers the site’s address but never what you typed.
Tested before it ships
A GitHub Actions workflow installs pinned versions of Odin and Emscripten, builds the module, runs the Odin test suite, then loads the .wasm in Node and checks every example chart in both languages — the wheel, the three report tabs and the memory test — before Wrangler uploads the site to Cloudflare Pages. The deploy step runs in a separate job that only sees the built files, so it alone holds the Cloudflare credentials.
Status
ostro is under active development. If you try it and something reads wrong or draws oddly, I’d like to hear about it.