Files
zeekay de4ae081e5 Press — issue-based digital magazine template
Real Hanzo-stack starter: Vite + React 19 + @hanzo/gui + @hanzo/iam +
@hanzo/base. Three editorial views (newsstand, issue contents, article read)
built from @hanzo/gui primitives; black/white/one-hot-red magazine design in
src/press.tsx. schema.sql provisions org-scoped issues + articles collections.
tsc + vite build green.
2026-07-21 10:38:15 -07:00

38 lines
1.1 KiB
TypeScript

import type { BaseRecord } from '@hanzo/base/react'
/**
* In-app navigation — one static SPA, no router dependency. The signed-in
* shell holds a single `Route` in state and hands `Go` to each view. Only
* `/auth/callback` is matched off the URL (in app.tsx); everything else is a
* value here, so the three views stay decoupled from each other.
*/
export type Route =
| { at: 'newsstand' }
| { at: 'issue'; issue: string }
| { at: 'article'; issue: string; article: string }
export type Go = (route: Route) => void
/** One row of the `issues` collection (see schema.sql). */
export interface Issue extends BaseRecord {
number: number
title: string
cover_line: string
published_at: string
published: boolean
}
/** One row of the `articles` collection (see schema.sql). */
export interface Article extends BaseRecord {
issue_id: string
title: string
dek: string
body: string
department: string
is_cover: boolean
order: number
}
/** Departments a piece can run under — presets that guide the newsroom. */
export const departments = ['Features', 'Dispatch', 'Interview', 'Essay', 'Review', 'The Back Page'] as const