Skip to content

feat: add Vercel deployment dashboard widget plugin#49

Open
srjaykikani wants to merge 6 commits intojhb-software:mainfrom
srjaykikani:feat/vercel-dashboard-widget
Open

feat: add Vercel deployment dashboard widget plugin#49
srjaykikani wants to merge 6 commits intojhb-software:mainfrom
srjaykikani:feat/vercel-dashboard-widget

Conversation

@srjaykikani
Copy link
Copy Markdown
Contributor

Summary

  • Add new Payload CMS plugin @jhb.software/payload-vercel-dashboard-widget for monitoring Vercel deployments
  • Dashboard widget showing current production deployment status with color-coded pills
  • One-click deployment trigger button
  • Multi-language support (English and German)
  • Configurable widget min/max width
  • Graceful error handling with user-friendly messages

Features

  • Active Deployment: Shows the last ready deployment with timestamp and status
  • Latest Deployment: Shows in-progress builds when different from active
  • Trigger Deploy: Button to trigger new production deployments
  • Status Pills: Color-coded status (Ready=green, Building=yellow, Error=red)

Configuration

vercelDashboardPlugin({
  vercel: {
    apiToken: process.env.VERCEL_API_TOKEN!,
    projectId: process.env.VERCEL_PROJECT_ID!,
    teamId: process.env.VERCEL_TEAM_ID, // Optional
  },
  widget: {
    minWidth: 'medium',
    maxWidth: 'full',
  },
})

Test plan

  • Widget displays deployment info correctly
  • Error states handled gracefully
  • Trigger deployment button works
  • Multi-language translations work
  • Build passes with no errors
  • Lint passes with no warnings

Closes jhb-dev/jay-jens-payload#55

@srjaykikani srjaykikani changed the title feat(vercel-dashboard-widget): add Vercel deployment dashboard widget plugin feat: add Vercel deployment dashboard widget plugin Dec 28, 2025
… plugin

Add new Payload CMS plugin that provides a dashboard widget for monitoring
Vercel deployments. Features include:

- Dashboard widget showing current production deployment status
- One-click deployment trigger button
- Real-time status display with color-coded pills (Ready, Building, Error, etc.)
- Multi-language support (English and German)
- Configurable widget min/max width
- Graceful error handling with user-friendly messages

The widget integrates with Payload's modular dashboard system (3.69+) and
uses Vercel's API to fetch deployment information.

Tested manually with a local development environment.

Closes jhb-dev/jay-jens-payload#55
@srjaykikani srjaykikani force-pushed the feat/vercel-dashboard-widget branch from 503ea0a to 77d15bf Compare December 28, 2025 21:22
@jhb-dev
Copy link
Copy Markdown
Contributor

jhb-dev commented Jan 3, 2026

Thanks @srjaykikani. Looks good so far. I made some minor adjustments.

I am currently experimenting with a better way to trigger the frontend deployments. Once I am done with that, I will commit it to this PR and merge it.

@srjaykikani
Copy link
Copy Markdown
Contributor Author

Thanks You!

Copy link
Copy Markdown
Contributor

@jhb-dev jhb-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please upgrade this to the latest Payload version (but not Next.js 16.2 yet) and addres the comment about the redeploy logic.

name: projectDetails.name,
gitSource: projectDetails.gitSource,
meta: {
// Override to show the deployment was triggered by the CMS in the Vercel dashboard
Copy link
Copy Markdown
Contributor

@jhb-dev jhb-dev Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to change the redeploy logic to do the following:

  • fetch the deployment ID of the latest production deployment
  • redeploy it

e.g.:

    // Find the latest READY production deployment to redeploy
    const { deployments } = await vercel.getDeployments({
      projectId,
      teamId,
      target: 'production',
      state: 'READY',
      limit: 1,
    })

    const latestDeployment = deployments.at(0)
    if (!latestDeployment) {
      return Response.json({ error: 'No READY production deployment found to redeploy' }, { status: 404 })
    }

    const deployment = await vercel.redeploy({
      deploymentId: latestDeployment.uid,
      name: projectId,
      target: 'production',
      teamId,
    })

@srjaykikani srjaykikani force-pushed the feat/vercel-dashboard-widget branch from 9e42882 to 8be64ea Compare March 22, 2026 11:22
@srjaykikani
Copy link
Copy Markdown
Contributor Author

srjaykikani commented Mar 22, 2026

Addressed the requested changes:

  • upgraded the widget package and dev app to the latest compatible Payload version (3.80.0) while keeping Next.js on the supported 15.x line (15.4.11)
  • changed the redeploy flow to fetch the latest READY production deployment and redeploy that deployment instead of creating a new deployment from project metadata
  • refreshed the dashboard status flow so the widget reads live deployment state correctly after redeploys

@srjaykikani srjaykikani force-pushed the feat/vercel-dashboard-widget branch from c3c910d to 8be64ea Compare March 22, 2026 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants