- TypeScript 100%
solar-term #
A Lakebed app for the twenty-four 节气 (jiéqì) — solar terms of the traditional Chinese calendar. It shows which term you are in today, how far through it you are, and browsable reference pages for every term.
Live app: https://solar-term.lakebed.app/
Features #
- Current term — name (simplified and traditional where they differ), pinyin, English name, summary, and progress toward the next term
- All 24 terms — grouped by season with past / current / upcoming status for the active solar year
- Term detail — full description, phenology, regional customs, and date window in China Standard Time
- Light and dark theme — toggle in the header; respects system preference until you choose
- PWA — installable on phone or desktop; offline-friendly caching for repeat visits
Term boundaries are precomputed for 2020–2036 from solar ecliptic longitude (15° per term). Display times use Asia/Shanghai (CST). Years outside that range use the nearest available boundary table.
Run locally #
npx lakebed dev
Open the URL printed in the terminal (usually http://localhost:3000).
While the dev server is running:
npx lakebed logs --port 3000
npx lakebed db list --port 3000
Routes #
| Path | Description |
|---|---|
/ |
Today's term, progress arc, phenology, customs, and the classic jiéqì mnemonic poem |
/terms |
All 24 terms in a seasonal grid (春 / 夏 / 秋 / 冬) |
/terms/:id |
One term — e.g. /terms/lichun for 立春 |
Project layout #
| Path | Role |
|---|---|
client/ |
Preact UI — pages, components, theme and PWA bootstrap |
server/ |
Lakebed capsule — health check and PWA asset endpoints |
shared/ |
Pure TypeScript — term metadata, boundary timestamps, calendar helpers |
No database or auth; calendar logic runs entirely in shared code on the client.
Health check #
curl http://localhost:3000/api/health
Install on your phone (PWA) #
After deploying (or while running npx lakebed dev on your LAN), open the app in Chrome or Safari:
- Android (Chrome): Menu → Install app or Add to Home screen
- iPhone (Safari): Share → Add to Home Screen
The app runs fullscreen with its own icon and caches pages for faster repeat visits.
Deploy #
npx lakebed deploy
Production hosts on lakebed.app. See Lakebed docs and Capsule API for platform details.