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.

The /api/contributors endpoint returns the full list of everyone who contributed to HNU-TimeLetter — community members, writers, developers, designers, and more. The data is synced from the Feishu 参与贡献名单 table and written to src/data/contributors.json. At runtime the endpoint reads that file directly, so the credits list updates the moment a sync completes, with no build step or server restart required. On the site, this data populates the Credits scrolling panel section on the home page.

Endpoint

GET /api/contributors
Authentication: None — this is a fully public endpoint. Query parameters: None.

Response — 200 OK

Returns a JSON object with a single top-level key, contributors, containing an array of Contributor objects.
{
  "contributors": [
    {
      "id": "rec_u001",
      "name": "张三",
      "role": "程序开发",
      "message": "感谢这个项目的每一位参与者,愿我们的海大时光常驻心间。"
    },
    {
      "id": "rec_u002",
      "name": "李四",
      "role": "视觉设计",
      "message": "设计这些场景时,总会想起在海大的每一个傍晚。"
    },
    {
      "id": "rec_u003",
      "name": "王五",
      "role": "故事撰写"
    },
    {
      "id": "rec_u004",
      "name": "赵六"
    }
  ]
}

Response schema

contributors
Contributor[]
required
Ordered list of project contributors. The order matches the row order of the Feishu 参与贡献名单 table as it was at the time of the last sync.

TypeScript example

interface Contributor {
  id: string;
  name: string;
  role?: string;
  message?: string;
}

interface ContributorsResponse {
  contributors: Contributor[];
}

async function fetchContributors(): Promise<ContributorsResponse> {
  const res = await fetch("/api/contributors");
  if (!res.ok) {
    throw new Error(`Failed to fetch contributors: ${res.status}`);
  }
  return res.json() as Promise<ContributorsResponse>;
}

// Usage — render the credits list
const { contributors } = await fetchContributors();

for (const person of contributors) {
  const roleLabel = person.role ? ` (${person.role})` : "";
  console.log(`${person.name}${roleLabel}`);
  if (person.message) {
    console.log(`  "${person.message}"`);
  }
}

Usage on the home page

The contributors list is consumed by the Credits section that appears as part of the home page’s scrolling narrative panels. The component reads from this endpoint on page load and renders each contributor as a styled card, optionally displaying the role badge and message quote beneath the contributor’s name.
The role and message fields are intentionally optional. Contributors who did not fill in those fields in the Feishu table will still appear in the credits — only their name is required. Frontend rendering should guard against undefined for both fields.

Data source

The endpoint reads src/data/contributors.json at request time. This file is written by the Feishu sync pipeline when the contributors table key is included in a sync job.
Sync table keyFeishu source tableOutput file
contributors参与贡献名单src/data/contributors.json
To refresh the credits list, run npm run sync locally or trigger a sync job from the admin dashboard that includes the contributors table. The endpoint will serve the updated data immediately on the next request — no build or server restart is required.
When adding a new batch of contributors in Feishu, trigger a manual sync from the admin dashboard (POST /api/admin/sync/jobs with "tables": ["contributors"]) rather than a full sync to minimise Feishu API quota usage. The contributors table has no declared dependencies on other tables, so it can be synced independently.

Build docs developers (and LLMs) love