Skip to content
cosmiccoder200x-sysPublic

About

A smart learning platform for engineering students that brings the complete syllabus, practice questions, PYQs, AI-powered learning, revision, progress tracking, and personalized study tools into one place.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Modulr

Adaptive university exam-learning platform for TKM College of Engineering (KTU 2024 Scheme, Semesters S3–S8). Transforms official syllabus, previous-year questions (PYQs), student mastery, mistakes, and study time into personalized, high-yield learning sessions.

Next.js TypeScript Vitest KTU Scheme Static Pages Zero Backend


The Problem

Engineering students typically have all the raw materials and none of the direction:

  • A massive official university syllabus with no guidance on high-yield revision
  • Scattered lecture notes that don't reflect actual KTU exam mark distributions
  • Previous-year questions (PYQs) disconnected from specific syllabus topics
  • Illusions of competence: topics students think they know but consistently fail in exams
  • Critical time scarcity during semester internals and university finals

Nobody tells students what to study next. They guess, passively re-read familiar material, or avoid their weakest modules entirely.

Modulr replaces that guesswork with a deterministic decision engine. It evaluates the student's syllabus coverage, mapped PYQs, current mastery level, unresolved mistakes, and spaced revision schedule to recommend exactly one single action with a transparent pedagogical reason.


Core Learning Loop

The engine implements an active, evidence-driven learning loop:

                 ┌─────────────────────────────────┐
                 │       ACADEMIC SYLLABUS         │
                 │   (KTU 2024 Scheme S3–S8)       │
                 └────────────────┬────────────────┘
                                  │
                                  ▼
┌──────────────┐          ┌──────────────┐          ┌─────────────────────┐
│ EXAM PYQS    │ ───────► │   DECISION   │ ◄─────── │   LEARNING STATE    │
│ (Topic Mapped)          │    ENGINE    │          │ (0–6 Mastery / Fix) │
└──────────────┘          └───────┬──────┘          └─────────────────────┘
                                  │
                   One Defensible Next Action
                                  │
         ┌────────────┬───────────┼───────────┬────────────┐
         ▼            ▼           ▼           ▼            ▼
     [ TEACH ]   [ RECALL ]  [ PRACTICE ]  [ FIX ]     [ EXAM ]
     Zero-to-Pro    Spaced      PYQ Drill   Mistake    Day-Before
     Foundation   Revision                  Repair    Attack Mode
         │            │           │           │            │
         └────────────┴───────────┼───────────┴────────────┘
                                  │
                                  ▼
                       ┌─────────────────────┐
                       │  TIMED STUDY PLAN   │
                       │ (15 / 30 / 45 / 60) │
                       └──────────┬──────────┘
                                  │
                                  ▼
                       ┌─────────────────────┐
                       │ CONTEXTUAL PROMPT   │
                       │  + 1-Click Launch   │
                       │ (ChatGPT/Claude/Gem)│
                       └──────────┬──────────┘
                                  │
                                  ▼
                       ┌─────────────────────┐
                       │  EVALUATED EVIDENCE │
                       │ (Strong / Partial / │
                       │     Struggled)      │
                       └──────────┬──────────┘
                                  │
                                  ▼
                       ┌─────────────────────┐
                       │   MASTERY UPDATE    │
                       │    (0–6 Integer)    │
                       └─────────────────────┘

The loop is closed: every study session ends in concrete recorded evidence. Evidence drives mastery, and mastery updates the next recommendation.


Key Features & Capabilities

1. Deterministic Decision Engine (decideNextAction)

  • Pure Function: Given the same academic state, it yields the exact same recommendation. No hidden clock dependencies, no stochastic drift, and no random suggestions.
  • Five Specialized Task Types:
    • TEACH – Structural concept introduction using the Zero-to-Pro teaching chain for unstudied topics.
    • RECALL – Active spaced retrieval for concepts whose memory half-life has elapsed.
    • PRACTICE – Targeted PYQ applications for concepts started but not yet solidified.
    • FIX – High-priority diagnostic sessions specifically targeting recorded student mistakes.
    • EXAM – High-yield university exam attack plan when a subject is broadly assessed.
  • Transparent Reasoning: Every recommendation explicitly tells the student why it was chosen (e.g., "You made 2 mistakes in Module 2 that require fixing before moving forward").

