Work
01 Internal Operations Platform · Karim Optical

Karim Connect

A staff-only operations system that replaced register-based customer management with a structured digital workflow, built around how the business actually runs, not a generic CRUD form.

Role

Design & Full-Stack Development

Built For

Karim Optical

Status

Production System

Primary Stack

React · Express · Cloudflare Workers

Context

Paper registers weren't built for
this many moving parts

Karim Optical previously managed customer information through physical registers: a system that couldn't represent the relationships that actually exist between customers.

The requirements went beyond simply transferring paper records into a CRUD application. Customers share phone numbers with family members. Relationships between customers matter. Eyesight records evolve over time and need a history, not just a latest value. Staff actions need attribution. And unusual information sometimes calls for human judgment rather than automatic rejection.

Karim Connect was designed specifically around those operational realities: centralizing customer registration, permanent Karim IDs, contact and family relationships, eyesight history, staff attribution, operational schedules, analytics, and a human-reviewed data-quality workflow. It also acts as the private operational source behind selected public information shown on the separate Karim Optical website.

Customer Model

One permanent identity, several real-world relationships

Every registered customer receives a permanent, unique Karim ID (an identifier, not authentication) that ties their profile, contacts, relationships and eyesight history together.

Karim IDs are never recycled after a customer is deleted or merged, so historical references stay valid. Around that identity, Karim Connect models contact ownership explicitly: customers can have multiple phone numbers, and family members can use another customer's number without incorrectly becoming its owner.

Supported relationships

Father / Mother Son / Daughter Husband / Wife Brother / Sister Custom

Relationships are directional and navigable between profiles: a link surfaced on both sides, not a one-way tag.

Karim Connect customer list showing Karim ID, phone, gender and welcome-message status columns
Customers: search by name, Karim ID or phone

Eyesight History

Prescriptions change: the record should remember why

Structured records with separate right/left measurements for distance and near, editable with attribution preserved.

Staff can add new eyesight records, inspect previous entries, and correct existing ones without losing who made the change. Rather than overwriting a single "current" value, Karim Connect retains a short rolling history of recent eyesight records per customer, turning a snapshot into a timeline.

Human-in-the-Loop · Reviewable

Not every unusual value is a mistake

Structurally valid but conspicuous eyesight values aren't automatically rejected. They're saved and surfaced to staff, who can inspect, edit, or explicitly approve the record.

  1. 01

    Input

    Staff enters a new eyesight record for a customer.

  2. 02

    Validation

    The record is checked for structural validity.

  3. 03

    Valid but unusual?

    Conspicuous-but-valid values are flagged rather than silently accepted or rejected.

  4. 04

    Save record

    The record is saved so no work is lost while it awaits review.

  5. 05

    Reviewable

    The record enters the Reviewables queue, visible to Owner and Staff.

  6. 06

    Staff review

    A staff member inspects the flagged record against context only a person has.

  7. 07

    Approve / edit

    The record is approved as-is or corrected, either way by a person, not a rule.

Duplicate customers get the same treatment

Potential duplicate linked customers can also be surfaced for review. Staff compare the records side by side and either keep them as separate customers, or merge them: a real transactional merge that reconciles contacts, relationships and eyesight history into the retained customer.

Potential MatchDuplicate detection
Compare Customers
SeparateKept as distinct customers
Transactional MergeContacts, relationships & eyesight history reconciled

Access

Two roles, backend-enforced

Authorization is enforced server-side, not assumed from what the interface happens to show.

Owner & Staff

Both work with customers, eyesight records, Reviewables, schedules, closures and operational analytics day to day.

Owner only

Additionally manages staff accounts.

Visibility

One dashboard for the shop's daily rhythm

Registration activity, staff attribution and pending review work, at a glance.

The dashboard surfaces total active customers, month-to-date registrations, daily/weekly/monthly comparisons, registration trends, gender distribution, staff registration attribution, pending Reviewables and upcoming closures: read-only figures redacted here, as no real business or customer counts are published in this case study.

Karim Connect dashboard with registration activity chart, gender distribution and pending closures (figures redacted)
Dashboard: registration activity & reviewable queue
Monthly records table listing registrations by Karim ID, staff member and status (figures redacted)
Monthly records: registered-by attribution & status

Schedule

The single source of truth for when the shop is open

Business hours, doctor consultation hours and special closures all live here first.

Karim Connect manages the operational schedule that everything else, including the public website, reads from. Editing a day's hours or logging a special closure happens once, in one place.

Business hours editor with per-day open/closed toggles and time ranges
Business hours: per-day toggles with holiday notes

Ecosystem

One private system, one privacy-limited public face

Karim Connect
Privacy-Limited
Public Schedule
Karim Optical Website

Only public operational schedule information is exposed. Private customer, eyesight, staff, Reviewable, analytics and messaging data stay inside the authenticated system; see the Karim Optical case study for the public side of this same contract.

Integrations

Google Business Profile & WhatsApp

Two external touchpoints, built to fail gracefully.

Google Business Profile integration is part of the completed system: one of Karim Connect's operational capabilities alongside customer and schedule management.

WhatsApp messaging

Karim Connect integrates with a separate authenticated WhatsApp messaging service (not the Meta WhatsApp Cloud API directly) for registration-triggered workflows: a welcome message including the new Karim ID, and a relative-link message when a customer is registered through another customer's contact. Messaging happens after the customer transaction commits, so a downstream messaging failure can never undo a successful registration.

Delivery state

Messaging status is tracked independently from the registration record, so a delivery failure is visible to staff without ever affecting the underlying customer data.

System Map

The operational center of the business

Karim Optical Operations
Karim Connect
Customer Records
Review Workflow
Scheduling & Operations
Business Integrations
WhatsApp Messaging
Karim Optical Website

Google Business Profile sits alongside these as a further business integration.

Stack

Technology

Frontend

React 19TypeScriptViteReact RouterTanStack QueryCSS ModulesMotionLucideCustom SVG Charts

Backend

TypeScriptExpress 5Zod

Persistence

SQLite-Backed Durable ObjectsSQL MigrationsTransactions

Infrastructure

Cloudflare WorkersDurable ObjectsStatic Assets

Quality

VitestTesting LibrarySupertestWrangler Runtime TestsESLint

Reliability

Built to fail safely, not just to work

Database transactions and schema migrations, enforced constraints, a transactional customer-merge path, failure-tolerant messaging that never blocks a registration, and automated tests around the workflows that matter most.

In Short

Real business behavior, translated into software

Shared family contacts→Explicit contact ownership
Changing eyesight→Historical records
Unusual values→Human review
Potential duplicates→Transactional resolution
Public schedules→Privacy-limited integration
Messaging failures→Recoverable operational states