@argus-vrt/web 0.1.0 → 0.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 (51) hide show
  1. package/README.md +65 -109
  2. package/dist-cli/index.js +482 -0
  3. package/package.json +26 -14
  4. package/.cta.json +0 -15
  5. package/DEPLOYMENT.md +0 -154
  6. package/Dockerfile +0 -51
  7. package/docker-compose.prod.yml +0 -38
  8. package/docker-compose.yml +0 -15
  9. package/drizzle/0000_slim_makkari.sql +0 -61
  10. package/drizzle/meta/0000_snapshot.json +0 -452
  11. package/drizzle/meta/_journal.json +0 -13
  12. package/drizzle.config.ts +0 -10
  13. package/public/favicon.ico +0 -0
  14. package/public/logo-argus.svg +0 -8
  15. package/public/logo-variants/logo-argus-a.svg +0 -9
  16. package/public/logo-variants/logo-argus-modern.svg +0 -11
  17. package/public/logo-variants/logo-argus-peacock.svg +0 -8
  18. package/public/logo192.png +0 -0
  19. package/public/logo512.png +0 -0
  20. package/public/manifest.json +0 -25
  21. package/public/robots.txt +0 -3
  22. package/public/tanstack-circle-logo.png +0 -0
  23. package/public/tanstack-word-logo-white.svg +0 -1
  24. package/scripts/backfill-kind.ts +0 -148
  25. package/src/api-plugin.ts +0 -169
  26. package/src/components/image/ImageCompare.tsx +0 -188
  27. package/src/components/story/StoryFlatList.tsx +0 -67
  28. package/src/components/story/StoryGroupedTree.tsx +0 -273
  29. package/src/components/story/StoryTree.tsx +0 -185
  30. package/src/components/ui/Drawer.tsx +0 -110
  31. package/src/components/ui/SearchInput.tsx +0 -95
  32. package/src/components/ui/StatusBadge.tsx +0 -59
  33. package/src/components/ui/ViewModeToggle.tsx +0 -39
  34. package/src/db/index.ts +0 -27
  35. package/src/db/schema.ts +0 -151
  36. package/src/hooks/useDebounce.ts +0 -23
  37. package/src/hooks/useStoryTree.ts +0 -205
  38. package/src/lib/utils.ts +0 -55
  39. package/src/logo.svg +0 -12
  40. package/src/routeTree.gen.ts +0 -177
  41. package/src/router.tsx +0 -17
  42. package/src/routes/__root.tsx +0 -174
  43. package/src/routes/branches/$name.tsx +0 -171
  44. package/src/routes/branches/index.tsx +0 -104
  45. package/src/routes/index.tsx +0 -178
  46. package/src/routes/tests/$id.tsx +0 -417
  47. package/src/routes/tests/index.tsx +0 -128
  48. package/src/routes/upload.tsx +0 -108
  49. package/src/styles.css +0 -213
  50. package/tsconfig.json +0 -28
  51. package/vite.config.ts +0 -30
package/README.md CHANGED
@@ -1,157 +1,113 @@
1
1
  # @argus-vrt/web
2
2
 
3
- **Web dashboard for reviewing visual regression test results.**
3
+ **CLI tool for deploying and managing the Argus web dashboard.**
4
4
 
