fse-theme-default
v0.6.0
Published
Default theme for full_stack_engine apps — a complete Astro project: app shell, design system, auth pages, emails and the generic metadata-driven CRUD pages. Extend it with a child theme.
Readme
fse-theme-default
The default theme for full_stack_engine
apps: the app shell (sidebar navigation built from your models, dark mode),
the design system, every auth page and email, and the generic
metadata-driven CRUD pages. An app with nothing but #[model] structs gets
a complete UI from it.
It ships in two forms, built from this one folder:
| Package | Contains | Used by |
| --- | --- | --- |
| crate fse-theme-default | the built theme (dist/) | every app: .theme(Theme::embedded(&fse_theme_default::DIST)) |
| npm fse-theme-default | the Astro sources | child themes built with Astro |
Theme contract
A built theme is a folder with theme.json (name, optional parent),
**/*.html Tera templates (named by path: login/index.html → login) and
static assets. The framework layers the active theme over its parents at
runtime, so a child theme only contains what it changes. See
docs/themes.md.
Template names the framework renders: index, error, public/error,
login, register, register-success, forgot-password,
reset-password, settings, users, user, emails/verify,
emails/verify-email-change, emails/password-reset, fse/list,
fse/form, fse/public-list, fse/public-detail.
Extension points for Astro child themes
A child theme overrides any file under src/ by creating the same path in
its own src/ — the parent's pages then use the child's version:
src/layouts/Layout.astro— the whole shell,src/components/SidebarLinks.astro— app-specific sidebar entries (renders thesidebar-linksslot; overriding it replaces every contribution),src/components/Logo.astro— the logo in the sidebar, mobile header and auth pages (or replace justsrc/assets/logo.svg),src/components/Head.astro— extra<head>tags on every page (favicon, fonts, meta tags),src/styles/global.css— the Tailwind root (importsrc/styles/theme.cssand override tokens after it).
@parent/... imports the parent's original file (e.g. to wrap it);
@theme/... the most specific theme's version of a file.
Slots
Where several child themes and modules add to one place, the theme has a
slot: every src/slots/<slot>/<Name>.astro of the child theme and of the
app's modules is rendered there (this theme's first, modules next, the
child last; a same-named file of a more specific layer replaces the other):
sidebar-links— sidebar entries between "Home" and the model links,settings-sections— sections of the settings page (data throughpage_context("settings", ...)),head— extra<head>tags,dashboard— widgets below the home page's model cards,record-panels— panels below a generated record form (checkmeta.table).
Development
bun install
bun run dev # astro dev
bun run build # astro check + build → dist/ (what the crate embeds)The pages are typed against the framework's base translations
(../framework/locales).
