Skip to content
项目

kpi-ua/schedule.kpi.ua

在 GitHub 查看

关于

Igor Sikorsky Kyiv Polytechnic Institute Schedule UI

学习与教育

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
+1
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

schedule.kpi.ua

PRs Welcome Docker Image Version (latest by date)

A responsive, maintainable, scalable, and fast UI with a modern design for the students of Igor Sikorsky Kyiv Polytechnic Institute.

Built with Next.js (App Router). The server renders pages and fetches the Campus API directly, server-side only — this app does not expose a public REST API. The handful of client-side data needs (lecturer profile link, group last-sync date) are served by Next.js Server Actions, not HTTP endpoints.

Environment variables

Copy .env.example to .env.local for local development. These are server-only and are never exposed to the browser:

  • CAMPUS_API_URL — base URL of the Campus API (defaults to https://api.campus.kpi.ua).
  • CAMPUS_API_KEY — API key sent as the X-Api-Key header to Campus.
  • KPI_ID_CLIENT_ID / KPI_ID_CLIENT_SECRET — reserved for future KPI ID (SSO) integration, not used yet.

Campus API access

There is no public REST API — src/lib/campusApi/ is the only code allowed to call the real Campus API and is never imported by a Client Component. Campus responses are cached in-process per endpoint+params for 30 minutes; on a Campus API error or timeout the last known-good copy is served regardless of age (and logged as stale) instead of failing the request.

GET /healthz remains the only HTTP endpoint this app exposes, for infra liveness checks.

Run and Develop

Run in the development mode

pnpm dev

Open http://localhost:3000 to view it in the browser.

Make a production build

pnpm build
pnpm start

Build Docker container

docker build ./ --file ./Dockerfile --tag kpiua/schedule.kpi.ua:latest

Run latest Docker container

The app listens on port 3000 inside the container (no nginx — the Next.js standalone server serves everything).

docker run --rm -it -p 3000:3000 \
  -e CAMPUS_API_URL=https://api.campus.kpi.ua \
  -e CAMPUS_API_KEY=changeme \
  kpiua/schedule.kpi.ua

探索相关项目

加载中…