Skip to content

About

Apps Script target planning portal for monthly team, dealer, territory, and product workflows.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Target & Analytics Portal

Google Sheets-backed monthly target planning across field teams, dealers, territories, and products.

Target and Analytics Portal social preview

Status Runtime Platform

Architecture | Setup | Security | Portfolio | Related: Sales Intelligence Platform

Overview

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.

Implemented Features

  • 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

Architecture

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
Loading

Spreadsheet Contract

The bound spreadsheet must provide:

  • User_Master
  • Hierarchy_Master
  • Product_Master
  • Monthly_Ledger
  • Sales_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.

Repository Structure

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

Deployment

  1. Create a development Google Spreadsheet with synthetic data and the required sheets.
  2. Create or bind an Apps Script project.
  3. Update .clasp.json to the intended development script ID.
  4. Run clasp login, clasp status, and clasp push.
  5. Deploy as a web app and review the access setting before sharing the URL.
  6. Test both TSM and admin flows, target persistence, history, and print output.

Verification

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.

Known Limitations

  • 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.

Contributing and License

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

About

Apps Script target planning portal for monthly team, dealer, territory, and product workflows.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages