Zen Classy is a production-grade, multi-tenant academic portal designed for extreme scalability and zero-maintenance deployment. It transforms a standard Single Page Application (SPA) into a fully automated SaaS platform without requiring traditional, expensive backend infrastructure.
Instead of a centralized SQL database, Zen Classy utilizes a Hub-and-Spoke Serverless Router built on Google Apps Script, dynamically distributing encrypted data across isolated, tenant-specific Google Sheets.
Traditional Google Sheets backends fail at scale because they hardcode a single Sheet ID. Zen Classy solves this by implementing a powerful Gateway API pattern:
- The Master Registry: A central, highly-secured Hub that maps
Class Codesto specific, isolated Google Sheet IDs. - The Dynamic Router: A single serverless endpoint that intercepts the frontend payload, queries the Master Registry, and dynamically routes the execution environment to the correct tenant's database on the fly.
- Self-Service Provisioning: Teachers can generate their own database using a provided AI prompt, paste the resulting ID into the frontend UI, and the Router will automatically configure their master admin account and bring their ecosystem online.
- Multi-Tenant Isolation: Complete data separation. Class A's data is physically isolated from Class B's data at the file level.
- Strict-Mode Cryptographic Auth: Plaintext fallback is permanently disabled. Passwords are XOR-encrypted into raw byte arrays and evaluated strictly in server memory, bypassing native Google
newBlob()engine flaws. - Automated SaaS Onboarding: Zero-touch deployment for new institutes directly via the UI.
- Dynamic QR Attendance: Auto-refreshing cryptographic QR codes projected by the admin, scanned natively by student mobile devices.
- Granular Role-Based Access: Native separation of privileges between
AdminandStudentroles. - System Killswitch: Global "Offline Mode" toggle to lock all student traffic out of a specific tenant database during maintenance.
- Frontend: HTML5, Tailwind CSS (via CDN), Vanilla JavaScript (ES6+).
- Architecture: SPA (Single Page Application) with custom DOM injection and state management.
- Gateway/Backend: Google Apps Script (V8 Engine).
- Database: Distributed Google Sheets via dynamic
SpreadsheetApp.openById()routing.
- Create a blank Google Sheet named
SaaS Master Registry. - Rename the first tab to
Registryand set row 1 headers:Class Code|Sheet ID|Status. - Save the specific Google Sheet ID from the URL.
- Open the
code.gsfile in Google Apps Script. - Inject your Master Registry ID into the
MASTER_REGISTRY_IDvariable. - Set your cryptographic
DEVELOPER_KEYandADMIN_SECRET. - Deploy as a Web App (Execute as: Me, Access: Anyone).
- Copy the generated Web App URL.
- Open
js/api.js. - Replace the
API_URLvariable with your newly deployed Web App URL. - Host the repository on GitHub Pages, Vercel, or Netlify.
- Use the "Register New Institute" button on the live site to provision your first database!
This platform relies on Google's native OAuth and file-sharing permissions to secure the distributed databases. Ensure that tenant databases are shared only with the developer email that deployed the Master Router. The frontend never sees or transmits the raw database ID after the initial onboarding step.
Architected and engineered by zen-ash-dev.