|||

K-Wave Now

The AI Era: Where Experience Shapes Design and New Project Methodologies Evolve.
AdvertisementLeaderboard Ad
Back to Edition
Project

Dental Lab Pan-Tracking System

K-
By Hey VibePublished September 22, 2026

To build an integrated SaaS (Multi-Tenant) platform that tracks the progress of all cases in real-time and provides a one-stop solution for Accounts Receivable (A/R) management.

Dental Lab Pan-Tracking System (DLPTS)

This document is a comprehensive project report summarizing the development progress up to the V1 (Presentation Demo) phase of the HeyVibe Dental Lab Integrated Management System (DLPTS). It is prepared for client reporting and knowledge sharing with future development agents/teams participating in the V2 multi-tenant scaling phase.


1. Initial Development Planning & Goals

Project Background

The operations of a Dental Lab involve a highly complex process, taking requests from dental clinics and running them through multiple workstations (Design, Milling, 3D Printing, Build-up, etc.) before final dispatch. Historically, relying on paper lab slips and manual tracking made it difficult to assess real-time progress and resulted in high communication overhead between clinics and labs.

Development Goals

"To build an integrated SaaS (Multi-Tenant) platform that tracks the progress of all cases in real-time and provides a one-stop solution for Accounts Receivable (A/R) management."

  • Maximize internal lab productivity and process visibility (Pan Tracking).

  • Provide Headquarters (HQ) with an integrated dashboard to monitor performance and operations across network labs.

  • Offer a transparent communication channel between dental clinics and dental labs.

  • Secure a flawless V1 Demo system for successful client meetings and investment pitching.


2. Major Development Achievements

Based on the v1-presentation-demo branch, the core functionalities currently implemented are as follows:

2.1 HQ Integrated Dashboard & Management System

  • Integrated Dashboard: At-a-glance monitoring of total active cases, past-due cases, cash flow (A/R), and Pan locations across different facilities.

  • A/R (Accounts Receivable) Module: Management of total billed amounts, paid amounts, net balances, and overpayment credits per dental clinic. Implementation of a robust Bulk Payment application logic.

  • Case Management: Barcode-based case tracking, UI prepared for bulk Excel uploads, and clinic/lab assignment functionalities.

2.2 Lab On-Site Operations System

  • Scanner Form (Barcode Scanning): A feature allowing continuous barcode scanning via a shared tablet or PC to update the status of a Pan to the current Workstation. (Incorporates continuous scanning and auto-batch submission logic triggered after 2 seconds of inactivity).

  • Dispatch Management: A feature to check cases assigned to a specific lab that are pending dispatch, allowing users to process deliveries efficiently.

2.3 System-Wide & Global Readiness

  • Localization: Full translation of the system UI, alerts, and toast messages to English (applying the HeyVibe branding) to accommodate the demo presentation. The login page instructions ("Policy Questions") remain as an exception for presentation flow.

  • Access Control (Middleware Protection): Routing protection via Next.js Middleware to block unauthorized users, with a configured exception page (/policy-questions) for demo purposes.


3. Implementation Methods, Tech Stack, & Core Technologies

3.1 Tech Stack

  • Frontend:

    • Framework: Next.js (App Router)

    • UI Library: React

    • Styling: Tailwind CSS (Responsive and Mobile-Optimized)

    • Components: Custom UI based on shadcn/ui (Cards, Badges, Toasts, etc.)

  • Backend & Database (BaaS):

    • Supabase: PostgreSQL-based Relational DB, Auth, Row Level Security (RLS)

  • Infrastructure & Deployment:

    • Vercel (Automated CI/CD linked with GitHub)

    • Version Control: Git / GitHub

3.2 Core Technologies & Implementation Strategies

  • Server-Side Rendering (SSR) Utilization: Leveraged Next.js App Router architecture and Server Components to optimize initial loading speeds and secure SEO/Security benefits. Data fetching primarily occurs server-side to minimize client-side computational load.

  • Supabase SSR Authentication: Safely authenticates users and controls page access permissions at the Server Component and Middleware levels via cookie-based sessions.

  • Multi-Update Transaction Logic (Optimistic UI & Batching): In the scanner form, if multiple barcodes are scanned within 1 second, they are queued in the React State. After 2 seconds of inactivity, they are asynchronously submitted to the DB as a single batch, reducing server request costs and maximizing on-site operational speed.

  • Waterfall Payment Allocation Algorithm: During Bulk Payments in the A/R Ledger, the logic sequentially deducts the paid amount from the oldest unpaid invoices. Any excess amount is automatically converted into Credit, ensuring perfect synchronization between frontend state and DB transactions.


Future Roadmap (V2 Enhancement)

These are the core tasks for the upcoming V2 development, continuing from the main branch on GitHub.

  1. Perfect Multi-Tenant Isolation (Advanced Supabase RLS):

    • Transitioning from the current demo structure to an actual SaaS structure by applying lab_id to all tables and enforcing strict Row Level Security.

  2. Remake Tracking System Development:

    • Linking original cases, categorizing fault ownership (Internal/External), applying automated discount rates, and building a quality control statistical dashboard.

  3. Clinic Portal Launch & AWS S3 Integration:

    • Developing a dedicated portal for dental clinics and integrating secure cloud storage (AWS S3) to handle large 3D scan files and lab slips.

Recommended Articles