https://github.com/schiste/temis
TEMIS static Astro site with EmDash-managed content on Cloudflare
https://github.com/schiste/temis
Last synced: 6 days ago
JSON representation
TEMIS static Astro site with EmDash-managed content on Cloudflare
- Host: GitHub
- URL: https://github.com/schiste/temis
- Owner: schiste
- License: other
- Created: 2026-06-13T16:30:36.000Z (21 days ago)
- Default Branch: main
- Last Pushed: 2026-06-23T14:18:50.000Z (11 days ago)
- Last Synced: 2026-06-23T16:20:08.203Z (11 days ago)
- Language: TypeScript
- Size: 1.46 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
# TEMIS
TEMIS is a static Astro website whose content is authored in EmDash.
The stack is split into two deployable surfaces:
- `apps/site`: fully static Astro output for Cloudflare Pages.
- `apps/cms`: EmDash admin and preview runtime for Cloudflare Workers, backed by D1 and R2.
Content is published in EmDash, exported as a signed snapshot during the Pages build, and rendered into static HTML by Astro.
The V1 product direction is tracked in [docs/vision.md](./docs/vision.md),
[docs/prd-v1.md](./docs/prd-v1.md),
[docs/design-system.md](./docs/design-system.md), and the ADRs in
[docs/adr](./docs/adr).
Contribution guidelines are tracked in
[CONTRIBUTING.md](./CONTRIBUTING.md).
## Local Setup
```sh
pnpm install
pnpm dev:cms
pnpm seed
pnpm dev:site
```
For a purely offline static build using the committed starter snapshot:
```sh
pnpm build:offline
```
To mirror the current published production content locally, set the same
`EMDASH_PREVIEW_SECRET` used by the CMS snapshot endpoint, then pull the
production snapshot before starting the static site:
```sh
export EMDASH_PREVIEW_SECRET=replace-with-the-real-secret
pnpm snapshot:pull:production
pnpm dev:site
```
Or run the combined helper:
```sh
export EMDASH_PREVIEW_SECRET=replace-with-the-real-secret
pnpm dev:site:production-content
```
This mirrors production content through the published EmDash snapshot. It does
not give the local static site direct D1 access, which matches the production
static-site architecture.
To mirror the CMS database locally without giving local development write access
to production D1, export production D1 into the local SQLite database:
```sh
pnpm cms:sync:production-replica
pnpm dev:cms
```
Or bring both local surfaces up from production content:
```sh
export EMDASH_PREVIEW_SECRET=replace-with-the-real-secret
pnpm dev:production-replica
```
The replica command uses `wrangler d1 export --remote` as a read-only production
operation, then imports the SQL into `apps/cms/data.db`. Existing local
`data.db` is backed up before replacement. Normal local CMS development still
writes only to SQLite, and local dev does not enable the Pages deploy hook.
For the production static build, set `EMDASH_BASE_URL` and `EMDASH_PREVIEW_SECRET`, then run:
```sh
pnpm build
```
## CMS Schema Management
The V1 EmDash contract is tracked in two places:
- `apps/cms/.emdash/seed.json` for native EmDash collections, fields,
taxonomies, starter content, menus, and site options.
- `apps/cms/schema/site.schema.json` for TEMIS-specific V1 graph terms,
bylines, fixture relationships, and media policy.
Check local CMS schema drift:
```sh
pnpm cms:schema:check
```
Apply safe additive local changes:
```sh
pnpm cms:schema:apply
```
Check production D1 schema drift:
```sh
pnpm cms:schema:check:production
```
Apply safe additive production changes:
```sh
pnpm cms:schema:apply:production
```
The schema scripts are additive. They may add fields, field metadata, topic/tag
terms, fixture bylines, menu items, missing site options, and relationship
links. They do not delete, rename, or rewrite unrelated editorial content.
Extra legacy fields are reported as warnings.
## Cloudflare Names
- Pages project: `temis-site`
- CMS Worker: `temis-cms`
- D1 database: `temis-cms-db`
- R2 bucket: `temis-media`
See [Cloudflare setup](./docs/cloudflare.md) for the resource creation and deployment sequence.
## Licensing
TEMIS source code is dual-licensed under `MIT OR Apache-2.0`; see
[LICENSE](./LICENSE), [LICENSE-MIT](./LICENSE-MIT), and
[LICENSE-APACHE](./LICENSE-APACHE).
Published website content will use `CC-BY-SA-4.0`. Third-party dependencies
keep their own licenses; primary notices are tracked in
[THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md).