Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/HNU-himematsu/HNU-TimeLetter/llms.txt

Use this file to discover all available pages before exploring further.

HNU-TimeLetter supports two deployment models. Vercel is the simplest path for preview branches and visual review; it uses the JSON artifacts committed to the repo as build-time data. Self-hosted with PM2 is required for production use because node-schedule (the sync scheduler) needs a persistent process — serverless runtimes restart between invocations and cannot maintain scheduled jobs.

Vercel Deployment

Vercel is ideal for preview deployments on feature branches. The build process syncs Feishu data at build time, so the deployed site always contains the data available at the moment of the build.
1

Connect the GitHub repository

Import the repository in the Vercel dashboard. Vercel auto-detects Next.js and sets the correct framework preset.
2

Set environment variables

In Settings → Environment Variables, add every variable from .env.example. At minimum you need:
FEISHU_APP_ID
FEISHU_APP_SECRET
FEISHU_APP_TOKEN
FEISHU_TABLE_ID
FEISHU_VIEW_ID
ALIYUN_OSS_REGION
ALIYUN_OSS_BUCKET
ALIYUN_OSS_ACCESS_KEY_ID
ALIYUN_OSS_ACCESS_KEY_SECRET
ADMIN_PASSWORD
ADMIN_SESSION_SECRET
ADMIN_SESSION_SECRET must be at least 32 random bytes in production. Generate one with: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))".
3

Configure the build command

Set the Build Command to:
npm run build:with-sync
This runs npm run sync (pulls Feishu data) followed by npm run build. The JSON artifacts are embedded into the build output.Alternatively, use the default npm run build if you want to rely on the JSON files already committed to the repo as fallback data.
4

Deploy

Push to any branch. Vercel builds and deploys automatically. The live URL is shown in the deployment dashboard.

Vercel Limitations

The node-schedule scheduler does not persist between Vercel serverless function invocations. Scheduled syncs will not fire on Vercel. Use the sync webhook with an external cron service (e.g. GitHub Actions scheduled workflow, cron-job.org) to trigger syncs on a schedule instead.

Build Verification Commands

Before every production deployment, run these checks:
npm run lint          # ESLint
npm run typecheck     # tsc --noEmit
npm audit --omit=dev  # Security audit (production deps only)
npm run build         # Full Next.js production build

Build docs developers (and LLMs) love