Real-Time WhatsApp Lottery Ticket Sorting, Custom Filtering & Liability Tool
Budget / Salary₹37,500–75,000
TypeFreelance project
LocationRemote
Posted1 hour ago
Software Requirements Specification (SRS): Real-Time WhatsApp Lottery Ticket Sorting, Custom Filtering & Liability Tool
1. Project Overview & Real-Time Objective
Build a fast, responsive web/mobile application for a retail 4-digit lottery booking agency where every action happens in real time with zero page reloads or manual recalculation steps. As soon as WhatsApp text is pasted, an image is OCR-extracted, or the operator edits Prize Money, Retention Rules, or Custom Filters, the system immediately recalculates:
Retained Book (tickets kept by the agency)
Transfer List (tickets forwarded to the main/upper distributor / company)
Payout Liability & Exposure (worst-case win amounts and net retained risk in ₹)
2. Core Game Structure & Board Mapping
Every 4-digit draw result is indexed by positional boards for the last three digits:
Full Number: X A B C (4 digits)
Board A: 2nd digit of the 4-digit result
Board B: 3rd digit of the 4-digit result
Board C: 4th (last) digit of the 4-digit result
3. Customizable Prize Money & Ticket Categories (Real-Time Editable)
All prize money figures and ticket price brackets must be editable by the operator at any time in real time (with sensible defaults pre-loaded). Changing a prize amount or price threshold immediately updates payout calculations across all existing and incoming tickets.
3.1 Single Digit (1D — Boards A, B, C)
Format: Single digit (0–9) mapped to board A, B, or C (e.g., A 5 x 20, B7 - 10 sets, C=3 (50)).
Custom Prize Money: Operator-configurable payout per winning set (editable in real time).
3.2 Two Digit (2D — AB, BC, AC, and All Board)
Format: 2-digit number (00–99) mapped to AB, BC, AC, or All Board (e.g., 27 All Board x 5).
All Board Expansion Rule: An All Board booking (e.g., 27) automatically expands in real time into three entries: AB 27, BC 27, and AC 27.
Custom Prize Money: Operator-configurable payout per winning set (editable in real time).
3.3 Three Digit (3D — ABC & Box)
Format: 3-digit number (000–999) representing boards ABC, either as a straight ticket or a Box ticket (e.g., 123 Box, 456 x 2).
Box Rotation Rule: When Box is specified, the 3 digits rotate automatically into all unique permutations:
3 distinct digits (e.g., 123) → 6 combinations (123, 132, 213, 231, 312, 321)
2 identical digits (e.g., 112) → 3 combinations (112, 121, 211)
3 identical digits (e.g., 777) → 1 combination (777)
Ticket Tier & Customizable Prize Structure:
Half Ticket: Default price < ₹48 (price threshold editable by operator); default prize = ₹15,000 (prize amount editable in real time).
Full Ticket: Default price ₹48 to ₹84 (price range editable by operator); default prize = ₹30,000 (prize amount editable in real time).
3.4 Four Digit (4D — Full Number)
Format: 4-digit number (0000–9999) (e.g., 4829 x 1).
Customizable Tiered Prize Structure (all amounts editable in real time):
All 4 digits match (XABC): Default ₹5,00,000 (5 Lakhs)
Last 3 digits match (ABC): Default ₹1,00,000 (1 Lakh)
Last 2 digits match (BC): Default ₹10,000
Last 1 digit matches (C): Default ₹1,000
4. Functional Requirements
4.1 Real-Time Input & Optical Character Recognition (OCR)
1. Live Text Parsing: As text is typed or pasted into the input box, entries parse immediately into structured tickets without needing a separate "Parse" click. Supports flexible separators (-, =, :, *, x, /, sets, nos, box, all).
2. Image Upload & Real-Time OCR:
Drag-and-drop or camera/file upload supporting .jpg, .png, and .webp WhatsApp images (screenshots, slips, handwritten notes).
OCR engine (Tesseract.js client-side or Vision API) extracts text and feeds it into the live parser; editing the extracted text immediately updates the sorted lists.
Unrecognized Line Queue: Any unparsed line appears immediately in a "Needs Review" list where fixing a typo or number updates the sort in real time.
4.2 Real-Time Custom Filters & Operator Controls
The operator must be able to filter, search, and customize retention rules on the fly, with instant live updates to both the Retained Book and Transfer List:
1. Custom Retention & Prize Money Panel (Live Configurator):
Edit prize money values for 1D, 2D, 3D Half, 3D Full, and 4D (4-match, 3-match, 2-match, 1-match) at any time.
Edit default retention limits (default: 50 sets for 1D, 10 sets for 2D, 1 set for 3D, 0 sets / 100% transfer for 4D).
Edit 3D ticket price cutoffs (default: < ₹48 Half, ₹48–₹84 Full).
2. Real-Time Retained-Ticket & Transfer Filters (Operator-Controlled):
Search & Number Filter: Filter retained or transferred tickets immediately by exact number, partial digits, board (A, B, C, AB, BC, AC, ABC, 4D), ticket tier (Half / Full), or customer tag.
Retained-Only / Transferred-Only / Both View Toggle: Switch or filter live to inspect only what is retained, only what is being transferred, or compare side-by-side.
Custom Rule / Override Filter (e.g., Ending Digit / Board / Guess Filter): Select specific ending digits (0–9), board positions (A, B, C), or specific numbers/ranges to force-transfer (100% or custom cap) or force-retain/cap in real time—for example, transferring all tickets ending in 7 when you predict 7 as the last digit.
Liability & Risk Filters: Filter or highlight numbers exceeding a custom rupee payout ceiling or set threshold so high-exposure numbers stand out immediately.
3. Additional Smart Risk-Control Options:
Payout Liability Cap (₹): Cap retention by maximum rupee payout exposure per number rather than set count alone (e.g., retaining 1 Full ₹30,000 ticket or 2 Half ₹15,000 tickets for a ₹30,000 cap).
Percentage Split Mode: Split bookings proportionally (e.g., Retain 70% / Transfer 30%) on 1D/2D.
Spike & Cutoff Controls: Auto-flag multi-customer surges on the same number or tighten retention limits near draw cutoff time.
4.3 Company Transfer Copy Button, File Export & WhatsApp Sharing
1. Dedicated "Copy & Transfer to Company" Button:
Prominent, one-click "Copy & Transfer to Company" action button directly on the Transfer List panel (respecting any active transfer/board/number filters).
Clipboard Copy: Copies a clean, structured, plain-text transfer sheet (grouped by 4D, 3D Half/Full, 2D AB/BC/AC, and 1D A/B/C with exact set counts, draw/session header, and optional reason tags) directly to the device clipboard, with instant visual confirmation (e.g., "Copied to clipboard").
Direct Transfer / Dispatch Action: Marks the copied batch/tickets as "Transferred to Company" in the session log (with timestamp and batch reference), locks or flags those transferred set counts so they are not double-counted on subsequent copies, and optionally opens a WhatsApp share sheet / link (wa.me) or downloads a ready-to-send Company Transfer File (.txt / .csv) in a single click.
2. Live Counters & Liability Summary: Real-time totals for incoming sets, Retained Sets, Transfer Sets, and Current Liability Exposure (₹) based on the active prize money settings.
3. Persistence & Draw Controls:
Auto-save state, custom prize money values, transfer history, and filter rules to localStorage/IndexedDB in real time.
Export to CSV/Excel / TXT for company handoff and end-of-day reconciliation, plus a Reset Draw button (with confirmation) for the next draw.
5. Recommended Technical Architecture
Frontend: React / Next.js or Vanilla HTML/JS with Tailwind CSS, using reactive state so every filter, prize-money change, or parsed line updates the UI instantaneously.
OCR: Tesseract.js (client-side/offline) with optional cloud Vision API fallback for complex handwriting.
Storage: localStorage / IndexedDB for instant offline persistence, with optional backend sync (SQLite/PostgreSQL) if multi-device access is desired.
6. Acceptance Criteria (Real-Time Verification)
1. Live Prize Money Update: Changing 3D Full prize money from ₹30,000 to ₹35,000 immediately updates payout liability figures across all existing 3D Full tickets without reloading or re-pasting.
2. Live Filter & Ending-Digit Rule: Toggling Ending Digit 7 to transfer immediately moves matching 1D/2D/3D/4D tickets from Retained to Transfer in real time, and unchecking it immediately re-evaluates them in real time.
3. Live Retained Ticket Filtering: Typing a digit, board (BC, ABC), or tier (Half/Full) into the retained-ticket filter narrows the displayed retained tickets instantaneously.
4. Live Text & OCR Input: Pasting text or editing OCR output updates Retained, Transfer, and Liability totals on the fly.
5. Copy & Transfer to Company Button: Clicking Copy & Transfer to Company copies the formatted transfer list (or currently filtered transfer items) to the clipboard, shows instant confirmation, records the transfer batch/timestamp in the session state, and supports optional file export (.txt/.csv) or WhatsApp handoff.
1. Project Overview & Real-Time Objective
Build a fast, responsive web/mobile application for a retail 4-digit lottery booking agency where every action happens in real time with zero page reloads or manual recalculation steps. As soon as WhatsApp text is pasted, an image is OCR-extracted, or the operator edits Prize Money, Retention Rules, or Custom Filters, the system immediately recalculates:
Retained Book (tickets kept by the agency)
Transfer List (tickets forwarded to the main/upper distributor / company)
Payout Liability & Exposure (worst-case win amounts and net retained risk in ₹)
2. Core Game Structure & Board Mapping
Every 4-digit draw result is indexed by positional boards for the last three digits:
Full Number: X A B C (4 digits)
Board A: 2nd digit of the 4-digit result
Board B: 3rd digit of the 4-digit result
Board C: 4th (last) digit of the 4-digit result
3. Customizable Prize Money & Ticket Categories (Real-Time Editable)
All prize money figures and ticket price brackets must be editable by the operator at any time in real time (with sensible defaults pre-loaded). Changing a prize amount or price threshold immediately updates payout calculations across all existing and incoming tickets.
3.1 Single Digit (1D — Boards A, B, C)
Format: Single digit (0–9) mapped to board A, B, or C (e.g., A 5 x 20, B7 - 10 sets, C=3 (50)).
Custom Prize Money: Operator-configurable payout per winning set (editable in real time).
3.2 Two Digit (2D — AB, BC, AC, and All Board)
Format: 2-digit number (00–99) mapped to AB, BC, AC, or All Board (e.g., 27 All Board x 5).
All Board Expansion Rule: An All Board booking (e.g., 27) automatically expands in real time into three entries: AB 27, BC 27, and AC 27.
Custom Prize Money: Operator-configurable payout per winning set (editable in real time).
3.3 Three Digit (3D — ABC & Box)
Format: 3-digit number (000–999) representing boards ABC, either as a straight ticket or a Box ticket (e.g., 123 Box, 456 x 2).
Box Rotation Rule: When Box is specified, the 3 digits rotate automatically into all unique permutations:
3 distinct digits (e.g., 123) → 6 combinations (123, 132, 213, 231, 312, 321)
2 identical digits (e.g., 112) → 3 combinations (112, 121, 211)
3 identical digits (e.g., 777) → 1 combination (777)
Ticket Tier & Customizable Prize Structure:
Half Ticket: Default price < ₹48 (price threshold editable by operator); default prize = ₹15,000 (prize amount editable in real time).
Full Ticket: Default price ₹48 to ₹84 (price range editable by operator); default prize = ₹30,000 (prize amount editable in real time).
3.4 Four Digit (4D — Full Number)
Format: 4-digit number (0000–9999) (e.g., 4829 x 1).
Customizable Tiered Prize Structure (all amounts editable in real time):
All 4 digits match (XABC): Default ₹5,00,000 (5 Lakhs)
Last 3 digits match (ABC): Default ₹1,00,000 (1 Lakh)
Last 2 digits match (BC): Default ₹10,000
Last 1 digit matches (C): Default ₹1,000
4. Functional Requirements
4.1 Real-Time Input & Optical Character Recognition (OCR)
1. Live Text Parsing: As text is typed or pasted into the input box, entries parse immediately into structured tickets without needing a separate "Parse" click. Supports flexible separators (-, =, :, *, x, /, sets, nos, box, all).
2. Image Upload & Real-Time OCR:
Drag-and-drop or camera/file upload supporting .jpg, .png, and .webp WhatsApp images (screenshots, slips, handwritten notes).
OCR engine (Tesseract.js client-side or Vision API) extracts text and feeds it into the live parser; editing the extracted text immediately updates the sorted lists.
Unrecognized Line Queue: Any unparsed line appears immediately in a "Needs Review" list where fixing a typo or number updates the sort in real time.
4.2 Real-Time Custom Filters & Operator Controls
The operator must be able to filter, search, and customize retention rules on the fly, with instant live updates to both the Retained Book and Transfer List:
1. Custom Retention & Prize Money Panel (Live Configurator):
Edit prize money values for 1D, 2D, 3D Half, 3D Full, and 4D (4-match, 3-match, 2-match, 1-match) at any time.
Edit default retention limits (default: 50 sets for 1D, 10 sets for 2D, 1 set for 3D, 0 sets / 100% transfer for 4D).
Edit 3D ticket price cutoffs (default: < ₹48 Half, ₹48–₹84 Full).
2. Real-Time Retained-Ticket & Transfer Filters (Operator-Controlled):
Search & Number Filter: Filter retained or transferred tickets immediately by exact number, partial digits, board (A, B, C, AB, BC, AC, ABC, 4D), ticket tier (Half / Full), or customer tag.
Retained-Only / Transferred-Only / Both View Toggle: Switch or filter live to inspect only what is retained, only what is being transferred, or compare side-by-side.
Custom Rule / Override Filter (e.g., Ending Digit / Board / Guess Filter): Select specific ending digits (0–9), board positions (A, B, C), or specific numbers/ranges to force-transfer (100% or custom cap) or force-retain/cap in real time—for example, transferring all tickets ending in 7 when you predict 7 as the last digit.
Liability & Risk Filters: Filter or highlight numbers exceeding a custom rupee payout ceiling or set threshold so high-exposure numbers stand out immediately.
3. Additional Smart Risk-Control Options:
Payout Liability Cap (₹): Cap retention by maximum rupee payout exposure per number rather than set count alone (e.g., retaining 1 Full ₹30,000 ticket or 2 Half ₹15,000 tickets for a ₹30,000 cap).
Percentage Split Mode: Split bookings proportionally (e.g., Retain 70% / Transfer 30%) on 1D/2D.
Spike & Cutoff Controls: Auto-flag multi-customer surges on the same number or tighten retention limits near draw cutoff time.
4.3 Company Transfer Copy Button, File Export & WhatsApp Sharing
1. Dedicated "Copy & Transfer to Company" Button:
Prominent, one-click "Copy & Transfer to Company" action button directly on the Transfer List panel (respecting any active transfer/board/number filters).
Clipboard Copy: Copies a clean, structured, plain-text transfer sheet (grouped by 4D, 3D Half/Full, 2D AB/BC/AC, and 1D A/B/C with exact set counts, draw/session header, and optional reason tags) directly to the device clipboard, with instant visual confirmation (e.g., "Copied to clipboard").
Direct Transfer / Dispatch Action: Marks the copied batch/tickets as "Transferred to Company" in the session log (with timestamp and batch reference), locks or flags those transferred set counts so they are not double-counted on subsequent copies, and optionally opens a WhatsApp share sheet / link (wa.me) or downloads a ready-to-send Company Transfer File (.txt / .csv) in a single click.
2. Live Counters & Liability Summary: Real-time totals for incoming sets, Retained Sets, Transfer Sets, and Current Liability Exposure (₹) based on the active prize money settings.
3. Persistence & Draw Controls:
Auto-save state, custom prize money values, transfer history, and filter rules to localStorage/IndexedDB in real time.
Export to CSV/Excel / TXT for company handoff and end-of-day reconciliation, plus a Reset Draw button (with confirmation) for the next draw.
5. Recommended Technical Architecture
Frontend: React / Next.js or Vanilla HTML/JS with Tailwind CSS, using reactive state so every filter, prize-money change, or parsed line updates the UI instantaneously.
OCR: Tesseract.js (client-side/offline) with optional cloud Vision API fallback for complex handwriting.
Storage: localStorage / IndexedDB for instant offline persistence, with optional backend sync (SQLite/PostgreSQL) if multi-device access is desired.
6. Acceptance Criteria (Real-Time Verification)
1. Live Prize Money Update: Changing 3D Full prize money from ₹30,000 to ₹35,000 immediately updates payout liability figures across all existing 3D Full tickets without reloading or re-pasting.
2. Live Filter & Ending-Digit Rule: Toggling Ending Digit 7 to transfer immediately moves matching 1D/2D/3D/4D tickets from Retained to Transfer in real time, and unchecking it immediately re-evaluates them in real time.
3. Live Retained Ticket Filtering: Typing a digit, board (BC, ABC), or tier (Half/Full) into the retained-ticket filter narrows the displayed retained tickets instantaneously.
4. Live Text & OCR Input: Pasting text or editing OCR output updates Retained, Transfer, and Liability totals on the fly.
5. Copy & Transfer to Company Button: Clicking Copy & Transfer to Company copies the formatted transfer list (or currently filtered transfer items) to the clipboard, shows instant confirmation, records the transfer batch/timestamp in the session state, and supports optional file export (.txt/.csv) or WhatsApp handoff.
Apply on Freelancer →
Project sourced from Freelancer.com. Applications happen directly on the original platform — we never collect your data.