Skip to main content

Taghvimam

Taghvimam is a calendar platform with an offline-first, multi-device sync backend (Express + Prisma + PostgreSQL), a React/Vite web app, and an Android client.

What's here

AreaStack
Backend (apps/api)Express.js + TypeScript, Prisma + PostgreSQL, JWT auth, Kavenegar SMS OTP, Firebase FCM
Web (apps/calendar-web)React 18 + Vite + Tailwind v3, TanStack Query, feature-sliced
Contracts (packages/contracts)Zod schemas — the single source of truth for all API DTOs + the OpenAPI spec
Sync (Phase 1)Offline-first v2 sync — global version watermark, HMAC cursor, per-item LWW, device-aware auth

Two-way sync at a glance

The Android client and server reconcile changes via /api/v2/sync/*:

  • each record carries a monotonic version and a client-generated uid;
  • pull is driven by one signed, opaque cursor holding per-entity high-water marks;
  • push applies each item with last-writer-wins, banking losers into a recoverable SyncConflict table.

See the sync design spec for the full model.