screenbook 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +166 -0
  2. package/package.json +3 -2
package/README.md ADDED
@@ -0,0 +1,166 @@
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="assets/logo/logo.svg">
4
+ <source media="(prefers-color-scheme: light)" srcset="assets/logo/logo-dark.svg">
5
+ <img alt="Screenbook" src="assets/logo/logo-dark.svg" height="48">
6
+ </picture>
7
+ </p>
8
+
9
+ <p align="center">
10
+ <strong>Define screens in code. Get an always-up-to-date catalog.</strong>
11
+ </p>
12
+
13
+ <p align="center">
14
+ <img src="assets/screenshots/hero.png" alt="Screenbook Hero" width="800">
15
+ </p>
16
+
17
+ <p align="center">
18
+ <a href="https://github.com/wadakatu/screenbook/actions/workflows/ci.yml"><img src="https://github.com/wadakatu/screenbook/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
19
+ <a href="https://github.com/wadakatu/screenbook/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a>
20
+ <a href="https://github.com/wadakatu/screenbook"><img src="https://img.shields.io/badge/TypeScript-5.0+-blue.svg" alt="TypeScript"></a>
21
+ <a href="https://github.com/wadakatu/screenbook"><img src="https://img.shields.io/badge/Node.js-22+-green.svg" alt="Node.js"></a>
22
+ </p>
23
+
24
+ <p align="center">
25
+ <a href="#quick-start">Quick Start</a> •
26
+ <a href="#features">Features</a> •
27
+ <a href="#why-screenbook">Why Screenbook?</a> •
28
+ <a href="#cli-commands">CLI</a>
29
+ </p>
30
+
31
+ ---
32
+
33
+ ## Features
34
+
35
+ ### Screen Catalog
36
+
37
+ <img src="assets/screenshots/screens.png" alt="Screen Catalog" width="700">
38
+
39
+ Browse all screens in your application. **Search by name, filter by tags, find by owner.** Every screen shows its route, dependencies, and navigation connections.
40
+
41
+ ### Navigation Graph
42
+
43
+ <img src="assets/screenshots/graph.png" alt="Navigation Graph" width="700">
44
+
45
+ **Visualize how users flow through your app.** See the big picture at a glance. Understand navigation paths without reading code.
46
+
47
+ ### Impact Analysis
48
+
49
+ <img src="assets/screenshots/impact.png" alt="Impact Analysis" width="700">
50
+
51
+ **Changing an API? Know exactly which screens break — before you ship.** Enter an API name and instantly see all affected screens, both direct and transitive dependencies.
52
+
53
+ ### Coverage Dashboard
54
+
55
+ <img src="assets/screenshots/coverage.png" alt="Coverage Report" width="700">
56
+
57
+ **Track documentation completeness across your app.** See coverage by owner and tag. Find gaps. Enforce coverage in CI to prevent drift.
58
+
59
+ ---
60
+
61
+ ## Quick Start
62
+
63
+ ```bash
64
+ # Install
65
+ pnpm add -D screenbook
66
+
67
+ # Initialize configuration
68
+ npx screenbook init
69
+
70
+ # Start the UI
71
+ npx screenbook dev
72
+ ```
73
+
74
+ Open http://localhost:4321 and explore your screen catalog.
75
+
76
+ ---
77
+
78
+ ## Defining Screens
79
+
80
+ Create `screen.meta.ts` files alongside your routes:
81
+
82
+ ```ts
83
+ import { defineScreen } from "screenbook"
84
+
85
+ export const screen = defineScreen({
86
+ id: "billing.invoices", // Unique identifier
87
+ title: "Invoice List", // Human-readable name
88
+ route: "/billing/invoices", // URL path
89
+
90
+ owner: ["billing-team"], // Who owns this screen?
91
+ tags: ["billing", "invoices"], // For filtering
92
+
93
+ next: [ // Where can users go from here?
94
+ "billing.invoice.detail",
95
+ "billing.payments"
96
+ ],
97
+
98
+ dependsOn: [ // What APIs does this screen call?
99
+ "BillingAPI.listInvoices",
100
+ "UserAPI.getCurrent"
101
+ ],
102
+ })
103
+ ```
104
+
105
+ ---
106
+
107
+ ## CLI Commands
108
+
109
+ | Command | Description |
110
+ |---------|-------------|
111
+ | `screenbook init` | Initialize Screenbook in your project |
112
+ | `screenbook build` | Generate metadata JSON from screen definitions |
113
+ | `screenbook dev` | Start the UI server for local development |
114
+ | `screenbook lint` | Check for missing screen definitions (CI-friendly) |
115
+
116
+ ---
117
+
118
+ ## Why Screenbook?
119
+
120
+ Every team has a screen map somewhere — Figma, Notion, or buried in a wiki. **When was yours last updated?**
121
+
122
+ Sound familiar?
123
+
124
+ - "Where's the screen map?" → "Check Notion... or maybe the old Figma file?"
125
+ - "How do users get to the payment screen?" → *crickets*
126
+ - "Which screens use the BillingAPI?" → "Let me grep... actually, I'm not sure"
127
+
128
+ **Screen maps go stale because they live outside of code.** Screenbook keeps your screen documentation in sync — automatically.
129
+
130
+ | Traditional Approach | Screenbook |
131
+ |---------------------|------------|
132
+ | Screen maps in Figma/Notion go stale | Lives in code, always up-to-date |
133
+ | "Which screens use this API?" requires grep | Impact analysis in one click |
134
+ | New members lost in undocumented flows | Searchable, visual catalog |
135
+ | No way to enforce documentation | `screenbook lint` in CI |
136
+
137
+ ---
138
+
139
+ ## CI Integration
140
+
141
+ Prevent documentation drift with a simple CI check:
142
+
143
+ ```yaml
144
+ # .github/workflows/screenbook.yml
145
+ name: Screenbook
146
+ on: [push, pull_request]
147
+
148
+ jobs:
149
+ lint:
150
+ runs-on: ubuntu-slim
151
+ steps:
152
+ - uses: actions/checkout@v6
153
+ - uses: pnpm/action-setup@v4
154
+ - run: pnpm install
155
+ - run: pnpm screenbook lint
156
+ ```
157
+
158
+ ---
159
+
160
+ ## Contributing
161
+
162
+ Contributions are welcome! Please feel free to submit a Pull Request.
163
+
164
+ ## License
165
+
166
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screenbook",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Screen catalog and navigation graph generator for frontend applications",
5
5
  "type": "module",
6
6
  "bin": {
@@ -17,7 +17,8 @@
17
17
  "module": "./dist/index.mjs",
18
18
  "types": "./dist/index.d.mts",
19
19
  "files": [
20
- "dist"
20
+ "dist",
21
+ "README.md"
21
22
  ],
22
23
  "scripts": {
23
24
  "build": "tsdown",