Skip to main content

Building ThinkGrades: From Idea to School Operating System

How we architected and engineered ThinkGrades OS—a multi-tenant AI-native platform designed to unify school attendance, exams, fees, parent communication, and analytics.

Durgesh Tanwar
Durgesh Tanwar Founder & Lead Architect
Published February 15, 2026 8 min read
ThinkGrades Operating System Architecture

When educational institutions rely on fragmented spreadsheets, paper registers, legacy ERP software, and disconnected messaging apps, administrative friction compounds daily.

Teachers spend valuable hours manually re-keying scores into Excel sheets, school administrators lack real-time visibility into academic trends, and parents receive delayed progress reports weeks after academic terms conclude.

We engineered ThinkGrades OS (thinkgrades.in) to solve this problem—building an AI-native multi-tenant school operating system that unifies attendance, exams, fee ledgers, parent communication, and contextual analytics into one platform.

Core Stack:
Next.js App Router Supabase PostgreSQL Row-Level Security (RLS) Tailwind CSS v4 Teacher & Parent PWAs Puppeteer PDF Engine

1. Moving from Passive ERP to Active School OS

Traditional school software acts as a passive database where administrators manually fill form-heavy screens. ThinkGrades behaves as an active operating system—where routine administrative events automatically trigger downstream calculations and notifications.

Traditional School ERP

  • Passive database record storage
  • Form-heavy, complex admin UI screens
  • Siloed modules requiring re-entry
  • Delayed end-of-term reporting cycles

ThinkGrades Active OS

  • Event-driven academic workflow triggers
  • Role-specific interfaces (Admin, Teacher PWA, Parent PWA)
  • Automated mark processing & fee receipts
  • Real-time diagnostic AI copilot

2. Multi-Tenant Row Level Security (RLS) Isolation

One of our primary architectural challenges was ensuring strict data boundaries between different school tenants sharing the same SaaS infrastructure.

🚨 Tenant Security Policy

Tenant isolation in ThinkGrades is enforced directly at the database layer using PostgreSQL Row-Level Security (RLS) policies in Supabase. Database queries evaluate active school membership context automatically.

ThinkGrades Data Isolation Flow
Step 1 Client Request Teacher or Admin makes request via Next.js App Router
Step 2 Session & RBAC Middleware Validates JWT session and active school tenant ID
Step 3 PostgreSQL RLS Policy Enforces WHERE school_id = auth.current_school()
Step 4 Isolated Result Set Returns query data strictly scoped to active institution

3. Modeling Flexible Academic Assessments

School marksheets vary greatly across institutions and subjects—mixing theory, oral, and practical components alongside dynamic grading boundaries.

Rather than hardcoding flat score fields, we modeled marks as flexible relational schema arrays:

  • Assessment Components: Theory (70%), Practical (30%), Oral (10%)
  • Grading Scales: Percentage boundaries, GPA weightages, letter grades
  • Automated Aggregations: Instant term calculation engines running via server functions

4. Dedicated Mobile Teacher & Parent PWAs

Desktop dashboards become unusable when teachers are in busy classroom environments. We built lightweight, dedicated Progressive Web Apps (PWAs) tailored specifically for touch ergonomics and high-frequency actions:

  1. Teacher Mobile PWA: Optimized for rapid 1-tap classroom attendance marking and mobile mark entry.
  2. Parent Portal PWA: Designed for real-time progress feeds, attendance updates, and digital fee receipts.

Key Engineering Takeaways

Building ThinkGrades reinforced three core principles for our team:

  1. Complex workflows need simple interfaces: Keep system complexity inside database schema and server handlers—never on the user’s screen.
  2. Different roles require different apps: An administrator desktop dashboard cannot simply be shrunk down and called a mobile app for teachers or parents.
  3. Architecture choices dictate product velocity: Establishing multi-tenancy and RLS policies early enabled rapid feature expansion without security regression risks.
💡 Explore ThinkGrades

Experience the live product at thinkgrades.in or read our detailed Architecture Case Study.

Tags: #Next.js #Supabase #Multi-Tenant #SaaS #PostgreSQL #PWA
Durgesh Tanwar
Durgesh Tanwar Founder & Lead Architect at Tectrom

Architecting multi-tenant SaaS systems, AI-powered software, and scalable platforms.

Related Articles

View All →
Engineering Journal Digest

Subscribe to Product Engineering Insights

Get our latest deep dives into multi-tenant SaaS architecture, AI workflows, Next.js performance, and production software lessons delivered to your inbox. No spam ever.