Orin — Kanban

Read-only board generated from kanban/kanban.json · updated 2026-06-14T18:39:00.525Z
94.7% delivered (90/95) · 33.7% done · 61.1% testing · 5.3% to do
To do: 5In progress: 0Testing: 58Done: 32Reopened: 0

P0 — Foundation

Monorepo, CI, dev infra, kanban + docs tooling all running end-to-end

P0-T01 Done
Monorepo scaffold (pnpm + Turborepo, 4 apps, 2 packages)
apps/api (NestJS), apps/miniapp (Vite React), apps/web (Next.js), apps/admin (Vite React + react-admin); packages/ui (DS tokens ported), packages/i18n.
DEVTES
P0-T02 Done
Dev infrastructure: Docker Compose (postgres+postgis, redis, minio) + Makefile
make up brings infra with healthchecks; .env.example documents every variable; ports bound to localhost only.
DEVSECTES
P0-T03 Done
Kanban tooling: schema, validator, static renderer
kanban.json single source of truth; kanban-validate.mjs in CI; kanban-render.mjs emits read-only index.html until the web app serves /kanban.
BACFROTES
P0-T04 Done
CI pipeline: lint, test, build, kanban/docs validation, gitleaks, audit
GitHub Actions on PR + develop/main pushes; secrets scanning and dependency audit are merge-blocking per security-technical §5/§9. BLOCKED: needs gh auth refresh -s workflow from the founder (see /root/DO-THIS-FIRST.md).
DEVSECTES
P0-T05 Done
Documentation system: per-function template + validators
docs/process/function-doc-template.md fixed structure (AI-assistant-ready); docs-validate.mjs enforces frontmatter + headings + kanban cross-links.
DOCBACTES

P1 — Identity & core data

Auth (initData/OTP/JWT), users, masters, services, country-cell model live with migrations and seeds

P1-T01 Done
ORM, migrations & base entity conventions
Finalize ORM ADR (Prisma vs TypeORM), wire migration tooling, country cell root entity, and project-wide conventions: money as bigint tiyin, country_id on every table, UTC-in-DB.
BACSECTESDOC
P1-T02 Done
Telegram initData authentication
Verify Mini App initData (HMAC-SHA256 with bot secret, Ed25519 for 3rd-party), auth_date TTL ≤24h, never log initData; exchange for tokens.
BACFROSECTESDOC
P1-T03 Done
JWT access/refresh with rotation
Short access (15m) + refresh (30d) with rotation-on-use and reuse detection (reuse → whole chain revoked); asymmetric signing (RS256/EdDSA), kid in header.
BACSECTESDOC
P1-T04 Testing
Web OTP authentication
6-digit OTP for web cabinet: 3-min TTL, ≤3 attempts, 3 sends/hour per number and per IP, exponential backoff, code never logged.
BACFROSECTESDOC
P1-T05 Done
Master profile entity & CRUD
Master (user_id, display_name, category_id, geo point, verified, plan, slug). Ownership-scoped CRUD; public-safe projection vs private fields.
BACSECTESDOC
P1-T06 Done
Service entity (variants, formats, buffer)
Service: name_i18n, duration, price (tiyin), formats[studio|visit|online|project], buffer before/after, variants, add-ons, padding/processing, on/off + secret-link, per-service deposit/cancel policy.
BACSECTESDOC
P1-T07 Done
Salon, members & authz role matrix
Salon + salon_member(role); single role→actions matrix (authz/matrix.ts); global NestJS deny-by-default guard; resource-ownership guard.
BACSECTESDOC
P1-T08 Testing
i18n foundation (RU/UZ)
Shared RU/UZ catalogs, flat-key t(), no-hardcode lint rule; UZ-Latin + RU parity; UZ 15-25% longer length checks in component tests.
BACFROSECTESDOC
P1-T09 Done
Synthetic seed generator
make seed produces synthetic masters/services/clients/bookings; never production dumps; deterministic for tests.
BACSECTESDOC

