Skip to content

shejanahmmed/DIU-PDF-BOX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

87 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

DIU PDF BOX

Enterprise-grade Academic PDF Orchestrator

A high-performance web application designed for students at Daffodil International University to streamline the generation of standardized academic documentation โ€” featuring a local REST API backend for intelligent faculty data management.


๐Ÿ’Ž Features

  • ๐ŸŸฆ Intelligent Templating: Dynamic generation of DIU-standard cover pages for Assignments, Lab Reports, Lab Tasks, Presentations (supporting Multi-Student groups up to 8 members), and Quizzes, featuring custom document-specific evaluation metrics and scalable multi-line criteria tables.
  • ๐ŸŸง Client-Side Processing: Leveraging the power of the browser for PDF synthesisโ€”ensuring zero latency and maximum privacy.
  • ๐ŸŸฉ Fluid UX: Modern, responsive interface with adaptive light/dark theming and smooth micro-interactions.
  • ๐ŸŸช Advanced Asset Handling: Drag-and-drop orchestration with support for multi-format merging (Images & PDFs).
  • ๐ŸŸซ Native PDF Compression: Built-in, on-demand document compression to optimize image assets directly in-browser.
  • ๐Ÿงฎ Professional CGPA Calculator: Comprehensive DIU-standard (4.00 scale) calculator with real-time cumulative tracking.
  • ๐Ÿ“„ PDF Transcript Export: Generate and download professional, organized PDF reports of academic calculations with one click.
  • ๐ŸŸจ AI Academic Analysis: Integrated "Copy-Paste" analysis workflow supporting Gemini, Claude, ChatGPT, and DeepSeek.
  • ๐ŸŸฆ Attendance Guardian: Automatic, DIU-standard 75% threshold planning and skip-limit simulation for semesters.
  • ๐ŸŒ PWA & Offline Support: Full Progressive Web App implementation with optimized v3.9 "Instant Load" engine and 100% offline reliability.
  • ๐ŸŸฅ Real-time Preview: High-fidelity document rendering before final export.
  • ๐Ÿ–ฅ๏ธ Local Faculty API: Lightweight Node.js/Express backend server that serves DIU faculty data as a REST API, enabling dynamic teacher name autocomplete with intelligent fallback support.

๐Ÿ›  Tech Stack

Layer Technology Role
Frontend HTML5 CSS3 JavaScript Core UI & Logic
Backend Node.js Express Local REST API for Faculty Data
PDF Engine pdf-lib & pdf.js PDF synthesis and content extraction
Neural OCR Tesseract.js Client-side neural text extraction (Image-to-Text)
Doc Processing Mammoth.js & JSZip Word and PowerPoint structure parsing
Data Engine SheetJS & jsPDF-AutoTable Excel parsing and high-fidelity table generation
Design Inter Font & FontAwesome Typography & Iconography

๐Ÿš€ Architectural Overview

DIU PDF BOX uses a hybrid architecture: all document processing and PDF synthesis remain privacy-first and client-side, while a lightweight local backend optionally serves faculty data via a REST API.

  1. Metadata Injection: Form data is mapped to high-resolution coordinate planes on standardized DIU templates.
  2. Asset Buffer Management: Uploaded images and PDFs are converted to ArrayBuffers for unified processing.
  3. Neural Text Extraction: Tesseract.js (WASM) workers process images locally to extract editable academic text.
  4. PDF Synthesis: The pdf-lib engine merges the generated cover page with user assets into a single document stream.
  5. Blob Orchestration: The final document is served via an ephemeral Blob URL for instant preview and download.
  6. AI Integration: A dedicated "Copy-Paste" lane provides pre-optimized prompts for third-party AI services.
  7. Local Persistence Engine: Student course data and grades are synchronized with browser localStorage for cross-session availability.
  8. Automated Compliance Logic: A dedicated module for DIU attendance compliance (75% rule) with real-time goal planning.
  9. Edge Caching: PWA service workers (v3.9) handle navigation with a 2nd fast-fallback for 100% offline reliability.
  10. Local Faculty API: A Node.js/Express server (backend/server.js) exposes GET /api/faculty and GET /api/faculty/search?q=<name> endpoints. The frontend fetches from this API with a 2-second timeout and silently falls back to static data if the server is not running.

