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

Thread Pilot – Offline First Workforce Management CRM for Embroidery Factories

Overview

Thread Pilot is a full-stack Progressive Web Application (PWA) designed to simplify workforce and production management for embroidery manufacturing businesses. The application enables administrators to manage workers, monitor attendance, track production, configure factory settings, and generate reports, while allowing workers to record attendance and production from any device.
Unlike traditional web applications, ThreadPilot is built with an offline-first architecture. Workers can continue using the application without an internet connection, and all pending data automatically synchronizes with the server once connectivity is restored.

The Problem

Many embroidery factories still rely on paper registers, spreadsheets, or outdated software to manage attendance and production. Internet connectivity is often unreliable on factory floors, making cloud-only systems impractical.
This results in:
Lost attendance records
Manual data entry
Inaccurate production tracking
Difficulty monitoring worker performance
Time-consuming report generation
The challenge was to build a modern system that remains fully functional even when internet access is unavailable.

The Solution

I designed and developed Thread Pilot, an offline-first Workforce Management CRM that combines attendance tracking, production management, GPS verification, shift scheduling, reporting, and analytics into a single application.
Using IndexedDB and background synchronization, every attendance or production record is stored locally when the device is offline. Once the internet connection returns, all pending records are automatically synchronized with MongoDB without requiring any user interaction.
The application is also installable as a Progressive Web App, allowing workers to use it like a native mobile application.

Key Features

Offline-first architecture with automatic synchronization
Progressive Web App (PWA)
GPS-based attendance with geofencing
Worker management
Production tracking
Day & Night shift scheduling
Automatic late arrival and overtime calculation
Attendance calendar with monthly visualization
Dashboard analytics
Excel & PDF report generation
Role-based authentication (Admin & Worker)
Responsive mobile-first design
Dark mode support

Technologies Used

Frontend

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

Backend

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

Offline & PWA

IndexedDB (Dexie.js)
Serwist
Background Sync
Service Workers

Reporting

ExcelJS
jsPDF

My Contributions

As the sole Full Stack Developer, I was responsible for:
Designing the complete application architecture
Developing the frontend and backend
Building REST APIs
Designing MongoDB schemas
Implementing secure authentication and authorization
Developing GPS-based attendance verification
Creating the offline synchronization system
Building production and attendance management modules
Implementing reporting features (Excel & PDF)
Optimizing the application for mobile devices and PWA installation

Technical Highlights

Built an offline-first architecture using IndexedDB and automatic background synchronization.
Implemented GPS-based attendance verification using the Haversine distance algorithm.
Developed secure authentication with JOSE, HttpOnly cookies, and role-based access control.
Created a scalable Repository-Service architecture for maintainable backend development.
Implemented shift-aware attendance with support for overnight shifts, overtime, and late arrival calculations.
Built an installable Progressive Web App using Serwist for offline caching and improved performance.
Designed responsive dashboards with real-time analytics and interactive charts.

Challenges & Solutions

One of the biggest challenges was ensuring that workers could continue recording attendance and production even without an internet connection.
To solve this, I implemented an offline queue using IndexedDB. Every action is stored locally and synchronized automatically when connectivity is restored. Conflict handling ensures that the latest valid record is preserved while maintaining a smooth user experience.
Another challenge was implementing secure authentication compatible with the Next.js Edge Runtime. I replaced jsonwebtoken with jose, enabling reliable JWT verification across both Node.js and Edge environments.

Outcome

Thread Pilot demonstrates how modern web technologies can provide reliable workforce management for manufacturing environments with unstable internet connectivity. By combining offline-first architecture, GPS verification, production tracking, and automated reporting, the application delivers a seamless experience for both workers and administrators while reducing manual processes and improving operational efficiency.

Skills

Full Stack Development • Next.js • React • TypeScript • MongoDB • Tailwind CSS • Progressive Web Apps • IndexedDB • Service Workers • Offline Sync • GPS Tracking • Authentication • Dashboard Development • REST APIs • ExcelJS • jsPDF
Like this project

Posted Jul 21, 2026

Full-stack PWA CRM for embroidery factories with offline support, GPS attendance, worker management, production tracking, and reporting.