P2 — Scheduling & bookings core

Schedule rules, slot generation, booking status machine with DB-level double-booking guarantee

P2-T01 Done
Schedule rules, overrides & UZ holidays
schedule_rule(weekday,start,end) + schedule_block + date overrides + split day ranges + Uzbekistan public-holiday auto-block (Navruz, Eid, Independence Day) preloaded UZ/RU.
BACSECTESDOC
P2-T02 Done
Slot generation + Redis cache
Compute availability intervals (schedule minus occupancy minus buffers); materialized "nearest free slots" cache in Redis, invalidated on schedule/booking change.
BACSECTESDOC
P2-T03 Done
Booking status machine
booking entity + status machine pending→confirmed→in_progress→completed|no_show|cancelled; source[link|catalog|manual]; created_by; status is the transaction trigger.
BACSECTESDOC
P2-T04 Done
Double-booking guarantee (DB-level)
[CRITICAL] EXCLUDE constraint on (master_id, tstzrange(start,end)) for active statuses + advisory lock on create + Idempotency-Key (Redis 24h).
BACSECTESDOC
P2-T05 Done
Per-service booking guardrails
Advance notice + booking window (separate first-visit vs regular) + 3-option horizon (rolling/fixed/indefinite); enforced server-side.
BACSECTESDOC
P2-T06 Done
Booking create/reschedule/cancel API
Endpoints with ownership, cutoff-window enforcement (buttons disappear inside window = server rejects), in-system-actions-only rule for state.
BACSECTESDOC

P3 — Mini App v1 + bot

Client books in 60s, pro manages calendar; thin bot transport; reminders flowing

P3-T01 Testing
Design system port — core & form components
Port Button, IconButton, Icon, Spinner, Input, Switch, SegmentedControl, Badge, Tag, Toast, EmptyState, Avatar, Card, StatCard, ListRow, Rating, ProfessionalCard to @orin/ui (pixel-perfect, tokens only).
FRODESTESDOC
P3-T02 Testing
Design system port — booking & nav components
Port ServiceRow, CalendarStrip, SlotPicker, BookingCard, MainButton, Tabs, BottomNav, StatusStepper, ProfileBadge, RatingHistogram, ChipGroup.
FRODESTESDOC
P3-T03 Testing
Telegram WebApp SDK integration
initData bootstrap, 15 theme tokens (live switch), MainButton/SecondaryButton, BackButton, haptic vocabulary, native popups, CloudStorage drafts, closing confirmation, disableVerticalSwipes.
FROSECTESDOC
P3-T04 Testing
Client booking wizard
Profile page → service → staff (Any default) → slot picker → confirm sheet (policies before tap) → MainButton "Book for X"; success haptic + receipt; idempotency.
BACFROSECTESDOC
P3-T05 Testing
Client bookings list & management
My bookings home; reschedule/cancel (buttons disappear inside cutoff); Book-again pre-fill; book-for-family; share booking (shareMessage card).
FROSECTESDOC
P3-T06 Testing
Pro appointment book
Day view (staff columns), dual-color cards (origin+status), one-tap status chips, tap-empty→staged booking sheet, New-appointment vs Block-time, buffers, walk-in type; <100ms interactions.
BACFROSECTESDOC
P3-T07 Testing
Pro onboarding
Auto-create first service from category; operating-mode question (salon/visit/online); activation checklist with progress; profile-completeness funnel with real rewards.
BACFROTESDOC
P3-T08 Testing
Share profile: link, QR, templates, import
Personal t.me deep link + server-generated QR + printable UZ/RU poster templates; Instagram/Telegram-channel portfolio import; "send 3 slots in chat".
BACFROSECTESDOC
P3-T09 Done
Thin Telegram bot transport
Deep links (startapp payloads), requestContact (verified phone), requestWriteAccess (bundled into confirm), quick buttons; no business logic — subscribes to domain events.
BACSECTESDOC
P3-T10 Done
Notifications engine + reminder ladder
BullMQ queue: 24h/2h/10min reminders, visit statuses, "slot opened", day digests; confirm-tap→auto-Confirmed; idempotent jobs; Rich Messages + private-chat topics.
BACSECTESDOC