๐Ÿ–ฅ๏ธ Local Faculty API (Backend)

The project includes a minimal local REST API built with Node.js and Express, serving the DIU faculty directory to the frontend autocomplete feature.

Endpoints

Method Endpoint Description
GET /api/faculty Returns the full list of all DIU faculty members
GET /api/faculty/search?q=<name> Returns faculty filtered by the given name query

Example Response

[
  { "name": "Dr. Imran Mahmud", "designation": "Professor & Head" },
  { "name": "Mr. Md. Khaled Sohel", "designation": "Assistant Professor" }
]

Fallback Behaviour

The frontend is designed to be resilient. If the local API server is not running, the app automatically falls back to the static js/faculty_data.js file. The application never breaks regardless of whether the backend is active.


๐Ÿ’ป Local Development

1. Frontend Only (No Backend Required)

# Clone the repository
git clone https://github.com/shejanahmmed/DIU-PDF-BOX.git

# Navigate to the project directory
cd DIU-PDF-BOX

# Serve using any local web server (e.g., Live Server in VS Code)

2. With the Local Backend API (Optional but Recommended)

To enable the live Faculty API, start the backend server alongside your frontend:

# Step 1: Navigate to the backend directory
cd DIU-PDF-BOX/backend

# Step 2: Install dependencies (only required once)
npm install

# Step 3: Start the local API server
node server.js

The server will start on http://localhost:3000. You should see:

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘      DIU PDF BOX - Faculty API Server        โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘  Running on: http://localhost:3000           โ•‘
โ•‘  Endpoint:   /api/faculty                    โ•‘
โ•‘  Search:     /api/faculty/search?q=<name>    โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘  Press Ctrl+C to stop the server             โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Once running, open your browser console and you will see:

[DIU PDF BOX API] Faculty data loaded from local backend. (128 members)

3. Project Structure

DIU-PDF-BOX/
โ”œโ”€โ”€ backend/                  # ๐Ÿ–ฅ๏ธ Local Node.js API Server
โ”‚   โ”œโ”€โ”€ data/
โ”‚   โ”‚   โ””โ”€โ”€ faculty.json      # Faculty data source (JSON)
โ”‚   โ”œโ”€โ”€ server.js             # Express API server
โ”‚   โ””โ”€โ”€ package.json          # Node.js dependencies
โ”œโ”€โ”€ css/
โ”‚   โ””โ”€โ”€ style.css
โ”œโ”€โ”€ js/
โ”‚   โ”œโ”€โ”€ app.js                # Core PDF logic + API fetch
โ”‚   โ”œโ”€โ”€ faculty_data.js       # Static fallback faculty data
โ”‚   โ”œโ”€โ”€ cgpa.js
โ”‚   โ”œโ”€โ”€ attendance.js
โ”‚   โ””โ”€โ”€ navigation.js
โ”œโ”€โ”€ Logos/
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ cgpa.html
โ”œโ”€โ”€ attendance.html
โ”œโ”€โ”€ analyze.html
โ”œโ”€โ”€ about.html
โ”œโ”€โ”€ how-it-works.html
โ”œโ”€โ”€ manifest.json
โ””โ”€โ”€ service-worker.js

๐Ÿ‘ค Author

Farjan Ahmmed (Shejan)
Software Engineering Student @ Daffodil International University
๐Ÿ“ Dhaka, Bangladesh

Email LinkedIn GitHub Facebook Instagram


๐Ÿ“„ License

This project is licensed under the MIT License.


๐ŸŒ Deployment

Live version available at: https://shejanahmmed.github.io/DIU-PDF-BOX/

About

A privacy-first web tool for DIU students to automate the creation of standardized academic cover pages.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors