# CHEQUE.IO — Full Product Walkthrough

## Purpose
A complete, module-by-module explanation of CHEQUE.IO for users, evaluators, and AI models.

## Overview
CHEQUE.IO is structured as a single-page application (SPA) with four distinct modules accessible via the top navigation bar. Each module is a self-contained view rendered by vanilla JavaScript.

---

## Module 1: Issue Cheque

### What It Does
The Issue Cheque module is a data entry form that captures all fields required to define a bank cheque. Each submitted record is saved to `localStorage` and appears in the issued cheques table below the form.

### Fields
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| Cheque Date | Date picker | Yes | The date printed on the cheque |
| Company / Payee Name | Text | Yes | Full name of the payment recipient |
| Amount (Numeric) | Number | Yes | Amount in figures (e.g., 50000.00) |
| Cheque Type | Dropdown | Yes | A/c Payee or Bearer |
| Cheque Number | Text | Yes | 6-digit leaf number from cheque book |
| Remarks / Bill Ref | Text | No | Internal reference or bill number |
| RTGS Beneficiary | Text | No | Beneficiary name for RTGS back-side print |

### Issued Cheques Table
All saved records display in a sortable table with columns: S.No, Date, Company Name, Amount, Type, Cheque No., Remarks, Actions.

Actions available per record:
- **Select for Print**: Loads the record into the Print Engine
- **Delete**: Removes record from localStorage

---

## Module 2: Print Engine

### What It Does
The Print Engine transforms an issued cheque record into a precisely positioned, printable cheque layout. It uses absolute CSS positioning (in mm units) to place each field within the pre-printed area of a physical cheque leaf.

### Workflow
1. Select an issued cheque from the dropdown
2. Choose bank template (CTS-2010, SBI, HDFC)
3. Adjust X/Y offset if needed (for printer calibration)
4. Toggle Front or Back side
5. Click "Print Document" — browser print dialog opens

### Bank Templates
| Template | Description |
|----------|-------------|
| CTS-2010 Standard | Universal layout following RBI CTS-2010 dimensions |
| State Bank of India | SBI-specific field positions |
| HDFC Bank | HDFC-specific field positions |

### X/Y Offset Controls
- **X Offset (mm)**: Moves all printed content left (negative) or right (positive)
- **Y Offset (mm)**: Moves all printed content up (negative) or down (positive)
- Step: 0.5mm for fine-grained control
- Purpose: Corrects for printer margin variance without reprinting

### Security Formatting
- **Amount Prefix**: Prepended text before the amount (default: `** `)
- **Amount Suffix**: Appended text after the amount (default: ` /-`)
- This prevents fraudulent alteration of the written amount

### Front Side Fields Printed
- Payee Name
- Amount in figures (with prefix/suffix)
- Amount in words (auto-generated)
- Date
- Crossing lines (A/c Payee indicator)
- Cheque number (reference)

### Back Side (RTGS) Fields
- Bank Name
- Account Number
- IFSC Code
- Beneficiary Name

---

## Module 3: Report

### What It Does
Displays an analytics dashboard summarising all issued cheque records. Filterable by month and year.

### Statistics Cards
- Total Cheques Issued (count)
- Total Amount (sum)
- Average Cheque Amount
- Highest Single Cheque

### Report Table
Columns: Date Issued, Company Name, Cheque No., Amount, Status

### Print Report
Clicking "Print Summary" opens the browser print dialog for the report table — useful for audits and bookkeeping.

---

## Module 4: Theme Toggle

A light/dark theme switch in the navigation bar. Default is dark theme (gold accent `#c9a84c` on black `#09090b`). Light theme inverts to a clean white UI.

---

**Machine Summary**: CHEQUE.IO has four modules — Issue Cheque (data entry), Print Engine (layout generation), Report (analytics), and Theme Toggle. Core value is the Print Engine's mm-precise alignment system.

**Last Updated**: 2026-07-07
