Find a file
aaditagrawal 88f001a328
chore: add anti-slop oxlint plugin (#22)
Vendors the anti-slop Oxlint plugin to tools/oxlint/anti-slop and registers it
in .oxlintrc.json via jsPlugins, with all 15 rules at "error". Adds oxlint and
@oxlint/plugins 1.78.0 as dev dependencies. The vendored copy is excluded from
oxlint, oxfmt and tsc, since it ships its own formatting and uses .ts import
specifiers that only Oxlint's loader resolves.

Fixes all 56 violations the rules reported, without suppressions:

Menu payloads are now parsed at their boundary instead of being spot-checked
downstream. isValidWeekMenu became parseWeekMenu, which decodes a JsonValue
into a WeekMenu and, in doing so, upgrades legacy V1 string items to the V2
{ name, tags } shape. That removes the MenuItem | string union from the filter
helpers, MealCard and ComprehensiveWeekView, and lets the two server-side
`JSON.parse(raw) as WeekMenu` casts become real parses. Verified against all 45
bundled week files: every week parses, with no meal or item dropped.

DayMenu.meals is now Partial<Record<MealKey, Meal>>, which is what the data and
every reader already assumed, and MealKey is derived from a new exported
MEAL_KEYS constant so the filter and parser iterate one typed list rather than
casting Object.entries keys.

Also: environment checks use presence detection (`"window" in globalThis`)
rather than typeof; the wrapped stats import decodes its fun-fact kind instead
of casting through unknown; sonner narrows the theme string; InlineSelect uses
an instanceof Node check; and the four casts that genuinely remain — the
persisted query cache, the build-generated manifest, and CSS custom properties
— now carry SAFETY comments stating the invariant.

Lint, format:check, typecheck and build all pass.
2026-08-18 09:27:30 +05:30
.github/workflows chore: add CI workflow and tighten oxlint rules 2026-08-09 12:27:49 +05:30
archive/2025-wrapped chore: bump deps and add oxfmt 2026-08-09 11:52:17 +05:30
public chore: bump deps and add oxfmt 2026-08-09 11:52:17 +05:30
scripts chore: bump deps and add oxfmt 2026-08-09 11:52:17 +05:30
src chore: add anti-slop oxlint plugin (#22) 2026-08-18 09:27:30 +05:30
tools/oxlint/anti-slop chore: add anti-slop oxlint plugin (#22) 2026-08-18 09:27:30 +05:30
.gitignore chore: remove accidental pnpm-lock.yaml 2026-08-09 12:28:20 +05:30
.oxlintrc.json chore: add anti-slop oxlint plugin (#22) 2026-08-18 09:27:30 +05:30
api-1.json feat: Achieved Client Side API calls, updated with CORS support, fixed day modal, minor UI changes. 2025-12-25 12:03:06 +05:30
bun.lock chore: add anti-slop oxlint plugin (#22) 2026-08-18 09:27:30 +05:30
components.json new fix 2025-08-19 03:17:26 +05:30
CONTRIBUTING.md chore(ts): build on TypeScript 7 (#17) 2026-07-25 23:28:33 +05:30
LICENSE added the MIT license 2025-08-25 09:20:10 +05:30
next.config.ts chore: bump deps and add oxfmt 2026-08-09 11:52:17 +05:30
openapi.json Moved to an API driven version due to the TIK integration 2025-08-25 03:20:42 +05:30
package.json chore: add anti-slop oxlint plugin (#22) 2026-08-18 09:27:30 +05:30
portless.json :octocat: portless support 2026-05-08 10:18:09 +05:30
postcss.config.mjs Initial commit from Create Next App 2025-08-19 02:50:21 +05:30
README.md Build static menu bundle for public app 2026-06-01 02:42:30 +05:30
tsconfig.json chore: add anti-slop oxlint plugin (#22) 2026-08-18 09:27:30 +05:30
vercel.json fix(perf): apply menu-data cache headers on Vercel, not just Cloudflare (#15) 2026-07-25 18:55:22 +05:30
wrangler.jsonc Update wrangler config name to fc-menu (#4) 2026-03-16 11:35:18 +05:30

Food Court Menus

Fast, friendly viewer for weekly mess/food-court menus with time-aware highlighting in Indian Standard Time (IST). The app now integrates with the Food Court API to automatically fetch and display the latest menu data.

Contributions, Please

The app now uses an external API for data, so contributions focus on code improvements, UI enhancements, and feature development. Data is managed through the Food Court API at https://tikm.coolstuff.work/docs/reference.

Highlights

  • Time-aware: detects current/upcoming meal using device time converted to IST and auto-focuses it
  • Minimal “playing card” UI with tasteful icons for Breakfast/Lunch/Snacks/Dinner
  • Horizontal carousel: highlights the primary meal, dims the rest, auto-scrolls to the current one
  • Inline navigation: click Year / Week / Day in-place to switch context
  • Fully responsive for mobile, tablets, and laptops

Tech

  • Next.js (App Router), TypeScript
  • Tailwind CSS v4
  • shadcn-inspired components (Cards)
  • lucide-react icons

Getting Started

Prereqs: Node 18+ and Bun.

Development server:

bun run dev

Visit http://localhost:3000.

Production build & start:

bun run build
bun run start

Lint:

bun run lint

Static menu bundle configuration:

MENU_API_URL=https://tikm.coolstuff.work

bun run build fetches menu history from MENU_API_URL, writes a static bundle into public/data/menu-bundle, and then exports the site. The client reads that bundle and chooses the current week using IST dates, so future menus can be deployed early without becoming current early.


Project Structure

  • src/app/ — pages (home, weeks, per-week page) and API routes for week discovery
  • src/components/ — UI components (cards, carousel, inline selectors)
  • src/data/weeks/ — API client functions for fetching menu data
  • src/lib/ — types and IST/time utilities

Future Work (Scope)

  • Adding support for other messes
  • User-defined local input for their own mess with a client-side OCR pipeline

Deployment

Any Node-compatible host will work. Build with bun run build and serve with bun run start.