screenbook 1.1.0 → 1.1.2

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 +168 -0
  2. package/package.json +3 -2
package/README.md ADDED
@@ -0,0 +1,168 @@
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wadakatu/screenbook/main/assets/logo/logo.svg">
4
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/wadakatu/screenbook/main/assets/logo/logo-dark.svg">
5
+ <img alt="Screenbook" src="https://raw.githubusercontent.com/wadakatu/screenbook/main/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="https://raw.githubusercontent.com/wadakatu/screenbook/main/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="https://raw.githubusercontent.com/wadakatu/screenbook/main/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="https://raw.githubusercontent.com/wadakatu/screenbook/main/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="https://raw.githubusercontent.com/wadakatu/screenbook/main/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="https://raw.githubusercontent.com/wadakatu/screenbook/main/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
+ npm i -D screenbook
66
+ # or
67
+ pnpm add -D screenbook
68
+
69
+ # Initialize configuration
70
+ npx screenbook init
71
+
72
+ # Start the UI
73
+ npx screenbook dev
74
+ ```
75
+
76
+ Open http://localhost:4321 and explore your screen catalog.
77
+
78
+ ---
79
+
80
+ ## Defining Screens
81
+
82
+ Create `screen.meta.ts` files alongside your routes:
83
+
84
+ ```ts
85
+ import { defineScreen } from "screenbook"
86
+
87
+ export const screen = defineScreen({
88
+ id: "billing.invoices", // Unique identifier
89
+ title: "Invoice List", // Human-readable name
90
+ route: "/billing/invoices", // URL path
91
+
92
+ owner: ["billing-team"], // Who owns this screen?
93
+ tags: ["billing", "invoices"], // For filtering
94
+
95
+ next: [ // Where can users go from here?
96
+ "billing.invoice.detail",
97
+ "billing.payments"
98
+ ],
99
+
100
+ dependsOn: [ // What APIs does this screen call?
101
+ "BillingAPI.listInvoices",
102
+ "UserAPI.getCurrent"
103
+ ],
104
+ })
105
+ ```
106
+
107
+ ---
108
+
109
+ ## CLI Commands
110
+
111
+ | Command | Description |
112
+ |---------|-------------|
113
+ | `screenbook init` | Initialize Screenbook in your project |
114
+ | `screenbook build` | Generate metadata JSON from screen definitions |
115
+ | `screenbook dev` | Start the UI server for local development |
116
+ | `screenbook lint` | Check for missing screen definitions (CI-friendly) |
117
+
118
+ ---
119
+
120
+ ## Why Screenbook?
121
+
122
+ Every team has a screen map somewhere — Figma, Notion, or buried in a wiki. **When was yours last updated?**
123
+
124
+ Sound familiar?
125
+
126
+ - "Where's the screen map?" → "Check Notion... or maybe the old Figma file?"
127
+ - "How do users get to the payment screen?" → *crickets*
128
+ - "Which screens use the BillingAPI?" → "Let me grep... actually, I'm not sure"
129
+
130
+ **Screen maps go stale because they live outside of code.** Screenbook keeps your screen documentation in sync — automatically.
131
+
132
+ | Traditional Approach | Screenbook |
133
+ |---------------------|------------|
134
+ | Screen maps in Figma/Notion go stale | Lives in code, always up-to-date |
135
+ | "Which screens use this API?" requires grep | Impact analysis in one click |
136
+ | New members lost in undocumented flows | Searchable, visual catalog |
137
+ | No way to enforce documentation | `screenbook lint` in CI |
138
+
139
+ ---
140
+
141
+ ## CI Integration
142
+
143
+ Prevent documentation drift with a simple CI check:
144
+
145
+ ```yaml
146
+ # .github/workflows/screenbook.yml
147
+ name: Screenbook
148
+ on: [push, pull_request]
149
+
150
+ jobs:
151
+ lint:
152
+ runs-on: ubuntu-slim
153
+ steps:
154
+ - uses: actions/checkout@v6
155
+ - uses: pnpm/action-setup@v4
156
+ - run: pnpm install
157
+ - run: pnpm screenbook lint
158
+ ```
159
+
160
+ ---
161
+
162
+ ## Contributing
163
+
164
+ Contributions are welcome! Please feel free to submit a Pull Request.
165
+
166
+ ## License
167
+
168
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screenbook",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
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",