Deploying Arsinous V8 Sales means copying the project’s source files into a Google Apps Script project attached to a Google Spreadsheet, wiring it to your MySQL database, and runningDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/arsinousltd-sudo/Arsinous-V8-Sales/llms.txt
Use this file to discover all available pages before exploring further.
onOpen once to grant the necessary permissions. The entire stack lives inside Google Workspace — no server deployment, no containers, no CI pipeline.
Prerequisites
Before you begin, make sure you have the following in place:- Google Workspace account — Required for the full Apps Script feature set (sidebar, JDBC, Drive API).
- MySQL database — Reachable on port 3306 from Google’s servers. Your database host must accept inbound connections from Google’s IP ranges, or you must configure an appropriate network allowlist.
- Google Drive folder — A Drive folder where new customer sub-folders will be created. Copy its folder ID from the URL (
https://drive.google.com/drive/folders/<FOLDER_ID>). - Invoice template spreadsheet — A Google Sheets file used as the invoice template. Copy its file ID from the URL.
- Invoice output folder — A second Drive folder where generated invoice spreadsheets will be saved.
The current
appsscript.json in this repository sets "runtimeVersion": "DEPRECATED_ES5". Before deploying, update this value to "V8" to enable the Chrome V8 engine and modern JavaScript syntax that the codebase is migrating toward. See Step 5 for the correct manifest content.Deployment Steps
Create a new Google Spreadsheet
Go to sheets.google.com and create a blank spreadsheet. Give it a recognisable name such as Arsinous V8 Sales.At this point the spreadsheet has one empty sheet. You will add the required tabs in Step 7.
Open the Apps Script editor
From the spreadsheet, navigate to Extensions → Apps Script. This opens the script editor bound to your spreadsheet.Delete the default empty
Code.gs file that is created automatically — the Arsinous project uses its own file structure.Copy all .gs script files
Create each file in the Apps Script editor using File → New → Script file, then paste the contents of the corresponding source file.The full list of script files to create, in order:
| File path in editor | Source file |
|---|---|
Constants | Constants.gs |
onOpen | onOpen.gs |
onEdit | onEdit.gs |
Discounts | Discounts.gs |
Formulas | Formulas.gs |
SoA | SoA.gs |
Updates | Updates.gs |
Customer/backend | Customer/backend.gs |
product/backend | product/backend.gs |
invoice/backend | invoice/backend.gs |
Payment/backend | Payment/backend.gs |
sidebar/backend | sidebar/backend.gs |
DB/getFrom | DB/getFrom.gs |
DB/saveTo | DB/saveTo.gs |
Copy all HTML files
Create each HTML file using File → New → HTML file, then paste the corresponding source.
These files are served by
| File name in editor | Source file |
|---|---|
Customer/index | Customer/index.html |
product/index | product/index.html |
invoice/index | invoice/index.html |
Payment/index | Payment/index.html |
sidebar/index | sidebar/index.html |
HtmlService.createHtmlOutputFromFile() and render the Vue.js / Vuetify modal dialogs and sidebar.Configure appsscript.json
In the Apps Script editor, enable the manifest file view via Project Settings → Show Key fields:
appsscript.json manifest file. Replace the entire contents with:appsscript.json
| Field | Value | Notes |
|---|---|---|
timeZone | "Europe/Paris" | Controls date formatting across all sheets. Change to match your locale if needed. |
exceptionLogging | "STACKDRIVER" | Sends script errors to Google Cloud Logging for easier debugging. |
runtimeVersion | "V8" | Enables the Chrome V8 JavaScript engine. The source repository currently ships "DEPRECATED_ES5" — this must be changed before use. |
The repository’s
appsscript.json ships with "runtimeVersion": "DEPRECATED_ES5". This is an in-progress V8 migration. Set the value to "V8" as shown above. If you encounter any compatibility issues after switching, check the Apps Script V8 migration guide for syntax differences.Edit Constants.gs with your credentials
Open the See the Configuration reference for a full description of every constant.
Constants file in the Apps Script editor and replace the placeholder values with your real configuration:Constants.gs
Create the required Google Sheets tabs
Back in the spreadsheet, create nine tabs with exactly these names (spelling and capitalisation matter — the scripts reference them by name):
Rename the default
| Tab Name | Purpose |
|---|---|
Customers | Customer list synced from MySQL |
Products | Product catalog synced from MySQL |
Invoices | Invoice list for the selected date range |
Inventory | Stock levels with lots and expiry dates |
Discounts | Per-customer product discounts |
Balance | Statement of Account for one customer |
All Balances | Outstanding balances for all customers |
P&D | Payments & Deposits filtered view |
SoA Inputs | Inputs for the Statement of Account query |
Sheet1 tab to Customers, then add the remaining eight tabs using the + button at the bottom of the spreadsheet.Authorize and run onOpen for the first time
In the Apps Script editor, select the
onOpen function from the function dropdown at the top of the toolbar, then click Run.Google will prompt you to review and grant the required OAuth permissions:- See, edit, create, and delete your spreadsheets
- Connect to an external service (JDBC / MySQL)
- See and manage files in your Google Drive
- Display and run third-party web content in prompts and sidebars
Verifying the Installation
OnceonOpen has run successfully:
- The Arsinous menu is visible in the spreadsheet menu bar.
- The sidebar panel opens on the right side of the screen.
- Clicking Arsinous → Update Current Tab while on the
Customerstab pulls customer records from MySQL and populates the sheet.
Constants.gs are correct.