1
Foundation & Auth
Build a Google Apps Script web app — Sales & Inventory Management System. Two files: Code.gs + index.html (React 18 via CDN, DataTables, SweetAlert2, Chart.js, Font Awesome). Navy Blue theme (#001f3f / #0074D9), collapsible sidebar, skeleton loaders, mobile friendly.
Create sheets: Users (userId, fullName, emailAddress, passwordPlain, phoneNumber, userRole, accountStatus, createdAt, updatedAt, lastLoginAt, profileImageUrl), ActivityLogs, AppSettings (key/value — applicationName, currencySymbol, logoUrl, aiProvider, geminiApiKey, openaiApiKey).
Write utility helpers with clear names: getSheetByName, readAllRows, generateNextId, findRowByColumn, currentIsoTimestamp, cacheOrCompute, invalidateAllCaches, recordActivityLog.
Server functions: authenticateUser, getAllUsers, createUser, updateUserDetails, deleteUserAccount, toggleUserAccountStatus, getCurrentUserProfile, changeMyPassword, getPublicAppSettings, getAdminAppSettings, saveAppSettings, uploadApplicationLogo.
Frontend: login screen, dashboard shell with sidebar (Users / Profile / Settings), SweetAlert2 for all dialogs, google.script.run for all AJAX, pass userId+userRole on every call. Seed one admin user.