@unidancing/app #
The UniDancing web app — an Ember application built with Vite (Embroider v4,
compatless/strict mode) and prerendered at build time via
vite-ember-ssr (SSG only, no
server runtime — the static dist/ is deployed to Cloudflare Pages).
Content comes from Tina CMS: the content graph lives in
content/ (repo root), the admin in tina/, and page data is queried through
the generated client in tina/__generated__/.
Prerequisites #
- Git
- Node.js >= 22 (see
.node-versionat the repo root) - pnpm
- Playwright chromium (for the test suite —
pnpm exec playwright install chromium)
Running / Development #
From the repo root (pnpm dev in this workspace is also wired through turbo):
pnpm dev # tinacms dev server + Vite dev server
- Visit your app at http://localhost:4200.
- Run the tests with
pnpm test:watch(vitest UI) — tests live intests/, served by vitest browser mode (chromium via playwright). - Tina admin at http://localhost:4001/admin.
pnpm start runs only the Vite dev server. Content queries then still require
the Tina content server — run pnpm start:tina separately if you start Vite on
its own.
Configuration #
There is no config/environment.js anymore; the app config is a regular module
in app/config/environment.ts. Runtime-configurable values come from .env
files via Vite (see envPrefix in vite.config.mts; YOUTUBE_API_KEY is
exposed from .env).
Building / Prerendering #
pnpm build # tinacms build + vite build (incl. SSG prerendering)
vite build in production mode additionally:
- enumerates the content routes at build time by querying the Tina GraphQL
endpoint baked into
tina/__generated__/client.ts(seefindRoutes()invite.config.mts); - renders every route with
vite-ember-ssr(happy-dom, no FastBoot) and writes<route>/index.htmlintodist/; - embeds the fetched content as a JSON data island
(
#unidancing-data, seeapp/services/app-data-cache.ts) so the browser boots from the prerendered data without re-querying the content API.
Prerendering runs against whatever endpoint tinacms build generated — the
local dev server or Tina Cloud (with TINA_CLIENT_ID/TINA_TOKEN, as passed
through by turbo). pnpm build:tina must run before vite build.
Running Tests #
pnpm test # vitest run (browser mode, chromium via playwright)
Tests run in vitest browser mode (see vite.config.mts → test). Run
pnpm test:prebuild first to generate a local Tina client when testing offline.
Linting #
pnpm lint # eslint, template-lint, stylelint, glint
pnpm lint:fix
Code Generators #
The classic ember generate generators no longer apply — files are plain ES
modules; copy an existing route/component/service as a template. ember-cli
remains installed only for the test runner.
Architecture notes #
- Compatless Embroider — no
ember-cli-build.js; the app boots throughapp/entry.tsand usesember-strict-application-resolver(app/app.ts) withimport.meta.globmodule registration. Services that are looked up by string (@service declare …) must be registered in that modules map. - Code splitting —
splitAtRoutesis compat-only. Lazy route bundles are declared explicitly inapp/route-splitting.tsand consumed by@embroider/routerviawindow._embroiderRouteBundles_. - Server-render detection —
isSSR()fromapp/domain/supporting/utilsis backed by a flag that onlyapp/app-ssr.ts(the SSG entry) sets. - Theming — design tokens from
@unidancing/themeare processed by@theemo/vite(seevite.config.mjs); no custom webpack plugin anymore.
Deploying #
Cloudflare Pages, static output from web/dist (same layout as before the
Vite migration: <route>/index.html per prerendered page, SPA fallback for
app routes like /training/*).
Further Reading / Useful Links #
- ember.js
- Vite build tooling guide
- Embroider
- vite-ember-ssr
- TinaCMS
- Development Browser Extensions