2. Day-Before Exam Attack Mode

Integrated directly into every subject page for high-stakes, time-constrained revision:

  • 5 Adaptive Time Brackets:
    • < 1 Hour: Ultra-high-yield recall only (critical definitions, core formulas, must-know traps).
    • 1–3 Hours: Essential concepts + top recurring KTU question patterns + scoring edge cases.
    • 3–6 Hours: High-yield syllabus roadmap + prioritized PYQ drill + targeted weak module repair.
    • 6–10 Hours: Comprehensive high-yield attack plan + exam-format practice + concept reconstruction.
    • 10+ Hours: Deep high-yield mastery + full simulated mock test + final memory consolidation.
  • Priority Scoring Engine: Classifies modules into Tier A (Must-Pass High Yield), Tier B (Core Standard), and Tier C (Buffer/Niche) based on formula density, exam focus weightage, definition density, and mapped PYQ volume.

3. Interactive Live Study Timer & 1-Click AI Launchers

  • Built-in Session Timer: Active-phase countdown timer with visual pulsing status, pause/resume controls, and completion sound alerts.
  • 1-Click External AI Launchers:
    • ChatGPT: Direct launch via https://chatgpt.com/?q=... with pre-filled prompt.
    • Claude: Direct launch via https://claude.ai/new?q=... with pre-filled prompt.
    • Gemini: Automated clipboard copy with instant link to https://gemini.google.com/app.
  • Popup-Safe Navigation: Uses native anchor navigation to prevent browser popup blockers from interrupting the study flow.

4. Learn CS Catalog & High-Yield Pedagogical Standard

A curated library of 30 core computer science disciplines and 200+ topics, engineered around a 9-stage pedagogical pipeline:

MAP → PRIORITIZE → LEARN → APPLY → RECALL → CHECK → REPAIR → CONNECT → MASTER
  • Experience Tiers: Beginner (mental models, zero jargon), Intermediate (high-yield per minute, core implementations), and Advanced (systems intuition, architectural tradeoffs, edge cases).
  • Targeted Goals: Concept Understanding, University Exams, Technical Interviews, Problem Solving (DSA), and Real-World Projects.
  • Pedagogical Styles: Simple Intuition, Socratic Dialogue, Question → Discovery, Visual/Spatial ASCII Models, Code-First Tracing, and Rigorous Theory-First.

5. External AI Handoff & Academic Honesty Protocol