P4 — CRM & finances

Pro's client list, notes/tags, manual bookings, money ledger and stat cards

P4-T01 Done
Client CRM cards
client entity (CRM projection, may have no user); notes, tags, visit history, total spend, reliability score + no-show/late-cancel counts.
BACSECTESDOC
P4-T02 Done
Trusted/Blocked & manual bookings
Trusted (skip deposit) / Blocked levers; manual booking entry; walk-in as first-class client type.
BACSECTESDOC
P4-T03 Done
Message blasts (Telegram-native)
Segment clients, compose, auto-append booking link, send via Telegram (free, two-way); replies land in real chat.
BACSECTESDOC
P4-T04 Done
Finances: wallets, payments, daily summary
Two wallets (cash/cashless) + income/expense categories; "record payment" on appointment (cash/Payme/Click/Uzum); daily summary popover.
BACSECTESDOC
P4-T05 Testing
Finance dashboards + biometric gate
~6 opinionated dashboards (today’s take, occupancy, no-show rate, repeat rate, top clients); StatCards tabular; PIN/biometric gate on revenue screens only.
BACFROSECTESDOC

P5 — Reviews & trust

Two-sided reviews on completed bookings only, client score, badges, anti-fraud flags

P5-T01 Done
Two-sided review model
review entity: direction[c2m|m2c], UNIQUE per booking+direction, link to booking(status=completed) enforced by trigger/service; stars, text, tags, status[visible|hidden|flagged].
BACSECTESDOC
P5-T02 Testing
Client→pro review + prompt scheduling
Full-screen 5-star sheet (4-5★ text+photo, 1-3★ reason chips+text); prompt at +30min, one +24h reminder; no-show cancels prompt; ~14-day edit window.
BACFROSECTESDOC
P5-T03 Testing
Pro→client review + reliability surfaced
Compact 2-tap sheet after Done (stars + tag chips); client score in pro booking card (tap→tag breakdown, no other pros’ texts); <4.0 amber + deposit hint.
BACFROSECTESDOC
P5-T04 Testing
Public reviews block
Average + mini histogram + review cards (abbrev name, date, photo, pro reply, staff attribution); 4-criteria optional; Report→reason form; New-pro badge <5 reviews.
BACFROSECTESDOC
P5-T05 Testing
Anti-fraud + verification badges
Anti-fraud worker flags review-boost/mass-signup (hide-not-delete); graded verification badges (phone→ID→diploma) in profile/results/card.
BACSECTESDOC

P6 — Billing & plans

Subscriptions via Payme/Click, feature gating, Start limit, paywalls, referrals

P6-T01 Done
Plans, subscriptions & feature gating
subscription entity; plan→feature matrix in config/DB (editable without release); billing.can(masterId,feature) = backend source of truth (403 PLAN_REQUIRED); front draws locks from same endpoint.
BACSECTESDOC
P6-T02 Testing
Plans screen, paywalls & upgrade sheets
4-plan swipe (current marked), compare table; lock states (visible+lock+plan label); upgrade sheet with concrete benefit; transparent pricing; self-serve cancel.
FROBACTESDOC
P6-T03 Testing
Start-limit counter & trial
Redis month-booking counter with DB recount; LimitBar "23 of 30"; growth banner at 27+; trial strip "Pro free for N days".
BACFROSECTESDOC
P6-T04 Done
Payme/Click payment integration
[BLOCK] Provider webhooks: signature verify before parse, instant 200 + queued processing, idempotency by external_id (UNIQUE), amount/currency reconciliation, raw_webhook journal, never auto-credit on mismatch.
BACSECTESDOC
P6-T05 Testing
Referrals (pro→pro)
Invite link/QR/share; progress with anti-fraud steps; +1 month for both on 14-day activity; billing credit.
BACFROSECTESDOC
P6-T06 Testing
Promotions trio (Pro+)
Flash Sale / Happy Hours / Last-Minute; off-peak discount attached to time slot (strikethrough + save% in picker); copy-to-other-days; 4-step start flow.
BACFROSECTESDOC

P7 — Home visits

Zones (PostGIS), surcharges, deposits, visit-day status tracker, verification, estimates

P7-T01 Done
Visit zones (PostGIS) & settings
visit_zone(polygon geography, surcharge, min_order) + radius option; travel buffer (10-min steps); mandatory-deposit toggle; per-service format switch.
BACSECTESDOC
P7-T02 Testing
Zone/radius map & address pin components
Port ZoneMapSelector + AddressPinPicker (schematic maps; 2GIS/Yandex SDK abstraction).
FRODESTESDOC
P7-T03 Testing
Home-visit client checkout
Format step (hidden if not mobile); LocationManager geo + map pin + entrance/floor/intercom + comment; saved addresses; total breakdown (service+travel) before confirm.
BACFROSECTESDOC
P7-T04 Testing
Visit-day status tracker
Stepper Confirmed→Departed→On-site→Done; pro tappable address (2GIS/Yandex), large status buttons, share live location; client start-confirmation tap = timestamp protecting deposits.
BACFROSECTESDOC
P7-T05 Testing
Deposits via pro payment links
Per-service deposit as pro Payme/Click/Uzum invoice link in chat (copyable); Orin records paid/unpaid/refunded/forfeited; auto-release slot if unpaid after N min; two-option (part/all).
BACSECTESDOC
P7-T06 Testing
Pro verification flow
Passport + selfie upload (2 steps, progress); statuses under-review/verified/rejected+reason; graded Verified badge in profile/results/card; admin review queue feed.
BACSECTESDOC
P7-T07 Testing
Repairs "request-now-with-ETA" mode
Urgent request → first master in zone accepts with ETA (alongside slot booking); zone-routed visibility.
BACFROSECTESDOC

P8 — Catalog & search

FTS with translit, geo, ranking, filters, waitlist, curtain-gated categories

P8-T01 Done
Full-text search + translit
tsvector over service names/descriptions + pg_trgm; uz-Latin↔Cyrillic↔RU transliteration dictionary at index and query time.
BACSECTESDOC
P8-T02 Done
Geo search + free-today cache
PostGIS master points; ST_DWithin/ST_Contains "who travels to me"; materialized nearest-slots cache (Redis) for "free today".
BACSECTESDOC
P8-T03 Done
Ranking scoring function
Score = f(rating, profile completeness, activity, distance, slot availability); coefficients in config; factors logged for debugging.
BACSECTESDOC
P8-T04 Testing
Catalog home + results cards
Search bar + category chips + "Your pros" + "Free today nearby" rail; result card (orin anatomy: rating, district, Bugun: slot chips, from-price, Book); list/map toggle.
FROBACTESDOC
P8-T05 Testing
Filters, sorting & empty states
Filter sheet (price/rating/home-visit/gender/language/online-pay); removable chips; Today/Tomorrow chips; sort segmented; state-specific empty screens.
FROBACTESDOC
P8-T06 Testing
Waitlist
Checkbox on existing booking ("notify if frees earlier") + full-day waitlist; "slot opened" Telegram push with inline Book + timed exclusive hold in queue order.
BACFROSECTESDOC
P8-T07 Testing
Curtain control + demand collector
Category open/close per city behind 6-item checklist; hide (not gray) empty categories; "Notify me when [category] arrives" demand collector; zero-result-search logging.
BACFROSECTESDOC

P9 — Online services

Video format: prepayment-gated join links, recordings with TTL, paid extension

P9-T01 Testing
Online checkout (prepay-gated)
online_session entity; duration cards (30/60/90 + prices) → slot → mandatory prepayment (explains "link unlocks after payment"); pay via Payme/Click link.
BACFROSECTESDOC
P9-T02 Testing
Session card + state-aware Join
Countdown; Join button disabled (lock) until ~10min before, then activates + deep-links auto-provisioned room; recording notice if enabled.
BACFROSECTESDOC
P9-T03 Testing
Recordings (private, TTL, consent)
Consent-gated recording toggle (legal hint); private bucket; signed URLs (1h TTL) for two participants only; auto-delete at expires_at by worker with journal.
BACSECTESDOC
P9-T04 Testing
Paid extension & storage
Call extension push ("ends in 5 min — extend 15min for X?") one-tap pay; "Extend storage" paid; "Book again".
BACFROTESDOC

P10 — Project services

Briefs, proposals with milestones, stage payments, portfolio, contract PDF

P10-T01 Testing
Brief / request form + requirements gate
Request form (niche-prompted textarea, photos/files, budget range, deadline); screening-questions-first; requirements gate auto-cancels/releases if client doesn’t respond in X hours.
BACFROSECTESDOC
P10-T02 Testing
Estimate + milestones (builder)
estimate(items jsonb,total) + milestone(ord,title,amount,status); LineItemBuilder (pro) + EstimateCard (client) + MilestoneStepper components.
BACFROSECTESDOC
P10-T03 Testing
Estimate approval + milestone machine
Client Approve/Discuss; approval locks (padlock+timestamp); project card both sides; milestone machine (agreed→deposit paid→submitted→approved/auto-approved after N days); one-active-milestone.
BACFROSECTESDOC
P10-T04 Testing
Portfolio + diagnostic SKU + rate card
Portfolio cases (before/after, timeline, budget); diagnostic-visit SKU + published rate card for repairs; "looks first, estimate second, milestones third".
BACFROSECTESDOC
P10-T05 Testing
Contract PDF generation
"Generate contract" → PDF (parties + estimate on brand letterhead); downloadFile (native).
BACFROSECTESDOC

P11 — Landing & web cabinet

Partner landing with pricing; Biz desktop week grid on the same API

P11-T01 Testing
Partner landing page
Next.js landing: pro numbers/earnings, quantified stats, transparent pricing ladder (anchored middle), SEO, objection-killing FAQ; CSP/HSTS/headers.
FROSECTESDOC
P11-T02 Testing
Public pro pages (orin.uz/<slug>)
SEO-friendly public booking pages mirroring the salon-page anatomy; QR target.
FROBACSECTESDOC
P11-T03 Testing
Web cabinet shell + week calendar
Desktop Biz: OTP login, sidebar, week calendar grid ("all chairs"), same API.
FROBACSECTESDOC
P11-T04 Testing
Multi-staff & resources
Roles grid; resource-gated availability (shared chair/equipment/room prevents cross-master double-book).
BACFROSECTESDOC
P11-T05 Testing
Payroll
3 plain-language presets (fixed %, %+daily, tiered %); red/yellow drift highlighting ("why did salary change?"); master self-view of earnings.
BACFROSECTESDOC

P12 — Admin panel

Operations: moderation, billing, support, impersonation — all audited

P12-T01 Testing
Admin shell + 2FA
react-admin on same API (separate namespace + auth); separate issuer; mandatory TOTP 2FA; 8h sessions; optional IP binding.
BACFROSECTESDOC
P12-T02 Testing
Entity management + impersonation
Manage masters/bookings/payments/reviews; impersonation with distinct tagged token recorded in every audit event.
BACFROSECTESDOC
P12-T03 Testing
Audit log + security alerts
Append-only audit_log (app insert-only); admin actions always recorded; alerts on 401/403 spikes, OTP brute force, webhook mismatches, admin exports.
BACSECTESDOC
P12-T04 Testing
Moderation + verification queue
Review-flag handling; verification document review queue; hide/restore content.
BACFROSECTESDOC
P12-T05 Testing
Curtain UI + metrics dashboards
Category open/close per city UI; zero-result-search dashboard (curtain demand signal); business metrics (MRR, cohorts).
BACFROSECTESDOC

