Skip to content

Commit 1356188

Browse files
committed
Initial Commit
1 parent 7384078 commit 1356188

12 files changed

Lines changed: 335 additions & 110 deletions

File tree

README.md

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,51 @@
1-
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
1+
## Percy Build Report Generator
22

3-
## Getting Started
3+
This tool fetches snapshots from a specific **Percy** build via the BrowserStack/Percy API, calculates visual and AI diff percentages, and provides a downloadable CSV report.
44

5-
First, run the development server:
5+
---
66

7-
```bash
8-
npm run dev
9-
# or
10-
yarn dev
11-
# or
12-
pnpm dev
13-
# or
14-
bun dev
15-
```
7+
### 🚀 Getting Started
168

17-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
9+
1. **Clone the repository** and install dependencies:
10+
```bash
11+
npm install
12+
```
13+
2. **Get your Token:**
14+
* Log into Percy.io.
15+
* Go to **Project Settings**.
16+
* Copy the **Read-only Token**.
17+
3. **Run the App:**
18+
```bash
19+
npm run dev
20+
```
1821

19-
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
22+
---
2023

21-
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
24+
### 🛠 How to Use
2225

23-
## Learn More
26+
1. **Enter Token:** Paste your Percy Read-only token into the first input field.
27+
2. **Enter Build URL:** Paste the full URL of the build you want to analyze (e.g., `https://percy.io/org/project/builds/1234567`).
28+
3. **Generate Report:** Click **"Get Report"**. The app will:
29+
* Identify the project slug and organization.
30+
* Fetch all snapshots (handling pagination automatically).
31+
* Calculate diff ratios as percentages.
32+
4. **Export:** Use the **"Download CSV"** button to save the results for stakeholder reporting.
2433

25-
To learn more about Next.js, take a look at the following resources:
34+
---
2635

27-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
36+
### 📊 Data Points Captured
2937

30-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
38+
| Column | Description |
39+
| :--- | :--- |
40+
| **Snapshot Name** | The name defined in your test suite. |
41+
| **Visual Diff %** | The percentage of pixels changed across all viewports. |
42+
| **Percy URL** | A direct deep-link to the `/changed/` view for that snapshot. |
3143

32-
## Deploy on Vercel
44+
---
3345

34-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
46+
### 📁 Tech Stack
3547

36-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
48+
* **Framework:** [Next.js](https://nextjs.org/) (App Router)
49+
* **Styling:** [Tailwind CSS](https://tailwindcss.com/) + [DaisyUI](https://daisyui.com/)
50+
* **Notifications:** [React-Toastify](https://fkhadra.github.io/react-toastify/)
51+
* **API:** [Percy JSON:API v1](https://www.browserstack.com/docs/percy/api-reference)

next.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import type { NextConfig } from "next";
22

33
const nextConfig: NextConfig = {
44
/* config options here */
5+
output:"export",
6+
basePath:'/percy-build-diff-summary'
57
};
68

79
export default nextConfig;

package-lock.json

Lines changed: 35 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@
1010
"dependencies": {
1111
"next": "16.2.1",
1212
"react": "19.2.4",
13-
"react-dom": "19.2.4"
13+
"react-dom": "19.2.4",
14+
"react-toastify": "^11.0.5"
1415
},
1516
"devDependencies": {
1617
"@tailwindcss/postcss": "^4",
1718
"@types/node": "^20",
1819
"@types/react": "^19",
1920
"@types/react-dom": "^19",
21+
"daisyui": "^5.5.19",
2022
"tailwindcss": "^4",
2123
"typescript": "^5"
2224
}

public/favicon.ico

5.3 KB
Binary file not shown.

public/favicon.svg

Lines changed: 8 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)