A GolfScript-only short-coding judge. Solutions are ranked by exact UTF-8 byte size — fewest bytes wins.
Site: https://golfscript.xyz
한국어로 읽기: README.ko.md
- Next.js (App Router, TypeScript)
- Tailwind CSS — Gemini-style deep-sea dark UI with aurora neon accents
- Supabase (PostgreSQL) — data + Row Level Security
- Piston public API — GolfScript code execution
app/ # routes, pages, route handlers, metadata, OG images
components/ # shared UI components
lib/ # domain logic, integrations, utilities
scripts/ # seed/verification/build helpers
sql/ # Supabase schema and seed SQL
-
Install dependencies
npm install
-
Configure Supabase
Copy the env template and fill in your project values:
cp .env.example .env.local
Variable Where Notes NEXT_PUBLIC_SUPABASE_URLclient + server Project URL NEXT_PUBLIC_SUPABASE_ANON_KEYclient Anon public key SUPABASE_SERVICE_ROLE_KEYserver only Bypasses RLS to read hidden test cases. Never expose this. PISTON_API_URLserver Defaults to https://emkc.org/api/v2/execute -
Create the schema
In the Supabase SQL Editor, run
sql/schema.sql. It creates the four tables, theleaderboardview, RLS policies, and seed data (3 problems with sample + hidden cases). -
Run
npm run dev
test_caseshas no SELECT RLS policy, so the anon client can never read it.- The submit API uses the service role client (
lib/supabaseAdmin.ts) server-side only to fetch every test case, including hidden ones. - The API response exposes only
{ index, hidden, verdict }per case — hidden stdin/stdout are never sent to the browser.
- Compute exact UTF-8 byte size of the raw code.
- Resolve/create the user, verify the problem.
- Fetch all test cases (server-only).
- Run each case in parallel on Piston.
- Compare trimmed stdout →
AC/WA; map signals/exit codes →TLE/RE/CE. - Aggregate the final verdict, insert into
submissions, return the result.