Back to projects

CalEdwin — Technical Case Study & Architecture Overview

Scheduling is deceptively complex.

Most calendar tools either:

  • Fragment data across multiple systems (auth here, calendar there, storage elsewhere), or
  • Over-simplify the experience, forcing users into rigid workflows that don’t reflect how real people schedule time.

From an engineering standpoint, the core challenges are:

  • Reliable identity and session management across client and server.
  • Consistent data modeling for users, availability, and events.
  • Safe synchronization with external calendars and email systems.
  • Latency-sensitive UX, where booking, confirmation, and availability must feel instant and trustworthy.

The absence of a cohesive architecture often leads to brittle integrations, race conditions in booking logic, and poor user confidence in the system.

Solution

CalEdwin was designed as a modular scheduling platform, where each concern is isolated but tightly integrated through well-defined boundaries.

High-level Architecture

SEO

At its core, CalEdwin uses Next.js 14 (App Router) as the orchestration layer, enabling:

  • Server Components for data-heavy operations.
  • Route Handlers for transactional workflows (booking, syncing, callbacks).
  • Streaming and fast navigation for a responsive scheduling UI.

Authentication & Identity

Authentication is handled via Auth.js with the Prisma Adapter:

  • Sessions are database-backed, not JWT-only, allowing stronger consistency guarantees.
  • User identity becomes a first-class relational entity, not just a token payload.
  • Server-side authorization is enforced at the data-access layer, not only in UI logic.

This ensures that scheduling actions (creating availability, syncing calendars) always execute under a verified, persistent identity.

Data Layer & Persistence

  • Prisma acts as the single source of truth for domain modeling.
  • Supabase Postgres provides managed, scalable persistence.
  • All mutations flow through Prisma, ensuring:
  • Referential integrity between users, events, and availability.
  • Type-safe queries shared across server actions and API routes.
  • Predictable migrations as the scheduling model evolves.

The postinstall → prisma generate flow ensures schema parity across environments.

Calendar & Email Integration

Event

Nylas is integrated as an external boundary service:

  • Calendar sync is treated as an event-driven side effect, not a blocking operation.
  • Booking creation triggers downstream calendar updates asynchronously.
  • Email notifications and confirmations remain consistent with external calendars.

This separation prevents external API failures from corrupting internal scheduling state.

UI & Interaction Layer

  • Radix UI + React Aria provide accessible primitives.
  • Conform + Zod enforce schema-level validation at form boundaries.
  • Tailwind + CVA maintain a predictable design system without runtime overhead.

The UI is intentionally thin:

  • Most logic lives server-side.
  • Client components focus on interaction, not orchestration.

Results

CalEdwin achieves a balance between developer ergonomics and user trust.

From a system perspective:

  • Authentication, persistence, and integrations are cleanly decoupled.
  • Scheduling logic is deterministic and transaction-safe.
  • External calendar sync enhances the system without controlling it.

From a user perspective:

  • Booking feels immediate and reliable.
  • Availability reflects real-world calendars, not stale snapshots.
  • The interface stays out of the way, letting users focus on time—not tooling.

Ultimately, CalEdwin is less about building another calendar app and more about demonstrating how thoughtful architecture turns a common problem into a dependable system—one where time is treated as critical infrastructure, not just UI state.