# App templates

Each of the three is a working app, not a snippet: a form, a server, a drawing and the API's answer. Clone it, put a key in `.env`, run it. The code is MIT, so take it into your product with no strings.

All three are built the same way: Vite in front and one small Node server that the calls go through. A browser cannot call the API directly, so the key lives on the server and never reaches the page.

```bash
git clone https://github.com/astroway/starter-human-design
cd starter-human-design && npm install
cp .env.example .env     # your key goes here
npm run dev
```

Get a key in the [dashboard](https://api.astroway.info/dashboard/sign-up). While you build, use an `aw_test_*` sandbox key: it spends no credits.

## Human Design

Birth date, time and place in, bodygraph and reading out. One call to `POST /v1/human-design` returns the type, strategy, authority, profile, definition, incarnation cross, the nine centres with their active gates, every defined channel and both activation sets. The app draws the bodygraph in SVG and the activation table. 50 credits a reading, so 200 readings on the free tier.

<CardGrid>
  <LinkCard title="Live demo" href="https://api.astroway.info/demo/human-design/" />
  <LinkCard title="Code on GitHub" href="https://github.com/astroway/starter-human-design" />
  <LinkCard title="Deploy to Render" href="https://render.com/deploy?repo=https://github.com/astroway/starter-human-design" />
</CardGrid>

## BaZi

The Four Pillars and the luck cycle. `POST /v1/bazi/chart` returns the pillars with their hidden stems, na yin and twelve-stage phase, the day master, the element balance, the strength verdict with its reasoning, the symbolic stars and every combination and clash between the branches. `POST /v1/bazi/luck-pillars` returns Da Yun: the direction, the starting age and ten pillars of ten years each. The two calls go out together, 30 credits a reading.

<CardGrid>
  <LinkCard title="Live demo" href="https://api.astroway.info/demo/bazi/" />
  <LinkCard title="Code on GitHub" href="https://github.com/astroway/starter-bazi" />
  <LinkCard title="Deploy to Render" href="https://render.com/deploy?repo=https://github.com/astroway/starter-bazi" />
</CardGrid>

## Report desk

For a practitioner: client details in, a finished PDF with your brand on it out. Sixteen reports under one prefix, `POST /v1/reports/<type>`, each taking a `whitelabel` block, so the file your client gets carries your name and not ours. Fifteen of them are 5,000 credits a render, the tarot spread 100.

<CardGrid>
  <LinkCard title="Live demo" href="https://api.astroway.info/demo/practice/" />
  <LinkCard title="Code on GitHub" href="https://github.com/astroway/starter-practice" />
  <LinkCard title="Deploy to Render" href="https://render.com/deploy?repo=https://github.com/astroway/starter-practice" />
</CardGrid>

<Aside>
The demos are rate-limited per address and run on their own keys, each scoped to its own endpoints. The report desk demo renders the tarot spread only: a page on the open internet that makes a 5,000-credit report for anyone would spend a month's free tier in two clicks. Your own copy renders all sixteen.
</Aside>

## Deploying

The Render button reads `render.yaml` in the repo: one Node web service on the free plan, built and started by the scripts in package.json. Render asks for your API key when you create it. Any host that runs Node 22 works the same way: build, start, set the key.
