Skip to content

Commit 2d9fdcd

Browse files
committed
Refactor: scripts, skeletons and production mode
1 parent 92dbf50 commit 2d9fdcd

96 files changed

Lines changed: 2701 additions & 525 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ The first visit creates the site and admin account.
3434

3535
`bun run dev` defaults to SQLite at `.tmp/dev.db`. Set `DATABASE_URL=postgres://...` to use Postgres instead.
3636

37+
To try the app locally in production mode (built admin SPA from `./dist`, no Vite, no `--watch`, same SQLite dev DB):
38+
39+
```sh
40+
bun run start
41+
```
42+
43+
Builds the admin SPA, then starts the server on `http://localhost:3001`. If port 3001 is already held by a dev server (or a previous `bun run start`), you'll be prompted whether to kill the holder and take over. `bun run dev` uses the same prompt for ports 3001 and 5173.
44+
3745
## Production Deployment
3846

3947
The default self-host install is **SQLite + one container** — recommended for most users (single sites, hobby and small-business installs, single-author or small editorial teams). No `.env` file required:

bun.lock

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

data/cms.db

4 KB
Binary file not shown.

data/cms.db-shm

32 KB
Binary file not shown.

data/cms.db-wal

559 KB
Binary file not shown.

docs/superpowers/plans/2026-05-25-publishing-architecture.md

Lines changed: 776 additions & 0 deletions
Large diffs are not rendered by default.
-116 Bytes
Binary file not shown.

examples/plugins/analytics/admin/dashboard.tsx

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
Card,
1212
Heading,
1313
Select,
14+
SkeletonBlock,
1415
Sparkline,
1516
Stack,
1617
Text,
@@ -108,18 +109,11 @@ function AnalyticsDashboard() {
108109
<Alert tone="danger" title="Failed to load analytics">{error}</Alert>
109110
)}
110111

111-
{/* Skeleton while loading for the first time */}
112-
{loading && !stats && (
113-
<Stack direction="row" gap={12}>
114-
{[0, 1, 2, 3].map(i => (
115-
<div key={i} style={{ flex: 1 }}>
116-
<Card padding={16} bordered>
117-
<Text variant="muted" size="sm">Loading…</Text>
118-
</Card>
119-
</div>
120-
))}
121-
</Stack>
122-
)}
112+
{/* Skeleton while loading for the first time. Uses the host's
113+
shared `<SkeletonBlock>` so the analytics plugin's loading
114+
state reads identically to every other loading region in the
115+
editor (same three-bar shape, same shimmer cadence). */}
116+
{loading && !stats && <SkeletonBlock minHeight={240} ariaLabel="Loading analytics" />}
123117

124118
{stats && (
125119
<Stack gap={24}>
0 Bytes
Binary file not shown.
-89 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)