EdTech & Intelligent Academic Curriculum Studio ~3 min read Featured System

StudyHub

syedfarhan078.github.io/studyhub

Overview & Purpose

StudyHub is a syllabus-first educational platform designed to organize engineering coursework from Day 1 of classes all the way through final exams. Instead of browsing the open internet aimlessly, StudyHub structures everything into a clean Subject →Module →Topic →Targeted Resources hierarchy. Every single topic in the syllabus becomes an interactive workspace equipped with curated video lectures, technical documentation, personal formula notes, and downloadable handouts.

Problem & Motivation

Engineering students under rigid university schemes (such as VTU) struggle with fragmented, unformatted syllabus outlines, scattered video lectures, and no unified way to track topic-by-topic exam readiness across complex 5-module courses. StudyHub was engineered as an intelligent, source-grounded curriculum workspace that structures official university syllabi, generates high-intent educational search paths, tracks personal mastery, and organizes course notes with zero clutter.

Architecture & Implementation

  • Full-Stack Django & Relational Schema: Employs a deeply normalized PostgreSQL data model (Subject, Module, Topic, TopicKeyword, TopicProgress, GenerationJob, ModuleNote) with optimized prefetching for responsive, hierarchical syllabus navigation.
  • High-Throughput Groq AI Engine: Integrates Groq chat completions using OpenAI GPT-OSS 120B (with tiered fallbacks to GPT-OSS 20B and Llama 3.1 8B) to transform course codes and raw outlines into strictly structured 5-module engineering curricula.
  • PostgreSQL-Backed Asynchronous Worker: Features a custom in-process and standalone background queue using PostgreSQL 'SELECT ... FOR UPDATE SKIP LOCKED', monotonic leases, daemon heartbeat threads, and claim-token fencing without external Redis/Celery dependencies.
  • Source-Grounded Syllabus Verification: Built a custom VTU scheme parser and validation pipeline (validate_curriculum_against_source) that strictly grounds AI output in official university course outlines to eliminate structural hallucinations.
  • Interactive Academic Workspace: Provides topic-level status toggles (Not Started, In Progress, Completed), automated educational search links (YouTube Data API v3 and scholarly articles), and persistent student note attachments powered by Cloudinary and WhiteNoise.

Key Technical Decisions

  • Zero-Broker Queueing Architecture: Leveraged native PostgreSQL row-level locks (SKIP LOCKED) and atomic transactions for job queues instead of heavyweight brokers, keeping deployment memory footprints well under free-tier limits.
  • Atomic Multi-Tier Persistence: Bundles all generated curriculum entities (Subject -> 5 Modules -> Topics -> Search Keywords) into a single database transaction.atomic() boundary to guarantee absolute data integrity.
  • Centralized Model Fallback & Lifecycle Bridge: Implements dynamic Groq model resolution (openai/gpt-oss-120b -> openai/gpt-oss-20b -> llama-3.1-8b-instant) with automated legacy model redirection to protect against vendor-side model deprecations.
  • Hybrid Cloud Asset Storage: Configures WhiteNoise for cached static assets and Cloudinary RawMediaStorage for permanent student note uploads (PDF/DOCX) across stateless container redeployments.
  • Granular AI Fault Tolerance: Replaces opaque API failures with a classified exception hierarchy (401 Auth, 403 Tier/Permission, 404 Model Unavailable, 429 Rate Limit, 5xx Server, Timeouts) with sanitized server logging to safeguard credentials.

Engineering Challenges & Lessons

  • Production LLM Lifecycle & Migration: Handled sudden third-party model deprecations (such as Groq's retirement of llama-3.3-70b-versatile) by designing model normalizers, automatic upgrade bridges, and tiered fallback chains.
  • Race Conditions in Multi-Worker WSGI Processes: Prevented zombie jobs and double-processing across concurrent Gunicorn workers by engineering monotonic worker leases, periodic background heartbeats, and unique claim-token fencing.
  • Strict Grounding in University Schemes: Prevented LLM hallucination and curriculum drifting by enforcing strict 5-module validation rules that reject malformed outputs before they hit the database.

Technologies & Specifications

Django 5 (Python) PostgreSQL Gunicorn
Showcase Tier Featured Showcase System