Google Sheets-backed monthly target planning across field teams, dealers, territories, and products.
Architecture | Setup | Security | Portfolio | Related: Sales Intelligence Platform
The Target & Analytics Portal is a sheet-bound Apps Script web application for monthly planning and submission. Territory sales managers enter dealer and product targets through a matrix interface, review totals, save submissions, and generate print-ready reports. Administrators view aggregated target and sales performance across the hierarchy.
The repository contains application logic and UI only. It does not contain the operational spreadsheet or production data.
- TSM and administrator role flows
- Month selection and submission history
- Dealer-by-product target matrix with totals
- Hierarchy, product, ledger, and sales sheet adapters
- Server-side session tokens cached by Apps Script
- Idempotent monthly target persistence
- Administrator filtering and analytics views
- Printable submission reports
- Responsive web UI and PWA manifest/service worker assets
flowchart LR
User[TSM or admin] --> Web[Apps Script HTML web app]
Web --> API[google.script.run functions]
API --> Auth[Sheet-backed authentication]
API --> Sheets[(Bound Google Spreadsheet)]
Sheets --> Masters[Users, hierarchy, products]
Sheets --> Ledger[Monthly target ledger]
Sheets --> Sales[Sales values]
Ledger --> Reports[Dashboard and print reports]
Sales --> Reports
The bound spreadsheet must provide:
User_MasterHierarchy_MasterProduct_MasterMonthly_LedgerSales_Value
The ledger uses two header rows and begins data on row three. Review SHEET_NAMES and LEDGER_LAYOUT in Code.js before connecting a new spreadsheet.
Code.js Server entry points, auth, domain services, and sheet access
Index.html Responsive target and admin application
PrintView.html Printable submission layout
manifest.json PWA metadata
service-worker.js PWA asset caching
appsscript.json Apps Script runtime and web-app configuration
- Create a development Google Spreadsheet with synthetic data and the required sheets.
- Create or bind an Apps Script project.
- Update
.clasp.jsonto the intended development script ID. - Run
clasp login,clasp status, andclasp push. - Deploy as a web app and review the access setting before sharing the URL.
- Test both TSM and admin flows, target persistence, history, and print output.
This repository has no automated test suite or standalone build. JavaScript syntax can be checked locally with Node, but functional verification requires Apps Script and a synthetic spreadsheet matching the documented contract.
- User passwords are compared as sheet values and are not securely hashed.
- The web-app manifest permits anonymous access to the deployment entry point.
- Session security depends on Apps Script cache behavior and the custom role checks.
- Spreadsheet schemas are implicit in code rather than versioned fixtures or migrations.
- No automated tests, audit trail specification, or deployment CI exists.
- The product naming and data model may be employer-specific.
Because of these limitations, consider making the repository private unless its business context and authentication model are replaced with portfolio-safe equivalents.
Read SECURITY.md. Use synthetic dealers, employees, products, targets, and sales values in every public artifact. No open-source license is currently declared; reuse rights are not granted until a license is added by the owner.
Md. Masum Billah | Data Analyst, Automation Developer, and Business Intelligence Specialist
Portfolio | GitHub | Email | Documentation | Related: Sales Intelligence Platform