P13 — Docs & support pages

Per-function corpus complete; staff docs page and client help page live

P13-T01 Done
Backfill per-function doc corpus
Ensure every shipped function has its docs/functions doc (use/edge/error/test cases) passing docs:validate; machine-readable for the AI support assistant.
DOCBACTES
P13-T02 Testing
Staff documentation page
/docs/staff generated from corpus staff_summary + hand-written staff guides; UZ/RU.
FROBACDOCTES
P13-T03 Testing
Client help page
/help generated from client_summary + client guides; friendly UZ/RU; FAQ incl. "we never ask for codes/cards".
FROBACDOCTES
P13-T04 Testing
Security disclosure page
/security page with security@orin.uz; responsible-disclosure policy; "we never ask for codes/passwords/cards".
FROSECDOCTES
P13-T05 Testing
/kanban served by web app
Replace static render with a read-only /kanban page in the web app, rendering kanban.json from the deployed build; DS status colors; no edit controls.
FROBACSECTESDOC

P14 — Deployment & ops

Caddy + dev/staging stacks on orin-hetz-01, CI/CD deploys, backups, monitoring

P14-T01 Testing
Ansible playbook (server-from-zero)
IaC: users, firewall (default-deny, 80/443 + allowlisted 22), Docker, DOCKER-USER chain, services, hardening §12; assert-role drift check run weekly via cron.
DEVSECTESDOC
P14-T02 Testing
Caddy + dev/staging stacks + DNS/TLS
Caddy reverse proxy (TLS auto-renew + 14-day expiry alert); isolated dev/staging compose (own networks/volumes/secrets/bots); dev.orin.uz + staging.orin.uz live.
DEVSECTESDOC
P14-T03 Testing
CI/CD deploy pipeline
GHCR private images (pinned by sha); GitHub Actions: PR→test, develop→dev, main/tag→staging; deploy via docker compose pull&&up over restricted SSH key; migrations + volume snapshot; sha rollback.
DEVSECTESDOC
P14-T04 Testing
Backups (pg_dump, WAL/PITR, offsite)
Daily pg_dump + WAL archiving (PITR); 7-day local + encrypted (age/gpg) offsite on Hetzner Storage Box 30-day; quarterly restore drill.
DEVSECTESDOC
P14-T05 Testing
Monitoring & observability
Sentry (front+back); Prometheus/Grafana (RPS, p95, queues, bookings/min); Loki (JSON logs, PII-masked); PostHog product events; alerts to TG channel.
DEVSECTESDOC
P14-T06 Testing
Bot webhooks (dev/staging)
Separate dev + staging bots; setWebhook to /webhook/tg; signature/secret verification.
DEVSECTESDOC

P15 — Hardening & launch readiness

Security checklist green, full e2e suite, load sanity, launch checklist done

P15-T01 To do
IDOR/authz + rate-limit sweep
Full IDOR sweep (every endpoint: someone-else id → 404/403); rate-limit coverage (API 60rpm/user 300/IP, OTP, search 30rpm, booking 10/h, webhooks); captcha on booking excess.
SECTESDOC
P15-T02 To do
PII masking + secrets audit
Logger masking (phones +99890***1234, addresses district-only, tokens never); contact exposure only at confirmed/in_progress, hidden after completion; gitleaks clean; deletion/anonymization procedure.
SECTESDOC
P15-T03 To do
Full e2e suite + load sanity
End-to-end suite across all flows green; load sanity (booking creation, search, webhooks); flake elimination.
TESDOC
P15-T04 To do
Runbooks + launch checklist
Incident-response one-pager; migrate-to-uz.md rehearsed on staging copy (timed); security-policy launch checklist fully ticked.
DEVSECTESDOC
P15-T05 To do
Pentest-ready scope + CVE sweep
External-pentest scope (Mini App + API + webhooks + admin); Dependabot/Renovate on; pnpm audit fail-on-critical; trivy image scan; critical CVEs closed.
SECDEVTESDOC