Research Hub is a Next.js 16 + Supabase application for publishing and browsing research resources. The current product centers on resource cards, author pages, comments, and bookmarks.
Install dependencies and start the app:
npm ci
npm run devOpen http://localhost:3000.
Create a local .env.local with:
NEXT_PUBLIC_SUPABASE_URL=
SUPABASE_SERVICE_ROLE_KEY=
AUTH_GITHUB_ID=
AUTH_GITHUB_SECRET=
NEXTAUTH_URL=http://localhost:3000
AUTH_SECRET=Apply supabase-schema.sql in the Supabase SQL editor before testing the resource-center APIs.
Run the same checks used by CI:
npm test -- src/lib/resource-form.test.ts src/lib/resource-queries.test.ts
npm run lint
npm run buildAll code, schema, configuration, and documentation changes should go through Pull Requests. Read CONTRIBUTING.md before opening a PR.
Production deployment now targets Vercel. The repository keeps a lightweight GitHub Actions CI workflow for tests, lint, and build checks only.
- CI workflow:
.github/workflows/ci.yml - Deployment runbook:
docs/vercel-deployment.md
Configure these in the Vercel project for Production, Preview, and Development:
NEXT_PUBLIC_SUPABASE_URLSUPABASE_SERVICE_ROLE_KEYAUTH_GITHUB_IDAUTH_GITHUB_SECRETAUTH_SECRETNEXTAUTH_URL
For production, set NEXTAUTH_URL to the primary domain you choose on Vercel. The runbook uses https://www.yuuri.cn as the primary domain and redirects https://yuuri.cn to it.
- Push this repository to GitHub.
- Import the GitHub repository into Vercel as a Next.js project.
- Add the environment variables above in Vercel Project Settings.
- Update the GitHub OAuth App:
- Homepage URL:
https://www.yuuri.cn - Authorization callback URL:
https://www.yuuri.cn/api/auth/callback/github
- Homepage URL:
- Add both
yuuri.cnandwww.yuuri.cnin Vercel Project Settings -> Domains. - Keep
www.yuuri.cnas the primary domain and redirectyuuri.cnto it. - Configure the DNS records at your domain provider with the exact values shown by Vercel.
After the repository is connected, each push to the production branch selected in Vercel triggers a new deployment automatically.