SYS-04 // CASE STUDY

StudHub-IQ

Unified Student Academic Platform — a multi-repository ecosystem featuring a collaborative portal, central API services, and Python-based NLP vector embeddings for semantic document search in Iraqi universities.

ACADEMIC ECOSYSTEM VECTOR SEARCH (NLP) COLLABORATION PORTAL

01 — OVERVIEW

What is StudHub-IQ?

StudHub-IQ is a comprehensive academic portal ecosystem developed to empower university students in Iraq. Instead of relying on fragmented Telegram channels or paper handouts, the system acts as a centralized university hub where students share documents, search lectures conceptually using semantic vector search, and run quiz check validations. The system operates as a unified platform spanning web portal clients, backend databases, and an AI semantic vector engine.

STUDENT
ACADEMIC PORTAL
NLP
VECTOR SEARCH
FASTAPI
EMBEDDINGS ENGINE
UNIFIED
SYSTEM FLOW

THE CHALLENGE

Fragmented & Unstructured Study Materials

University lectures, previous exam papers, and syllabus updates are typically shared across unindexed groups, making it extremely difficult for students to find specific reference answers. Traditional keyword search misses conceptual matches (e.g., searching for "voltage" fails to return documents referencing "potential difference").

THE SOLUTION

Semantic AI Academic Platform

A unified system that processes uploaded PDFs/texts into structured vector embeddings. By running a dedicated Python service (`StudHub-Embeddings`) powered by sentence-transformers, it embeds study guides into high-dimensional vector space. PostgreSQL databases with vector indexes deliver fast conceptual lookups.

02 — ARCHITECTURE

System design

Modular multi-repo pipeline: the Web client accesses the main Go API, while background pipelines invoke the Python FastAPI service to generate text embeddings and store them within a PostgreSQL database.

STUDHUB-WEB React 18 / Vite Course Explorer UI Tailwind CSS GO BACKEND Gin APIs / Auth User Roles & JWT EMBEDDINGS ENGINE Python / FastAPI sentence-transformers POSTGRES DB pgvector tables Similarity queries CLOUD STORE Document Cache Lecture PDF assets
STAGE 1
Interactive Student Web Client

React 18 Single Page Application featuring interactive academic dashboards, course selectors, PDF lecture readers, and search inputs with query helpers.

STAGE 2
Unified API Gateway

Go API Gateway controls security permissions, manages user roles, handles lecture file uploads, and coordinates requests with the AI service.

STAGE 3
NLP Embedding Generation

FastAPI Python backend chunkifies text from course materials and executes Hugging Face text embedding transformers, mapping contents into vector coordinates.

STAGE 4
PostgreSQL Similarity Search

The vector coordinates populate PostgreSQL columns configured with `pgvector` indexes. Similarity checks run cosine similarity metrics, outputting highly relevant conceptual matches.

03 — FEATURES

Ecosystem Highlights

Features designed to optimize student sharing, exam preparations, and research processes.

AI SEARCH

Semantic Vector Search

SentenceTransformers NLP engine processes questions and study notes into dense vector formats, matching ideas over exact matching strings.

  • Hugging Face text embeddings
  • pgvector similarity check
  • Conceptual search queries

COLLABORATION

Shared Document Portal

Unified sharing hub allowing university students to upload, organize, and inspect lectures, study guides, and past exams.

  • Class-based folders
  • PDF viewer integrations
  • Collaborative comments

VALIDATION

Material Rating & Review

Community ratings and verified flags guide students toward high-quality explanations, filtering out outdated resources.

  • User review tags
  • Report invalid files
  • Moderator tools

APIS & DATA

Gin REST API Service

High-throughput Go API server coordinating database operations, user sign-ups, and background jobs.

  • Secure API endpoints
  • JWT authentication
  • Modular code layout

INFRASTRUCTURE

PostgreSQL Persistence

Stable backend persistence running PostgreSQL with custom vector indexes for robust relational and semantic tasks.

  • pgvector index tables
  • Relational schemas
  • Secure connection pool

DEPLOYMENT

Dockerized Containers

All microservices are containerized with Docker and served securely via Caddy reverse proxy on live endpoints.

  • Docker Compose stack
  • Caddy HTTPS routing
  • Automated server scripts

04 — DATA WORKFLOW

From PDF to Query Match

The backend data pipeline converting study files into searchable vector indices.

STEP 01
File Upload

Student uploads a lecture PDF or typed summary to the React web app portal.

STEP 02
Text Chunking

The backend extracts raw text and chunkifies it into contextual blocks, preparing it for AI processing.

STEP 03
Compute Vector

The FastAPI Python service runs transformer models to generate 384-dimensional vector embeddings.

STEP 04
Index & Store

Vector coordinates are written into PostgreSQL tables equipped with specialized IVFFlat vector indices.

STEP 05
Semantic Query

When a student searches conceptually, pgvector calculates cosine distance to return the best matching slides.

05 — TECH STACK

Technologies used

Unified tech stack covering React interfaces, Go backend services, and Python AI modules.

FRONTEND

React 18 TypeScript Vite Tailwind CSS Axios PDF.js

BACKEND & AI

Go / Gin Python / FastAPI sentence-transformers Hugging Face PyTorch JWT Auth

INFRA & DATA

PostgreSQL pgvector Docker Compose Caddy Reverse Proxy Nginx REST API

MY CONTRIBUTION

Full-stack & AI Integration Engineer

Designed and built the semantic search pipeline, Go backend logic, React academic portal interface, and containerized deployment infrastructure.

  • Implemented Python FastAPI service running sentence-transformers NLP logic for study guides
  • Designed PostgreSQL tables with pgvector indexes for rapid semantic search queries
  • Built Go Gin REST APIs managing authentication, course directories, and file upload endpoints
  • Created React student portal frontend with Tailwind CSS styling and responsive layouts
  • Dockerized the entire multi-repo system for simple deployment using Docker Compose