Engineering Case StudySaaS CMS

Multi-Tenant SaaS Architecture

A specialized College Management System built on the MERN stack. Featuring a strict 4-tier Hierarchical Access Control and a K-Means productivity engine to analyze student engagement.

01

Features & Tech Stack

SaaS CMS delivers a structured ecosystem for multi-college management with deep data isolation and intelligent performance tracking.

  • Productivity Engine (Attendance + Bi-Weekly Reports)
  • Hierarchy-Based Access Control (Admin, Manager, Principle, Teacher)
  • Multi-College Data Isolation
  • Automated Fees Management System

Core Stack (MERN)

FrontendReact.js, Tailwind
BackendNode.js, Express
DatabaseMongoDB
ML LogicK-Means Clustering
02

The Core Problem

Managerial Overhead

Managing multiple educational institutions under one umbrella often leads to data leakage, chaotic permissions, and vague metrics for student success.

Existing systems often lack granular hierarchy control. A super-admin needs global reach, but managers and principles require strictly siloed access. Furthermore, student "productivity" is usually measured only at semester-end. SaaS CMS solves this by enforcing a 4-tier security ladder and using continuous data (attendance and bi-weekly faculty reports) to drive a real-time productivity engine.

03

Deep Dive: Core Features

Feature 1: 4-Tier Hierarchy Access Control

Designed a strict role-based system using custom middleware to intercept requests based on user type and college IDs.

  • Admin: Super admin with full, unrestricted access to all colleges across the platform.
  • Manager: Created by the Admin, granted full access to only a specific assigned group of colleges.
  • Principle: Localized authority with full access restricted to one single college.
  • Teacher: Operational role strictly for managing attendance and submitting bi-weekly reports for one college.

Feature 2: The Productivity Engine

To move beyond static grades, I implemented an engine that calculates student productivity dynamically based on two primary continuous metrics.

Data Inputs

Constantly aggregates daily attendance percentages alongside the subjective scores from bi-weekly teacher reports.

K-Means Categorization

Uses K-Means to cluster these inputs, instantly tagging students (e.g., High-Performers, At-Risk) for principles and managers to monitor.

04

Implementation & Workflow

Breaking down the core logic of student analysis and institutional security.

1. Hierarchical Data Guard

Every API endpoint is protected by JWT validation and a Role Interceptor. A Manager's token contains an array of assigned college_ids, while a Principle's token is locked to one. MongoDB queries are automatically appended with these IDs at the middleware level, preventing any cross-college data leaks even if an API is accessed directly.

2. Student Productivity Lifecycle

Teachers log attendance and submit bi-weekly reports directly into MongoDB document stores. A scheduled cron job fetches these arrays, normalizes the values into a 2D vector [Attendance, ReportScore], and executes the K-Means algorithm to update the student's productivity status tag in real-time.

05

Future Roadmap

Mobile App

React Native port for instant teacher attendance logging.

Predictive ML

LTSM models to predict semester end-results based on bi-weekly trends.

Financial AI

Automated fee reminders and dynamic scholarship allocation.

06

Enterprise Perspective: Scaling SaaS

"How does this hierarchy compare to enterprise ERPs like Workday or SAP?"

Multi-Tenancy

SaaS CMS: Logical isolation via MongoDB collections and college_ids array mapping.

Enterprise: Physical isolation via separate DB instances for high-tier tenants.

User Hierarchy

SaaS CMS: 4 rigid roles (Admin, Manager, Principle, Teacher) ensuring strict lateral boundaries.

Enterprise: Dynamic Policy-Based Access Control (PBAC) defined at runtime.

Intelligence

SaaS CMS: K-Means clustering on continuous attendance/report metrics.

Enterprise: Deep Learning models utilizing sentiment analysis on student feedback.

07

Business & Monetization

B2B SaaS

Per-college subscription model targeted at large educational trusts managing multiple branches.

Premium Modules

Upselling the Productivity Engine for deep analytical insights to Principals and Managers.

Integration APIs

API access for external library and hostel management services.

Let's Connect

Get In Touch

I'm always open to discussing new opportunities, exciting projects, or just having a chat about technology. Feel free to reach out!