5
- A self-hosted dashboard that pairs with [@argus-vrt/cli](https://www.npmjs.com/package/@argus-vrt/cli) to give your team a visual review interface for screenshot diffs — similar to Chromatic, but self-hosted.
5
+ The Argus web dashboard is a self-hosted review interface for visual regression test results — similar to Chromatic, but self-hosted. This package provides an interactive CLI to set up and manage the dashboard via Docker.
6
6
 
7
- ## Features
8
-
9
- - **Test Overview** - Dashboard showing all test runs with status badges
10
- - **Image Comparison** - Four view modes:
11
- - Side by Side - Compare baseline and current screenshots
12
- - Diff Only - View the difference image
13
- - Overlay - See diff highlights overlaid on current screenshot with adjustable opacity
14
- - Current Only - View just the current screenshot
15
- - **Story Browser** - Three organization modes:
16
- - Flat list - Simple alphabetical list
17
- - Tree view - Grouped by component name
18
- - Grouped view - Organized by directory structure
19
- - **Search** - Typeahead search with Cmd/Ctrl+K keyboard shortcut
20
- - **Filtering** - Filter stories by status (all, changed, new, passed)
21
- - **Mobile Responsive** - Drawer-based navigation on mobile devices
22
- - **Dark Mode** - Full dark mode support
23
-
24
- ## Deployment
25
-
26
- ### Quick Start with Docker
7
+ ## Quick Start
27
8
 
28
9
  ```bash
29
- # Clone the repo
30
- git clone https://github.com/maxcwolf/argus.git
31
- cd argus/packages/web
10
+ # Run the interactive setup wizard
11
+ npx @argus-vrt/web init
32
12
 
33
- # Start the dashboard and database
34
- docker compose -f docker-compose.prod.yml up -d
13
+ # Start the dashboard
14
+ npx @argus-vrt/web start
35
15
 
36
- # Run database migrations (first time only)
37
- docker compose -f docker-compose.prod.yml exec web npx drizzle-kit push
16
+ # Open http://localhost:3000
38
17
  ```
39
18
 
40
- The dashboard will be available at `http://localhost:3000`.
19
+ The `init` wizard generates a `docker-compose.yml`, `.env`, and optionally `nginx.conf` in an `./argus/` directory.
41
20
 
42
- ### Configuration
21
+ ## Prerequisites
43
22
 
44
- Create a `.env` file to customize settings:
23
+ - [Docker](https://docs.docker.com/get-docker/) installed and running
24
+ - Node.js >= 20 (for running the CLI via npx)
45
25
 
46
- ```bash
47
- PORT=3000
48
- DB_PASSWORD=your-secure-password
26
+ ## Commands
49
27
 
50
- # Path to screenshots directory (for image serving)
51
- SCREENSHOTS_PATH=/path/to/your/screenshots
52
- ```
28
+ ### `npx @argus-vrt/web init`
53
29
 
54
- ### Environment Variables
30
+ Interactive setup wizard. Prompts for:
55
31
 
56
- | Variable | Default | Description |
57
- |----------|---------|-------------|
58
- | `PORT` | `3000` | Server port |
59
- | `DATABASE_URL` | (auto) | PostgreSQL connection string |
60
- | `DB_PASSWORD` | `argus` | Database password |
61
- | `SCREENSHOTS_PATH` | `./screenshots` | Path to mount for image serving |
32
+ - **PostgreSQL** include a container (recommended) or use an external instance
33
+ - **Port** — default 3000
34
+ - **Domain** custom domain or localhost
35
+ - **HTTPS** Let's Encrypt, custom certificate, or none
36
+ - **Reverse proxy** include an Nginx container or manage yourself
37
+ - **Screenshots path** where uploaded screenshots are stored
62
38
 
63
- See [DEPLOYMENT.md](./DEPLOYMENT.md) for full production deployment instructions including Nginx reverse proxy with HTTPS, image serving options, and database backup/restore.
39
+ Generates configuration files into `./argus/` (or `--dir <path>`).
64
40
 
65
- ## Connecting the CLI
41
+ ### `npx @argus-vrt/web start`
66
42
 
67
- Once the dashboard is running, point your CLI at it by adding `apiUrl` to your project's `.argus.json`:
43
+ Start Argus containers (`docker compose up -d`).
68
44
 
69
- ```json
70
- {
71
- "apiUrl": "http://localhost:3000"
72
- }
73
- ```
45
+ ### `npx @argus-vrt/web stop`
74
46
 
75
- Then upload results after running tests:
47
+ Stop Argus containers (`docker compose down`).
48
+
49
+ ### `npx @argus-vrt/web logs`
50
+
51
+ Stream container logs (`docker compose logs -f`).
76
52
 
77
53
  ```bash
78
- npx argus test
54
+ npx @argus-vrt/web logs --service web # only web container
55
+ npx @argus-vrt/web logs --service db # only database
79
56
  ```
80
57
 
81
- ## Tech Stack
82
-
83
- - **Framework**: [TanStack Start](https://tanstack.com/start) with React 19
84
- - **Routing**: [TanStack Router](https://tanstack.com/router) (file-based)
85
- - **Database**: PostgreSQL with [Drizzle ORM](https://orm.drizzle.team/)
86
- - **Styling**: [Tailwind CSS v4](https://tailwindcss.com/) with design tokens
87
- - **Fonts**: Inter (body), Space Grotesk (headings), JetBrains Mono (code)
58
+ ### `npx @argus-vrt/web status`
88
59
 
89
- ---
60
+ Show container status and run a health check on the web dashboard.
90
61
 
91
- ## Development
62
+ ### `npx @argus-vrt/web upgrade`
92
63
 
93
- ### Prerequisites
64
+ Pull the latest Docker images and restart containers.
94
65
 
95
- - Node.js >= 20
96
- - Yarn >= 4
97
- - Docker (for PostgreSQL)
66
+ ```bash
67
+ npx @argus-vrt/web upgrade
68
+ ```
98
69
 
99
- ### Setup
70
+ ## Options
100
71
 
101
- From the repository root:
72
+ All management commands (`start`, `stop`, `logs`, `status`, `upgrade`) accept:
102
73
 
103
- ```bash
104
- # Install all dependencies
105
- yarn install
74
+ | Flag | Description |
75
+ |------|-------------|
76
+ | `-d, --dir <path>` | Path to the Argus directory (default: `./argus`) |
106
77
 
107
- # Start PostgreSQL (from this directory)
108
- cd packages/web
109
- docker compose up -d
78
+ ## Connecting the CLI
110
79
 
111
- # Push database schema
112
- yarn workspace @argus-vrt/web db:push
80
+ Once the dashboard is running, point the testing CLI at it by adding `apiUrl` to your project's `.argus.json`:
113
81
 
114
- # Start dev server at http://localhost:3000
115
- yarn workspace @argus-vrt/web dev
82
+ ```json
83
+ {
84
+ "apiUrl": "http://localhost:3000"
85
+ }
116
86
  ```
117
87
 
118
- Or if you're already in `packages/web`:
88
+ Then upload results after running tests:
119
89
 
120
90
  ```bash
121
- docker compose up -d
122
- yarn db:push
123
- yarn dev
91
+ npx argus test
124
92
  ```
125
93
 
126
- ### Scripts
94
+ ## Environment Variables
95
+
96
+ The generated `.env` file supports:
97
+
98
+ | Variable | Default | Description |
99
+ |----------|---------|-------------|
100
+ | `PORT` | `3000` | Server port |
101
+ | `DATABASE_URL` | (auto) | PostgreSQL connection string (external DB only) |
102
+ | `DB_PASSWORD` | `argus` | Database password (container DB only) |
103
+ | `SCREENSHOTS_PATH` | `./argus-data/images` | Path to screenshots directory |
127
104
 
128
- | Script | Description |
129
- |--------|-------------|
130
- | `yarn dev` | Start development server on port 3000 |
131
- | `yarn build` | Build for production |
132
- | `yarn preview` | Preview production build |
133
- | `yarn test` | Run tests with Vitest |
134
- | `yarn db:generate` | Generate Drizzle migrations |
135
- | `yarn db:push` | Push schema changes to database |
136
- | `yarn db:studio` | Open Drizzle Studio |
105
+ ## Docker Image
137
106
 
138
- ### Project Structure
107
+ The web dashboard is distributed as a Docker image on GitHub Container Registry:
139
108
 
140
109
  ```
141
- src/
142
- ├── components/
143
- │ ├── image/ # Image comparison components
144
- │ ├── story/ # Story list/tree components
145
- │ └── ui/ # Shared UI components
146
- ├── hooks/ # React hooks
147
- ├── lib/ # Utilities
148
- ├── routes/ # File-based routes
149
- │ ├── __root.tsx # Root layout
150
- │ ├── index.tsx # Dashboard home
151
- │ ├── tests/ # Test detail pages
152
- │ └── branches/ # Branch pages
153
- ├── db/ # Database schema
154
- └── styles.css # Global styles & design tokens
110
+ ghcr.io/maxcwolf/argus-web:latest
155
111
  ```
156
112
 
157
113
  ## License