Fypguard
> Automated Document Blueprint Verification & Content Relevance Auditor > Compare student final year project (FYP) reports and postgraduate theses against departmental templates (.docx / .pdf) with
About the Project
Automated Document Blueprint Verification & Content Relevance Auditor
Compare student final year project (FYP) reports and postgraduate theses against departmental templates (.docx / .pdf) with engineering precision.
ð§ Overview
FYPGuard is a full-stack automated compliance auditor built for university FYP coordinators, supervisors, and students. Instead of manually inspecting hundreds of pages for font drift, missing mandatory sections, or leftover boilerplate placeholders, FYPGuard extracts a structured Specification Schema from your university template and verifies submitted documents against it.
Core Capabilities
-
V1 Format & Fill-Compliance Checker:
- Hierarchical Outline & Numbering Matching: Compares submitted document structure against template specifications using exact code matching, exact title matching, and fuzzy string distance.
- Typography & Dimensional Tolerances: Inspects heading and body font family, point size (pt), and line spacing tolerances.
- Placeholder & Instructional Content Detection: Scans for unreplaced template text (e.g.
[Write Project Title Here],<Insert Student ID>,SESSION 2022-2026). - Content Ownership (
directvscontainer): Understands parent chapter headers (e.g., Chapter 1: Introduction) that serve purely as container groupings for subsections and should not be flagged as empty. - Word Field-List Intelligence: Recognizes
Table of Contents,List of Figures, andList of Tablesas Word field-generated paragraph lists, preventing false-positive table/figure missing alerts. - Neutral Appendix & Optional Short-Circuiting: Automatically marks appendices and optional sections as non-mandatory (
is_required = False), ensuring they never trigger red alarms or drag down the compliance score.
-
V2 AI Content Relevance Checker:
- Evaluates whether the written prose in each section aligns with the declared project title and domain.
- Supports Google Gemini, Anthropic Claude, OpenAI GPT, or a built-in Local Semantic Heuristic Model (no API key required).
-
Three Non-Destructive Export Modes:
- Mode 1 â Annotated Reference Copy (
.docx): Injects native Word comments (word/comments.xml) anchored directly to flagged paragraphs and headings in the review panel, preserving 100% of original layout, margins, and formatting. - Mode 2 â Read-Only Reference Specimen (
.pdf): Generates an official locked PDF inspection record with audit metadata, compliance score, and discrepancy matrix that cannot be edited. - Mode 3 â Issues-Only Summary Report (
.docx): A standalone engineering discrepancy checklist table for quick remediation.
- Mode 1 â Annotated Reference Copy (
-
Dual-Contrast Architectural Blueprint UI:
- Light Mode: High-contrast architectural drafting paper (
#eef2f6), visible cyan gridlines, crisp white cards, and WCAG AA contrast text. - Dark Mode: Deep navy CAD inspection console with cyan glowing vectors and technical dimension-line callouts (
â¢âââââââ£).
- Light Mode: High-contrast architectural drafting paper (
â¡ Quick Start
Option A: 1-Click Launch (Windows)
Simply double-click the start.bat file in the project root:
start.bat
What start.bat does automatically:
- Checks Python and Node.js prerequisites.
- Creates the Python virtual environment (
.venv) and installsrequirements.txtif not present. - Installs frontend dependencies (
npm install) if missing. - Starts both FastAPI and Vite servers concurrently in a single terminal.
- Automatically opens your browser to http://127.0.0.1:5173/.
Option B: Unified Python Runner (Cross-Platform)
# Run with Python python run.py
Press Ctrl+C in the terminal to cleanly terminate both backend and frontend servers simultaneously.
Option C: Manual Setup
1. Backend Setup
# Create and activate virtual environment python -m venv .venv # Windows .\.venv\Scripts\activate # Linux / macOS source .venv/bin/activate # Install dependencies pip install -r requirements.txt # Start FastAPI server uvicorn backend.main:app --host 127.0.0.1 --port 8000 --reload
2. Frontend Setup
cd frontend npm install npm run dev
Open http://127.0.0.1:5173/ in your web browser.
ðï¸ System Architecture
FYPGuard/
âââ backend/
â âââ main.py # FastAPI routes & export handlers
â âââ models.py # Pydantic data schemas & compliance models
â âââ extraction/
â â âââ docx_extractor.py # OOXML AST parser for headings, fonts, styles
â â âââ pdf_extractor.py # PDF text, table, and structure extractor
â âââ engine/
â â âââ matching_engine.py # Section alignment & fuzzy matching pipeline
â â âââ compliance_checker.py # Rule evaluation, tolerances & scoring logic
â â âââ relevance_checker.py # V2 scope & title relevance evaluator
â â âââ docx_annotator.py # OOXML Word comment injection & PDF generation
â âââ storage/
â âââ template_store.py # JSON template and report persistence
â
âââ frontend/
â âââ src/
â â âââ App.tsx # Root application component
â â âââ api.ts # Backend REST API client
â â âââ types.ts # TypeScript interface definitions
â â âââ index.css # Blueprint design system tokens & themes
â â âââ components/
â â âââ Navbar.tsx # Engineering header & contrast toggle
â â âââ CheckRunner.tsx # Intake station (specimen + target blueprint)
â â âââ ComplianceReportViewer.tsx # Interactive blueprint inspection report
â â âââ VisualRemapEditor.tsx # Interactive template calibration editor
â â âââ TemplateHub.tsx # University specification catalogue
â â âââ LLMSettingsModal.tsx# AI relevance engine calibration
â
âââ data/
â âââ templates/ # Stored department template schemas
â âââ uploads/ # Uploaded submitted documents
â âââ reports/ # Cached compliance reports & exports
â
âââ requirements.txt # Python backend dependencies
âââ start.bat # Windows 1-click startup script
âââ run.py # Unified multi-process runner
âââ .gitignore # Git exclusion rules
ð Evaluation & Scoring Model
Compliance scores are computed against mandatory template sections only (optional sections and appendices are excluded from the score denominator):
$$\text{Overall Score} = \left( 0.40 \times S_{\text{structure}} \right) + \left( 0.40 \times S_{\text{fill}} \right) + \left( 0.20 \times S_{\text{typography}} \right)$$
- Structure Score ($S_{\text{structure}}$): Proportion of mandatory sections detected and aligned.
- Fill Score ($S_{\text{fill}}$): Absence of unreplaced instructional placeholders and empty body content.
- Typography Score ($S_{\text{typography}}$): Adherence to specified font families, font sizes (pt), and line spacings within calibrated tolerances ($\pm 1.0\text{ pt}$, $\pm 0.35\text{ line}$).
ð¡ API Reference
| Method | Endpoint | Description |
| :--- | :--- | :--- |
| GET | /api/templates | List all registered department specifications |
| GET | /api/templates/{id} | Retrieve full section schema for a blueprint |
| POST | /api/templates/upload | Ingest a new .docx or .pdf guideline template |
| PUT | /api/templates/{id} | Update section hierarchy, ownership, or tolerances |
| POST | /api/check | Execute compliance audit on uploaded specimen |
| GET | /api/reports/{id} | Fetch JSON audit report data |
| GET | /api/reports/{id}/export-annotated | Mode 1: Download .docx with native Word comments |
| GET | /api/reports/{id}/export-readonly | Mode 2: Download locked, unmodifiable .pdf record |
| GET | /api/reports/{id}/export-summary | Mode 3: Download .docx discrepancy checklist table |
𧪠Included Sample Files
The repository includes pre-configured reference files for immediate testing:
AI_DS_Thesis_Template_Final.docx: Sample Department of AI & Data Science postgraduate thesis specification.Updated Template-07 - Final Project Report-2.docx: Complete 105-section Software Engineering FYP specification.Robo-Litation Report.docx: Realistic FYP submission specimen containing formatting drift, tables, figures, and placeholders for evaluation testing.
ð License
MIT License. Designed for academic institutions and software engineering capstone audit automation.
Project Timeline
Technologies
External Links
Related Projects
Projects built with similar technologies.
Online Html Editor And Viewer
The Online HTML Editor and Viewer is a simple web application built with Flask that allows users to write and preview HTML code in real-time.
Qrgen
A premium, feature-rich QR Code Generator engineered with Python (Flask) and a pristine Glassmorphism frontend.
Examina Ai
Using AI, It transforms raw study materials into structured, verified examination sets with support for institutional export formats like Moodle XML.