@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.
- package/README.md +65 -109
- package/dist-cli/index.js +482 -0
- package/package.json +26 -14
- package/.cta.json +0 -15
- package/DEPLOYMENT.md +0 -154
- package/Dockerfile +0 -51
- package/docker-compose.prod.yml +0 -38
- package/docker-compose.yml +0 -15
- package/drizzle/0000_slim_makkari.sql +0 -61
- package/drizzle/meta/0000_snapshot.json +0 -452
- package/drizzle/meta/_journal.json +0 -13
- package/drizzle.config.ts +0 -10
- package/public/favicon.ico +0 -0
- package/public/logo-argus.svg +0 -8
- package/public/logo-variants/logo-argus-a.svg +0 -9
- package/public/logo-variants/logo-argus-modern.svg +0 -11
- package/public/logo-variants/logo-argus-peacock.svg +0 -8
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +0 -25
- package/public/robots.txt +0 -3
- package/public/tanstack-circle-logo.png +0 -0
- package/public/tanstack-word-logo-white.svg +0 -1
- package/scripts/backfill-kind.ts +0 -148
- package/src/api-plugin.ts +0 -169
- package/src/components/image/ImageCompare.tsx +0 -188
- package/src/components/story/StoryFlatList.tsx +0 -67
- package/src/components/story/StoryGroupedTree.tsx +0 -273
- package/src/components/story/StoryTree.tsx +0 -185
- package/src/components/ui/Drawer.tsx +0 -110
- package/src/components/ui/SearchInput.tsx +0 -95
- package/src/components/ui/StatusBadge.tsx +0 -59
- package/src/components/ui/ViewModeToggle.tsx +0 -39
- package/src/db/index.ts +0 -27
- package/src/db/schema.ts +0 -151
- package/src/hooks/useDebounce.ts +0 -23
- package/src/hooks/useStoryTree.ts +0 -205
- package/src/lib/utils.ts +0 -55
- package/src/logo.svg +0 -12
- package/src/routeTree.gen.ts +0 -177
- package/src/router.tsx +0 -17
- package/src/routes/__root.tsx +0 -174
- package/src/routes/branches/$name.tsx +0 -171
- package/src/routes/branches/index.tsx +0 -104
- package/src/routes/index.tsx +0 -178
- package/src/routes/tests/$id.tsx +0 -417
- package/src/routes/tests/index.tsx +0 -128
- package/src/routes/upload.tsx +0 -108
- package/src/styles.css +0 -213
- package/tsconfig.json +0 -28
- package/vite.config.ts +0 -30
package/README.md
CHANGED
|
@@ -1,157 +1,113 @@
|
|
|
1
1
|
# @argus-vrt/web
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**CLI tool for deploying and managing the Argus web dashboard.**
|
|
4
4
|
|
|
5
|
-
|
|
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
|
-
##
|
|
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
|
-
#
|
|
30
|
-
|
|
31
|
-
cd argus/packages/web
|
|
10
|
+
# Run the interactive setup wizard
|
|
11
|
+
npx @argus-vrt/web init
|
|
32
12
|
|
|
33
|
-
# Start the dashboard
|
|
34
|
-
|
|
13
|
+
# Start the dashboard
|
|
14
|
+
npx @argus-vrt/web start
|
|
35
15
|
|
|
36
|
-
#
|
|
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
|
|
19
|
+
The `init` wizard generates a `docker-compose.yml`, `.env`, and optionally `nginx.conf` in an `./argus/` directory.
|
|
41
20
|
|
|
42
|
-
|
|
21
|
+
## Prerequisites
|
|
43
22
|
|
|
44
|
-
|
|
23
|
+
- [Docker](https://docs.docker.com/get-docker/) installed and running
|
|
24
|
+
- Node.js >= 20 (for running the CLI via npx)
|
|
45
25
|
|
|
46
|
-
|
|
47
|
-
PORT=3000
|
|
48
|
-
DB_PASSWORD=your-secure-password
|
|
26
|
+
## Commands
|
|
49
27
|
|
|
50
|
-
|
|
51
|
-
SCREENSHOTS_PATH=/path/to/your/screenshots
|
|
52
|
-
```
|
|
28
|
+
### `npx @argus-vrt/web init`
|
|
53
29
|
|
|
54
|
-
|
|
30
|
+
Interactive setup wizard. Prompts for:
|
|
55
31
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
-
|
|
39
|
+
Generates configuration files into `./argus/` (or `--dir <path>`).
|
|
64
40
|
|
|
65
|
-
|
|
41
|
+
### `npx @argus-vrt/web start`
|
|
66
42
|
|
|
67
|
-
|
|
43
|
+
Start Argus containers (`docker compose up -d`).
|
|
68
44
|
|
|
69
|
-
|
|
70
|
-
{
|
|
71
|
-
"apiUrl": "http://localhost:3000"
|
|
72
|
-
}
|
|
73
|
-
```
|
|
45
|
+
### `npx @argus-vrt/web stop`
|
|
74
46
|
|
|
75
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
62
|
+
### `npx @argus-vrt/web upgrade`
|
|
92
63
|
|
|
93
|
-
|
|
64
|
+
Pull the latest Docker images and restart containers.
|
|
94
65
|
|
|
95
|
-
|
|
96
|
-
-
|
|
97
|
-
|
|
66
|
+
```bash
|
|
67
|
+
npx @argus-vrt/web upgrade
|
|
68
|
+
```
|
|
98
69
|
|
|
99
|
-
|
|
70
|
+
## Options
|
|
100
71
|
|
|
101
|
-
|
|
72
|
+
All management commands (`start`, `stop`, `logs`, `status`, `upgrade`) accept:
|
|
102
73
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
74
|
+
| Flag | Description |
|
|
75
|
+
|------|-------------|
|
|
76
|
+
| `-d, --dir <path>` | Path to the Argus directory (default: `./argus`) |
|
|
106
77
|
|
|
107
|
-
|
|
108
|
-
cd packages/web
|
|
109
|
-
docker compose up -d
|
|
78
|
+
## Connecting the CLI
|
|
110
79
|
|
|
111
|
-
|
|
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
|
-
|
|
115
|
-
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"apiUrl": "http://localhost:3000"
|
|
85
|
+
}
|
|
116
86
|
```
|
|
117
87
|
|
|
118
|
-
|
|
88
|
+
Then upload results after running tests:
|
|
119
89
|
|
|
120
90
|
```bash
|
|
121
|
-
|
|
122
|
-
yarn db:push
|
|
123
|
-
yarn dev
|
|
91
|
+
npx argus test
|
|
124
92
|
```
|
|
125
93
|
|
|
126
|
-
|
|
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
|
-
|
|
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
|
-
|
|
107
|
+
The web dashboard is distributed as a Docker image on GitHub Container Registry:
|
|
139
108
|
|
|
140
109
|
```
|
|
141
|
-
|
|
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
|