Pass-Exams

Platform Architecture

An overview of our scalable, privacy-by-design data model, from individual SaaS to a full Enterprise solution.

From SaaS to Enterprise
Our platform is built on a dual architecture that gracefully scales from serving individual users to powering large institutions. The diagrams below illustrate this evolution, enforced at every level by secure backend rules.
SaaS Model: User-Centric Sandbox
This model is designed for individual teachers, parents, and learners. Data is strictly partitioned by user.
// Database Markup Language (DBML) for Pass-Exams Platform
// This diagram illustrates our user-centric, sandboxed data model.

// The 'users' table is the root for all user-specific data.
// The 'id' is the Firebase Auth UID, acting as the primary key.
Table users {
  id varchar [primary key, note: 'Firebase Auth UID']
  email varchar [unique, not null]
  displayName varchar
  photoURL varchar
  createdAt timestamp
  subscriptionStatus varchar
  isCustomer boolean
}

// A sub-collection under 'users'.
// Stores custom quizzes created by a user.
Table exams {
  id varchar [primary key, note: 'Auto-generated ID']
  user_id varchar [not null, ref: > users.id]
  title varchar [not null]
  description text
  public boolean [default: false]
  createdAt timestamp
}

// A sub-collection under 'users'.
// Stores questions a user has bookmarked for review.
Table bookmarkedQuestions {
  question_id varchar [primary key, note: 'The ID of the bookmarked question']
  user_id varchar [not null, ref: > users.id]
  quiz_id varchar [not null]
  createdAt timestamp
}
View Interactive Diagram

The core principle here is **data isolation**. Each user's data—their custom exams and bookmarks—exists in a secure "sandbox" under their unique user ID. This is enforced by `firestore.rules`, making it impossible for one user to access another's data.

Architectural Evolution: When to Use a Vector Database
Our architecture is designed to evolve with our data needs. Here’s when and why a Vector DB becomes essential.
1

Phase 1: Current State (NoSQL Document DB)

Our current model uses Firestore, a NoSQL database perfect for storing structured data like user profiles, exam metadata, and bookmarks. It answers questions like: "Who is this user?" or "What did they bookmark?".

2

Phase 2: The Tipping Point (Semantic Search)

The architecture must evolve when we need to understand the *meaning* of unstructured data, like a student's written answer. This is the trigger for **Cognitive Variable #4: Semantic KPC Variance**. We need to measure how "semantically similar" a student's answer is to an ideal answer.

3

Phase 3: The Vector Database Solution

To solve this, we convert text into mathematical vectors (embeddings). A **Vector Database** is purpose-built to store these vectors and perform ultra-fast similarity searches. It allows us to ask: "How close in meaning is this student's answer to our expert-defined key points?" This measurement becomes a core part of their unique Cognitive ID.

Cognitive Biometrics: A New Data Asset
Our platform doesn't just track correct or incorrect answers. It measures *how* a user thinks, creating a unique "Cognitive Signature" from seven behavioral data points. This turns learning metrics into a new class of high-entropy data with applications in digital identity and security.
Cognitive VariableNeural/Pedagogical MetricMeasurement Mechanism
Decision Latency DeltaProcessing SpeedThe millisecond difference in response time between "Bookmarked" (hard) vs. "Non-Bookmarked" (easy) questions.
Heuristic Pathing (MCQ)Elimination LogicTracking mouse/touch movement patterns across the 4 MCQ options before selection.
Rationale Dwell-TimeReceptivity IndexTime spent reading the "Teaching Rationale" vs. the complexity (word count) of the text.
Semantic KPC VarianceLinguistic FingerprintIn text answers, measuring the linguistic distance between the user's vocabulary and the KPC (Key Point Checklist).
The Self-Correction PulseMetacognitive MonitoringFrequency and timing of "backspacing" or editing text-based answers before submission.
Topic Gravity (Bookmark Ratio)Intellectual TopographyThe specific distribution of bookmarks across 100+ topic tags.
Stamina Decay SlopeNeuro-EnduranceThe rate at which accuracy and latency change over a 2-hour session.

Application: The "Sovereign Learner" Identity

By measuring these metrics, our platform can verify a user not by what they know, but by *how* they know it. The unique combination of these cognitive variables forms a "Cognitive ID"—a high-entropy seed that is statistically unique to an individual's learning process. This data asset, owned by our institutional partners, has massive implications for high-stakes certification, identity verification, and next-generation data security.