Setup & Deploy Guide

This page documents end-to-end setup for local development and Vercel production deployment.

Guide Steps
7
Main Branch
main
Target Domain
bkm4-jira-work-log-tracking.vercel.app
Auth Mode
Public (off)
1

Local Setup

  1. Use Node.js 22.x (same as Vercel runtime setting).
  2. Install dependencies.
  3. Create .env with Jira + Chat credentials.
  4. Run app and open http://localhost:3000.
pnpm install
pnpm run build
pnpm run start:dev
2

Required Environment Variables

  • TEAM_NAME - Jira project key used in report logic.
  • JIRA_DOMAIN - Jira base domain.
  • JIRA_EMAIL - Jira account email.
  • JIRA_API_TOKEN - Jira API token.
  • WEBHOOK - Google Chat incoming webhook URL (when GOOGLE_CHAT_MODE=webhook).

Optional but recommended: CRON_SECRET, REPORT_TIMEZONE, APP_BASE_URL.

3

Deploy To Vercel

  1. Push code to branch main.
  2. Deploy production from that branch.
  3. Attach production alias/domain.
git checkout main
git pull --ff-only origin main
npx -y vercel deploy --prod --yes
npx -y vercel alias set <deployment-url> bkm4-jira-work-log-tracking.vercel.app
Recommended: keep production domain as bkm4-jira-work-log-tracking.vercel.app.
4

Set Environment Variables On Vercel

  1. Project - Settings - Environment Variables.
  2. Add variables for Production scope.
  3. Redeploy after changes.
npx -y vercel env add CRON_SECRET production
        npx -y vercel env add TEAM_NAME production
npx -y vercel env add JIRA_DOMAIN production
npx -y vercel env add JIRA_EMAIL production
npx -y vercel env add JIRA_API_TOKEN production
npx -y vercel env add WEBHOOK production
5

Set Main Deploy Branch To main

  1. Go to GitHub repo settings.
  2. Open Settings - Branches.
  3. Change Default branch to main.

Vercel production follows your repository default branch when Production Branch selector is not available in project settings.

6

Turn Off Vercel Authentication (Make Site Public)

If you see this message: Visitors must be logged in to Vercel and a member of your team to view your deployments, disable deployment protection:

  1. Open Vercel Project - Settings - Deployment Protection.
  2. Find Vercel Authentication.
  3. Disable protection for Production (and Preview if needed).
  4. Save settings and redeploy.
Warning: turning this off makes deployments publicly accessible. Do not expose secret values in any HTML/API response.
7

Verify Production

  1. Open /api/health and confirm ok: true.
  2. Trigger /api/reports/run using x-cron-secret or ?token=.
  3. Check Google Chat receives report + action buttons.
curl -X POST "https://bkm4-jira-work-log-tracking.vercel.app/api/reports/run?token=YOUR_CRON_SECRET"

Quick Deployment Checklist

Item Status Where
Branch for production is main Required GitHub - Settings - Branches
Production domain alias attached Required Vercel - Domains / Alias
All production ENV variables set Required Vercel - Environment Variables
Vercel Authentication disabled (if public site expected) Optional Vercel - Deployment Protection