ThreadPilot: PWA CRM for Embroidery Factories by Arshil DudhatThreadPilot: PWA CRM for Embroidery Factories by Arshil Dudhat

ThreadPilot: PWA CRM for Embroidery Factories

Arshil Dudhat

Arshil Dudhat

ThreadPilot – Offline-First Embroidery Workforce Management CRM

A Progressive Web Application (PWA) for embroidery factories that enables GPS-based attendance, production tracking, worker management, and seamless offline synchronization.

Project Description

ThreadPilot is a full-stack, offline-first Workforce Management CRM designed specifically for embroidery manufacturing businesses. It streamlines daily factory operations by providing GPS-verified attendance, production tracking, shift management, worker administration, and automated reportingβ€”all within a responsive Progressive Web Application.
The application continues to function even without an internet connection by storing attendance and production data locally using IndexedDB. Once connectivity is restored, all pending records are automatically synchronized with the server, ensuring uninterrupted workflows and reliable data consistency.
Administrators can manage workers, configure factory settings, define day and night shifts, monitor attendance through calendar and list views, generate Excel and PDF reports, and track production performance in real time. Workers can securely log in, mark attendance using GPS geofencing, submit production updates, and manage their profiles from any device.

Key Features

Offline-first architecture with automatic background synchronization
Progressive Web App (PWA) with installable support
GPS-based attendance with geofencing validation
Worker and employee management
Day & Night shift scheduling
Automatic late arrival and overtime calculation
Monthly attendance calendar with visual indicators
Production tracking and management
Secure role-based authentication (Admin & Worker)
Automatic worker credential generation
Self-service password change
Excel and PDF report generation
Responsive UI for desktop, tablet, and mobile
Dashboard analytics with charts and statistics
Dark mode support

Tech Stack

Frontend

Next.js 16
React 19
TypeScript
Tailwind CSS v4
Framer Motion
Recharts
shadcn/ui
Sonner

Backend

Next.js API Routes
MongoDB
Mongoose
JOSE (JWT Authentication)
Zod
bcrypt

Offline & PWA

IndexedDB (Dexie.js)
Serwist
Background Sync
Service Worker
Web App Manifest

Reporting

ExcelJS
jsPDF

Core Modules

Authentication & Authorization
Worker Management
Attendance Management
GPS Attendance Verification
Production Management
Shift Management
Dashboard & Analytics
Reports (Excel & PDF)
Factory Settings
Offline Synchronization

Technical Highlights

Built an offline-first architecture using IndexedDB and background synchronization.
Implemented optimistic UI updates with automatic conflict resolution.
Developed secure JWT authentication using JOSE and HttpOnly cookies.
Created GPS-based attendance verification using the Haversine distance algorithm.
Designed a scalable Repository-Service architecture for clean backend development.
Added shift-aware attendance with support for overnight shifts, late arrivals, and overtime calculations.
Developed an installable Progressive Web App with offline caching using Serwist.
Built responsive dashboards with real-time statistics and interactive charts.

My Role

Full Stack Developer
Designed the complete system architecture.
Developed the frontend using Next.js, React, and Tailwind CSS.
Built RESTful APIs using Next.js Route Handlers.
Designed MongoDB database schemas and business logic.
Implemented GPS-based attendance and production tracking.
Developed offline synchronization using IndexedDB and Background Sync.
Implemented authentication, authorization, and role-based access control.
Built reporting modules for Excel and PDF exports.
Optimized the application for mobile devices and Progressive Web App support.

Challenges Solved

Enabled uninterrupted factory operations with offline data storage and automatic synchronization.
Solved Edge Runtime authentication issues by migrating from jsonwebtoken to jose.
Implemented GPS geofencing for secure attendance verification.
Designed conflict-free synchronization between offline and online data.
Supported overnight shifts with accurate late arrival and overtime calculations.
Built a scalable architecture using the Repository-Service pattern for maintainability.

Project Highlights

πŸ“ GPS-Based Attendance System
πŸ“Ά Offline-First Architecture
πŸ“± Progressive Web App (PWA)
πŸ”„ Automatic Background Synchronization
πŸ‘₯ Worker & Production Management
πŸ“Š Dashboard Analytics
πŸ“… Shift & Attendance Calendar
πŸ“„ Excel & PDF Report Generation
πŸ” Secure Authentication & Authorization
πŸŒ™ Dark Mode & Responsive Design

Next.js 16 β€’ React 19 β€’ TypeScript β€’ MongoDB β€’ Mongoose β€’ Tailwind CSS v4 β€’ PWA β€’ IndexedDB β€’ Dexie.js β€’ Serwist β€’ Service Worker β€’ JOSE β€’ JWT Authentication β€’ GPS Tracking β€’ Offline First β€’ Factory Management β€’ CRM β€’ Dashboard β€’ ExcelJS β€’ jsPDF β€’ Zod β€’ Framer Motion
Like this project

Posted Jul 21, 2026

Developed a PWA CRM for embroidery factories with offline capabilities and real-time management.