learning-platform-pdf is a solo college project: an AI-Based Personalized Learning Platform. A student uploads any PDF — class notes, a textbook chapter, a lab manual, anything — and the application turns it into easy visual learning material. It is deliberately not limited to one subject: the pipeline is content-agnostic and works on whatever text and images the PDF contains.
The product exists for a single audience: a student who wants a fast, visual, self-checking study sheet generated from material they already have. The intended user is the author's own peer group — a GTU Computer Engineering diploma student (Semester 3) and their classmates — so the app is designed to be legible, tactile, and explainable in a viva rather than to look like an enterprise product.
The core transformation the product performs is:
PDF → extracted text and images → chunked LLM analysis → structured JSON (summary, key points, Mermaid diagram, chart data, 10 MCQs) → animated study page → quiz → per-topic personalization → dashboard.
The project is built in seven gated stages, and each stage is delivered as complete, working, commented code with the file name above it, plus instructions for how to run and test it.
The platform is a Python/Flask web application backed by SQLite, with server-rendered HTML templates enhanced by HTML/CSS/JS, Mermaid.js, Chart.js, and AOS animations. PDF text and embedded images are extracted with PyMuPDF. Structured learning content is produced by an LLM API (Gemini free tier), whose API key is kept in a .env file. Development and running happen on Windows + VS Code.
The single in-product human actor is the Student Learner. The student registers, logs in, uploads PDFs, waits for extraction and LLM processing, studies the generated visual material, takes the generated MCQ quiz, reviews per-topic accuracy and weak-topic recommendations, and tracks progress on the dashboard.
Durable, per-user state is central to the product: documents, generated content, questions, and attempts are all stored against the owning student, so a returning student sees their own library, their own study material, and their own quiz history. Access to the dashboard, upload, study page, quiz page, and personalization view therefore requires a logged-in student; the landing page, login, and sign-up are reachable without an account.
Narrow exclusions. This document does not add capabilities the source did not request. There is no multi-teacher or classroom administration, no social or sharing features, no payment, no mobile app, no subject-specific content packs, and no account-management surface beyond register/login. The LLM provider is an external dependency owned by the provider; the application owns the prompt, the chunking, the JSON parsing, and the safe handling of bad output.
Delivery ownership. The product is a first-party Flask application. All student-facing surfaces — landing, login, sign-up, dashboard, upload, study page, quiz page, and personalization — are custom pages owned by the application. The LLM is an external provider: the application sends chunked text to it and receives structured JSON back, but the provider owns the model, its availability, and its rate limits. The application owns everything around that call: prompt design, chunking of large PDFs, JSON parsing, validation, and safe failure when the output is malformed.
Identity and access. The application owns student identity. A student creates their own account through self-service sign-up, and a returning student verifies themselves at login. Flask sessions carry the logged-in state. Passwords are stored hashed. Because documents, generated content, questions, and attempts are durable and private to one student, the dashboard, upload, study page, quiz page, and personalization view are protected and require login. The landing page, login, and sign-up are anonymous entry surfaces; the login and sign-up pages cannot themselves require login.
Current vs. future boundary. Everything described in this document is current. The seven-stage build order is a delivery sequence, not a roadmap of future features: Stage 1 (folder structure + DB setup), Stage 2 (register/login), Stage 3 (PDF upload + text/image extraction), Stage 4 (LLM integration), Stage 5 (study page), Stage 6 (quiz + personalization), and Stage 7 (dashboard + UI polish) are all in scope now. The build pauses after each stage until the student says "next". No feature is deferred to a future horizon by the source.
What the product is not. It is not a general document-management system, not a course platform, and not a chat interface. Its only transformation is PDF → visual study material → quiz → per-topic feedback.
Each requirement is a distinct story point with provenance, lifecycle facts, and observable acceptance.
FR-1 — Account registration As a Student Learner, I should be able to register an account with a password so that I have my own private learning workspace.
FR-2 — Login and session As a Student Learner, I should be able to log in so that I can reach my own documents, study material, quizzes, and progress.
FR-3 — Protected access to personal state As a Student Learner, I should only reach my own documents, generated content, questions, and attempts after logging in.
FR-4 — PDF upload with validation As a Student Learner, I should be able to upload a PDF so that the app can turn it into study material.
documents row is created with id, user_id, filename, upload_date.FR-5 — Page-by-page text and embedded image extraction As a Student Learner, I should have the text and images of my PDF extracted so that they can be analyzed and displayed.
FR-6 — Chunked LLM processing As a Student Learner, I should have large PDFs handled by chunking so that long documents still produce study material.
FR-7 — Structured JSON output As a Student Learner, I should receive structured learning content so that the study page has summary, points, diagram, chart, and questions.
content and questions.FR-8 — Persisted generated content As a Student Learner, I should have my generated content saved so that I can revisit it without regenerating.
content row is written with id, document_id, summary, points_json, diagram_code, chart_json; questions rows are written with id, document_id, topic, question, option_a–option_d, answer, difficulty.FR-9 — Animated key points As a Student Learner, I should see key points animate in one by one so that I can absorb them in sequence.
FR-10 — Mermaid diagram rendering As a Student Learner, I should see the concept diagram rendered so that I can understand the structure of the topic.
content.diagram_code holds a Mermaid flowchart or mind map.FR-11 — Chart rendering As a Student Learner, I should see a chart of the PDF's numbers or comparisons so that quantitative content is visual.
content.chart_json holds chart data.FR-12 — Extracted image gallery As a Student Learner, I should see the PDF's embedded images in a gallery so that figures from the source are available while studying.
FR-13 — Quiz from generated MCQs As a Student Learner, I should take a quiz built from the generated MCQs so that I can test myself on the document.
FR-14 — Every answer saved to attempts As a Student Learner, I should have every answer I give saved so that my progress and weak topics are accurate.
attempts row is written with id, user_id, question_id, correct, date for every answer.FR-15 — Accuracy per topic As a Student Learner, I should see my accuracy per topic so that I know where I stand.
FR-16 — Weak-topic threshold and re-reading recommendation As a Student Learner, I should have topics under 60% flagged as weak with a re-reading recommendation so that I know what to revisit.
FR-17 — Easier-question offer for a weak topic As a Student Learner, I should be offered easier questions for a weak topic so that I can practise at a level I can handle.
FR-18 — Dashboard document library As a Student Learner, I should see all my uploaded documents on the dashboard so that I can pick up any of them.
FR-19 — Dashboard progress chart As a Student Learner, I should see a progress chart on the dashboard so that I can see my improvement over time.
FR-20 — Dashboard weak topics As a Student Learner, I should see my weak topics on the dashboard so that I can act on them immediately.
FR-21 — Dashboard quiz history As a Student Learner, I should see my quiz history on the dashboard so that I can review what I have attempted.
FR-22 — Stage-gated delivery As the project author, I should receive the build in seven stages that pause until I say "next" so that I can follow and explain each part.
FR-23 — Per-file delivery with run/test instructions As the project author, I should get complete, working, commented code per file with the file name above it and run/test instructions after each stage so that I can run and defend it in a viva.
Product context. A student — the author's own peer group, a GTU Computer Engineering diploma student (Semester 3) and their classmates — who already has study material as PDFs: class notes, textbook chapters, lab manuals. They are not looking for a course platform; they want their existing material turned into something easier to revise from. They work on a Windows machine in VS Code, and they are comfortable with a browser-based tool but not with configuring infrastructure.
Primary goal. Turn any PDF into a personal, visual study sheet — summary, key points, a concept diagram, a chart where the material has numbers, and the source's own figures — then test themselves and find out exactly which topics need more work.
Distinct accepted responsibilities.
Relevant inputs and decisions. Which PDF to upload; whether to proceed once processing finishes or fails; which document to study next; which answer to choose on each MCQ; whether to accept the easier-question offer for a weak topic; whether to re-read the recommended section or move on.
Interactions with other accepted participants. The Student Learner is the only in-product human actor. The other participants in the lifecycle are non-human: the Gemini LLM API (external provider) receives chunked text and returns structured JSON, and the application's own processing performs extraction, chunking, parsing, and persistence. The student's interaction with the provider is indirect — they see its result as study material, or see a safe failure when its output is bad.
Observable success. The student's document appears in their dashboard library; the study page shows their summary, animated key points, rendered diagram, rendered chart, and image gallery; their quiz answers are recorded; their per-topic accuracy is shown with weak topics flagged under 60%; and their dashboard shows a progress chart and quiz history that reflect their own attempts.
What makes this role distinct. The Student Learner is simultaneously the content provider (they supply the PDF), the consumer (they study the generated material), and the assessor (they take the quiz whose results drive their own personalization). No other role exists in the product, and no role has differentiated permissions over shared state — every student sees only their own workspace.
users row, and establishes a Flask session.documents row (id, user_id, filename, upload_date).content row (id, document_id, summary, points_json, diagram_code, chart_json) and the questions rows (id, document_id, topic, question, option_a–option_d, answer, difficulty).diagram_code.chart_json, showing the PDF's numbers or comparisons.attempts row (id, user_id, question_id, correct, date) for every answer and shows correct/incorrect feedback.The creative direction is authoritative for this section: charming clarity after Susan Kare — pixel-perfect study icons on a paper ground. The emotional register is "my own friendly study desk", not enterprise SaaS: a small hand-made app that a student can explain in a viva — legible, tactile, a bit nostalgic, obviously built by one person who cares. It must never read as a blue-gradient AI startup template.
| Role | Hex | Usage |
|---|---|---|
| Background | #F4F1E8 | Paper-cream ground, ~70% of every screen |
| Surface | #FFFFFF | Cards, the study panel, the quiz tile — content reads as physical paper on a desk |
| Text | #1B1B1F | All body and heading text — never grey-on-grey |
| Primary | #2E5E4E | Deep pine green: navigation bar, section rules, correct-answer states, primary buttons |
| Accent | #E2703A | Burnt orange, the single hot accent, used sparingly and always meaningfully: weak-topic flags, the under-60% accuracy marker, the active quiz option, one underline under the big headline |
| Muted | #8A8578 | Metadata only: upload dates, page counts, difficulty tags |
Contrast check: ink on cream ≈ 14:1; white on pine ≈ 7.5:1; white on orange ≈ 3.9:1 — so orange is used for fills with dark ink text or as a 2px border/underline, never for small white text.
VT323 — monospaced, pixel-terminal, wide tracking, all-caps for micro-labels. Used at large sizes for hero numerals, page titles, and section numbers.IBM Plex Sans in 400/500/600 — a humanist grotesque with a slightly technical, drafting-table feel that pairs with pixel type without looking like a template.clamp); section titles 28 → 40px; body 16px; micro-labels 12px all-caps with 0.12em tracking.Chunky 2px ink outlines on cards, 6px radii (small, deliberate — not pill), 1px dashed rules for dividers, and hard 45°-notched corners on topic badges. Everything reads like a drawn UI: solid fills, visible borders, no soft shadows except a 2px hard offset on the primary CTA.
Tidy 12-column grid with a visible 1px ink baseline rule system. A left rail (240px) holds the pixel-icon navigation. Content sits in a 720px reading measure for key points, while the diagram and chart panels break wider to the full grid. The Study page is a stack of discrete panels — Summary, Key Points, Diagram, Chart, Image Gallery — each introduced by a numbered pixel label (01, 02, 03…). The Dashboard uses icon tiles in a 4-up grid, each tile with a pixel glyph, a big numeral, and a 12px all-caps label.
Extracted PDF images are treated as found artefacts: each sits in a white card with a 2px ink frame, a pixel corner tick, and a 12px caption of its page number. Missing or broken images get a hand-drawn pixel placeholder glyph. Navigation and status are carried by a small pixel icon set (document, page, diagram, chart, quiz, weak-topic) drawn on a 16×16 grid — the app's most distinctive asset.
Blue/indigo primary or accent anywhere — no #2563EB, #4F46E5, #6366F1, no bootstrap-blue buttons; Inter, Roboto, Arial, Helvetica, Open Sans, Lato, Poppins, or system-ui for headings or body; gradient-blob hero, glassmorphism panels, blurred frosted cards; a grid of identical hover-lift cards as the dashboard; soft drop shadows, pill buttons, 24px+ radii; emoji used in place of the pixel icon set; dark-mode-first surfaces — this is a paper-ground app; decorative animation beyond the staggered reveals and chart/diagram draw-ins.
The pipeline as a printed worksheet.
The public entry is not a centred SaaS hero. It is a full-width cream band with a 112px VT323 headline — "TURN ANY PDF INTO YOUR OWN STUDY SHEET" — set flush-left and allowed to wrap across two lines, with a 2px orange underline running the full grid width beneath the word "PDF".
Under the headline sits a single hard-edged white card the width of the grid, showing a live miniature of the product's real pipeline as four pixel icons connected by 1px dashed ink arrows:
PDF → pages → diagram + quiz → progress
The CTA "Upload a PDF" sits inside the last node as a solid pine block with ink text. The right third of the band is empty cream, deliberately — the composition is asymmetric and confident, not centred.
This concept recomposes only accepted content, states, and controls: the four icons name the accepted pipeline (upload a PDF, extract pages, generate diagram and quiz, track progress), and the CTA is the accepted entry action that leads to Sign Up. It introduces no new behaviour, page, or destination.
Interaction Model: Static (direction) Motion Tempo: restrained Hero Dimensionality: flat
prefers-reduced-motion, the pipeline renders fully composed in its final state — all four icons, all dashed arrows, and the CTA visible at once, with no staggered reveal. Nothing is hidden or unreadable.NFR-1 — Fixed technology stack The stack is fixed: Python, Flask, SQLite, PyMuPDF, Gemini free-tier LLM API, HTML/CSS/JS, Mermaid.js, Chart.js, AOS animations, on Windows + VS Code. Provenance: explicit. Rationale: the author must be able to build, run, and defend the project with the tools they already know.
NFR-2 — Secret handling The LLM API key must be kept in a .env file and must not be hard-coded into source files. Provenance: explicit. Rationale: the key is a credential for an external provider.
NFR-3 — Password security Passwords are stored hashed, never in plain text, and login uses Flask sessions. Provenance: explicit (Feature 1). Rationale: student accounts protect private documents and progress.
NFR-4 — Per-user data isolation Documents, generated content, questions, and attempts are stored per user and are only reachable by the owning student after login. Provenance: explicit (Feature 2, database tables) plus required_inference for access continuity. Rationale: the workspace is private and durable.
NFR-5 — Large-PDF resilience Large PDFs are handled by chunking the extracted text before sending it to the LLM. Provenance: explicit (Rules). Rationale: a single oversized request would fail or truncate.
NFR-6 — Safe handling of bad LLM output Malformed or unexpected LLM output is handled safely — detected, rejected, and reported — and is never stored as broken content or rendered as a broken page. Provenance: explicit (Rules). Rationale: the LLM is an external, non-deterministic dependency.
NFR-7 — Code legibility for a viva Code is kept simple, with comments, so the author can explain it in a viva. Each file is delivered complete and working, with its file name above it. Provenance: explicit (Rules). Rationale: the project is a solo college project assessed by explanation.
NFR-8 — Stage-gated delivery The build proceeds in the seven specified stages and waits for the author to say "next" before the next stage. Provenance: explicit (Rules). Rationale: the author must be able to run and test each stage before continuing.
NFR-9 — Run and test instructions per stage After each stage, instructions for how to run and test that stage are provided. Provenance: explicit (Rules). Rationale: the author needs to verify each stage on Windows in VS Code.
NFR-10 — Readable text and controls at every viewport
Headlines, wordmarks, labels, numbers, card text, and controls stay entirely inside the viewport and their container at 375px, 768px, and 1280px, wrapping or scaling (for example font-size: clamp(...) with its mobile size) to fit, and no other element covers any part of them. Imagery, decoration, and motion may be cropped, bled, rotated, overlapped, or cut as the creative direction asks, as long as they cover no readable text or control. Provenance: explicit (creative direction). Rationale: the study material and quiz controls must remain usable on a student's laptop and phone.
NFR-11 — Reduced-motion usability
With prefers-reduced-motion, the product provides a usable static arrangement: the pipeline and any staggered reveals render fully composed, and any horizontally scrollable content wraps into rows or scrolls so each item can be brought fully into view. Provenance: explicit (creative direction). Rationale: motion is decorative here, never load-bearing.
All choices below are source-specified and preserved exactly.
users, documents (id, user_id, filename, upload_date), content (id, document_id, summary, points_json, diagram_code, chart_json), questions (id, document_id, topic, question, option_a–option_d, answer, difficulty), and attempts (id, user_id, question_id, correct, date).No additional frameworks, services, or deployment platforms are introduced by this document.
Constraints (explicit, binding).
Assumptions (narrow, labeled).
Explicit exclusions. No multi-teacher or classroom administration, no social or sharing features, no payment, no mobile app, no subject-specific content packs, and no account-management surface beyond register/login. The product is not a general document-management system, not a course platform, and not a chat interface.
documents table with id, user_id, filename, upload_date.content table with id, document_id, summary, points_json, diagram_code, chart_json.questions table with id, document_id, topic, question, option_a–option_d, answer, difficulty.attempts table with id, user_id, question_id, correct, date.No completed page designs yet.
Completed design pages will appear here when they are ready to preview.
No completed page designs yet.
Completed design pages will appear here when they are ready to preview.
No comments yet. Be the first!