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.
- API reference — auto-generated from the Zod contracts (single source of truth): see the API Reference.
- Interactive API — try every endpoint live at Swagger UI.
- Guides — Getting started, Architecture.
What's here
| Area | Stack |
|---|---|
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
versionand a client-generateduid; - 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
SyncConflicttable.
See the sync design spec for the full model.