A. KAAN ERKUL WORKING NOTES
← Back to selected works

Next.js / Supabase: Prototype

OfficeQueue

Constraint-aware visitor scheduling for executive offices.

Project type

Independent working prototype

Role

Product concept, workflow analysis, scheduling logic, interface design, development

Primary users

Visitors, executive assistants, office administrators

Development status

Working prototype; not in production

Core technologies

Next.js, TypeScript, Supabase, PostgreSQL, Server Actions, Supabase Realtime, Vercel

01

Overview

OfficeQueue is a scheduling application for executive offices, where appointment planning depends on more than calendar availability. Visitors submit a request through a public form; the system evaluates organisational and temporal constraints, finds the first feasible slot within a 14-day horizon, and places the request automatically.

A password-protected management panel gives a live view of the daily and weekly schedule, travel windows, and protected time blocks. Supabase Realtime keeps multiple screens synchronised without a page refresh.

02

The problem

Executive-office schedules are often run through calls, messages, handwritten notes, and manually maintained calendars. "Find an available time" sounds simple, but availability is actually shaped by working hours, prayer-time blocks, travel windows, existing meetings, priority levels, deadlines, and minimum intervals between meetings, arriving from multiple channels at once. Manual scheduling creates overlapping meetings, missed constraints, inconsistent prioritisation, and schedule drift between devices.

03

Design challenge

How can informal executive-office rules and shifting constraints be translated into an automatic scheduling system without removing the assistant's discretion?

A fully manual system preserves flexibility but creates constant coordination work. A fully rigid automatic system risks ignoring exceptions or last-minute executive decisions. OfficeQueue combines automatic slot allocation and explicit constraints with real-time visibility and manual override. The goal is to reduce routine scheduling work, not to remove human judgement from exceptional cases.

04

Core workflow

Visitor submits request ↓ Request data validated ↓ Duration, priority and deadline interpreted ↓ Candidate working days generated ↓ Prayer, travel and occupied periods removed ↓ Minimum buffers applied ↓ Earliest feasible slot selected ↓ Appointment stored in PostgreSQL ↓ Management screens updated in real time

05

Key capabilities

Constraint-aware scheduling engine

A single allocation process combines working-calendar rules, office hours, prayer-time blocks, travel periods, existing meetings, minimum buffers, duration, deadline, and priority, kept as a separate, independently testable module from the interface.

Prayer-time and travel integration

Prayer-time blocks come from the Aladhan API using the Diyanet calculation method, cached to reduce repeated requests, with an astronomical-calculation fallback if the service is unavailable. Travel periods are defined by explicit departure/return times and excluded automatically. They are treated as a constraint on the whole system, not a note on a calendar.

Visual scheduling rail and real-time sync

The management panel shows appointments, prayer times, travel periods, and open capacity on one visual timeline. Supabase Realtime pushes changes to every connected screen immediately, so different devices don't act on outdated information.

Manual intervention, by design

The assistant can create, edit, move, or remove appointments manually at any point. This is a deliberate decision, since not every scheduling exception should be encoded as a permanent rule.

06

Architecture

Next.js application | |-- Public visitor form (/kayit) |-- Password-protected management panel (/yonetim) |-- Daily / weekly scheduling rail | |-- Server Actions | |-- Request validation | `-- Appointment create / update / delete | |-- Scheduling engine | |-- Working-day, office-hour, prayer, travel rules | |-- Conflict, priority, deadline, buffer logic | `-- 14-day slot search | `-- Supabase |-- PostgreSQL `-- Realtime change subscriptions

07

Key design decisions

08

Current status and limitations

Single-office prototype

OfficeQueue demonstrates scheduling flows for a single executive-office context. It has not been tested at multi-executive or enterprise scale.

09

Reflection

OfficeQueue began as a scheduling problem, but the harder design questions were organisational: which routines could be formalised, which exceptions had to stay under human control, how much rigidity people would actually accept.

A scheduling system can calculate free time perfectly and still fail if it doesn't reflect how decisions are actually made. OfficeQueue explores the boundary between automation and discretion. reducing coordination work where constraints are explicit, while leaving room for what stays contextual or political.

← Back to selected works Get in touch →