Modulr intentionally runs no proprietary server-side LLMs. Instead, it generates context-rich, provider-agnostic study prompts for students to use with their favorite frontier models:

  • Zero API Costs & Zero Keys: Students don't need API subscriptions, tokens, or configuration.
  • 100% Inspectable Prompts: Students see and control the exact academic instructions given to the AI.
  • Official Syllabus Verification Instruction: Prompts mandate that the external AI verify facts against official TKM College of Engineering records (https://tkmce.ac.in/) when uncertain.
  • PYQ Honesty Directive: Prevents AI hallucinations by strictly distinguishing verified KTU previous-year questions from synthesized practice questions.

6. Rigorous 0–6 Mastery Model

Mastery is an integer scale from 0 to 6 that is deliberately conservative and difficult to move:

  • Opening a lesson awards 0 mastery. It records exposure only; mastery remains null.
  • Reading a note does not equal mastery. TEACH sessions register exposure, not verified proof.
  • Evidence drives mastery:
    • strong outcome (correct without hints) → increments mastery.
    • partial outcome (needed prompting or partial recall) → minor adjustment.
    • struggled outcome (fundamental confusion) → decreases score and schedules a FIX session.
  • Different evidence weights: Active recall and verified PYQ success move mastery significantly faster than simple self-assessment checks.
  • Honest Unassessed State: Displayed as 0% (Unassessed) — not failed.

7. Program-Scoped Academic Domain Model

  • Course codes are not globally unique in the KTU 2024 scheme (e.g., 24CSP304 is Algorithms in CSE, but Data Structures & Algorithms in CSE [AI]).
  • Academic identity is strictly program-scoped: (programId, subjectCode) with stable namespaced identifiers across all routes, storage, and cross-links.

Academic Coverage (KTU 2024 Scheme)

Full curriculum representation across 259 subjects spanning Semesters S3 through S8:

Program Stream Name Subjects Route Slug
CS Computer Science & Engineering 108 /syllabus/cse
CS_AI Computer Science & Engineering (Artificial Intelligence) 113 /syllabus/cse-ai
ER Electrical & Computer Engineering 38 /syllabus/er
Total KTU 2024 Scheme (S3–S8) 259

Architecture & Data Flow

flowchart TD
    subgraph DataLayer [Data Layer - Build-time Static]
        A[Official KTU Syllabus] --> B[Syllabus Parser]
        B --> C[Curriculum Registry]
        D[PYQ Repository] --> E[Token Overlap Matcher]
        E --> F[Mapped PYQs]
    end

    subgraph StateLayer [Client-Side State - localStorage]
        G[Topic Mastery 0-6]
        H[Open Mistakes Ledger]
        I[Revision-Due Timestamps]
        J[Session History]
    end

    subgraph Engine [Core Engines]
        C --> K[Decision Engine]
        F --> K
        G --> K
        H --> K
        I --> K
        K --> L{Recommended Action}
        L -->|Unstarted| M[TEACH]
        L -->|Due| N[RECALL]
        L -->|Weak| O[PRACTICE]
        L -->|Mistake| P[FIX]
        L -->|Assessed| Q[EXAM]
        
        L --> R[Session Planner]
        R --> S[Contextual Prompt Engine]
    end

    subgraph Execution [Active Study Execution]
        S --> T[1-Click AI Launchers]
        T --> U[ChatGPT / Claude / Gemini]
        R --> V[Live Study Timer]
        U --> W[Study & Self-Evaluation]
        V --> W
        W --> X[Session Evidence Logger]
    end

    X --> G
    X --> H
    X --> I
    X --> J
Loading

Layered Codebase Structure

UI Layer               app/ (App Router), components/subject/, components/navigation/
      │
Learning Engine        lib/learning/ (decision.ts, session.ts, mastery.ts, state.ts)
      │
Prompt Engine          lib/learning/prompts/, lib/prompts/dayBeforeExam.ts, lib/learn-cs/ai.ts
      │
Academic Data          lib/syllabusData.ts, lib/content.ts, lib/pyqs.ts, lib/notes/
      │
Domain Foundations     lib/domain.ts, lib/types.ts, lib/urls.ts

Tech Stack

Component Technology Version Purpose
Framework Next.js (App Router) 14.2.35 Static Site Generation (1607 pre-rendered HTML pages)
UI Library React ^18.3.1 Component composition and reactive state
Language TypeScript ^5.5.4 Strict typing, shared domain models, zero any
Styling Tailwind CSS ^3.4.7 Utility styling with semantic CSS variable design tokens
Testing Vitest ^2.1.9 180 unit, integration, and idempotency tests across 16 suites
Linting ESLint ^8.57.1 Code standards via eslint-config-next
Persistence Browser localStorage Native 100% private client-side storage (no tracking, no DB)
Deployment Vercel / GitHub Pages CI/CD Static global edge deployment

Verification & Testing

Every commit and pull request must satisfy rigorous static verification:

npm test                 # Vitest: runs all 180 tests across 16 test files
npm run lint             # ESLint: checks Next.js and React best practices
npx tsc --noEmit         # TypeScript: verifies strict type safety across all files
npm run build            # Production build: verifies SSG for all 1607 static pages

Data Integrity & Importer Scripts

npm run validate:content # Validates subject registries, branch isolation, and note counts
npm run validate:syllabus# Validates syllabus structures, prerequisite DAGs, and cross-links
npm run import:syllabus  # Regenerates lib/syllabusData.ts (strictly idempotent)

Note on Importer Idempotency: Running npm run import:syllabus twice consecutively produces byte-identical output. A dedicated Vitest test (tests/import-idempotent.test.ts) asserts this to prevent silent data regressions.


Project Structure & Routes

TKM-notes/
├── app/
│   ├── page.tsx                    # Landing & Quick Navigation
│   ├── syllabus/                   # Browse by Program (CSE, CSE-AI, ER) & Semester
│   │   └── [program]/[semester]/[subject]/ # Subject view & Day-Before Exam Mode
│   ├── ai-study/                   # AI-guided study session hub
│   ├── learn-cs/                   # 30-subject Computer Science curriculum & roadmap
│   ├── revision/                   # Night-before exam revision assistant
│   ├── planner/                    # Semester exam planner & timetable tracker
│   ├── pyqs/                       # Previous year question browser & topic filter
│   └── prompt-lab/                 # Advanced prompt configuration workbench
├── components/
│   ├── subject/                    # LearnSession, DayBeforeExamCard, ExternalAiHandoff
│   ├── prompt-lab/                 # Prompt builder and template customizer
│   └── navigation/                 # AppHeader, SubjectTabs, Breadcrumbs
├── lib/
│   ├── learning/                   # Decision engine, session planner, mastery calculator
│   ├── prompts/                    # Day-before exam prompts, zero-to-pro templates
│   ├── learn-cs/                   # Learn CS AI generator, topic DAG, categories
│   ├── domain.ts                   # Canonical academic hierarchy & program definitions
│   └── syllabusData.ts             # Static typed syllabus data for 259 subjects
├── scripts/                        # Syllabus import and data integrity verification scripts
└── tests/                          # 16 Vitest test suites (180 automated tests)

Honest Implementation Status

What is Fully Built & Tested

  • Canonical domain model with program-scoped academic identity (domain.ts)
  • Full KTU 2024 scheme syllabus coverage (259 subjects across CS, CS_AI, ER)
  • Deterministic decision engine (decideNextAction) across all five learning tasks
  • Time-boxed session planner (planSession) with minute-exact allocations
  • Evidence-weighted 0–6 mastery state engine with mistake tracking (FIX)
  • Day-Before Exam Attack Mode with 5 time brackets and module priority scoring
  • Interactive live study countdown timer with sound notifications
  • 1-Click AI launchers (ChatGPT, Claude, Gemini) with popup-safe navigation
  • Learn CS catalog (30 subjects, 200+ topics) with high-yield pedagogical prompts
  • Rigorous verification suite: 180 passing Vitest tests, clean lint, clean TypeScript check

What is Intentionally NOT Built (Design Constraints)

  • No Embedded LLM Server: We deliberately do not run a hosted LLM backend or proxy API calls. This guarantees zero API costs, zero telemetry, total privacy, and prevents API token exhaustion for students.
  • No User Accounts / Cloud Database: All state resides securely in the student's browser localStorage.
  • No Artificial Gamification: No streaks, badges, or animated confetti. The interface respects the student's cognitive focus.

Roadmap

  • State Import / Export: Allow students to export their localStorage learning state to a JSON file and restore it on another device.
  • Expanded Written Notes: Expand handwritten / curated notes coverage beyond the initial 28 core subjects (the learning engine already functions for all 259 subjects via syllabus and PYQs).
  • Graded PYQ Confidence: Upgrade token-overlap PYQ mapping to output graded confidence tags (high, medium, suggested).
  • Offline PWA Support: Add service workers and offline caching for note reading during network dropouts.

Author

Sreerang — TKM College of Engineering

GitHub Profile

Repository: cosmiccoder200x-sys/TKM-Notes

About

A smart learning platform for engineering students that brings the complete syllabus, practice questions, PYQs, AI-powered learning, revision, progress tracking, and personalized study tools into one place.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages