Learning platform / 2026 / In progress
LMS.
A full learning platform with AI tutoring that is checked against the course before a learner sees it
- The hard part
- Keeping the AI to lessons a learner is enrolled on, and checking what it says against the lesson before a learner sees it.
- Works today
- The platform is live on a public website, and its tests check that it refuses early lesson completion and removes unsafe code from stored content.
- Role
- Software engineering
- Built with
- PHP · Laravel · Blade · JavaScript · Eloquent · Python · FastAPI · Pydantic · PostgreSQL · pgvector
- Website
- Visit website
01What I built
The problem.
AI study help is only worth having if a learner can trust it. Left alone, an AI assistant answers from anywhere. That includes courses the learner never enrolled on. It also says things the lesson never said. A real course platform has everyday risks too. Half-finished edits can reach a live course. A learner’s browser can report progress that never happened.
What I built.
LMS is a learning platform with AI study help. It is two systems that work together. The platform, built with the Laravel web framework, runs the courses. Staff use it to build courses, review and publish them, enrol learners and track their progress. The AI service, built in Python, has one job. It checks what the AI wrote against the lesson, before Laravel decides what a learner sees.

The platform
Laravel, Blade, JavaScript
- Course builder
- Instructors build courses from chapters and lessons, using video, documents and reading material.
- Review and publishing
- Edits wait in a separate copy of the course. After review, they all go live in one step, so either every change is saved or none is.The storyPublishing reviewed course changes in one step
- Enrolment and access
- Every request is checked against the learner’s enrolment, or the course the instructor is assigned to.The storyA staff role that can add learners but not change access
- Lesson player and progress
- The server decides how much of a lesson counts as done. It uses how long a video played and how long each page was open.
- Discussions
- Questions and answers on each course. Instructors moderate them, but never a thread they posted as a learner.The storyClosing a gap in discussion moderation
- Content safety
- Formatted text is cleaned of unsafe code when it is saved, and again when it is shown. Uploaded files are renamed, restricted and re-encoded into fresh copies.The storyCleaning unsafe code out of formatted text without losing tables, lists and headings
The AI service
Python, FastAPI, Pydantic
LMS AI Core- Passage ranking
- Puts the passages Laravel sends in order, best match first. It looks at matching phrases and keywords. It also looks at each passage’s title and source.The storyMoving AI checks to Python while Laravel keeps learner access
- Claim checking
- Splits an answer into claims, which are single statements, and checks that the lesson supports each one. It also spots clashes in numbers, dates and names. And it spots clashes in quotes, in the order of things, and where one side says “not”.The storiesMoving AI checks to Python while Laravel keeps learner accessChecking each claim in an AI answer against the lesson
- Key-only access
- Every request to the service’s main web addresses, the ones with a version number, must carry an access key. If no key has been set up, the service refuses the request. Its public documentation pages are switched off.The storyProtecting learner text in saved conversations and evaluation reports
The Laravel side
Laravel, PostgreSQL, pgvector
LMS AI Core- Lesson sources
- Each lesson is saved as a source with a version number, split into small chunks of text. Each chunk gets a fingerprint, a short code that changes when its content changes. Searches look only inside the learner’s own courses.The storiesRebuilding lesson sources from repaired transcriptsKeeping AI answers tied to the lesson sources
- Gateway and fallback
- In live mode, Laravel uses the result from the Python service. If the service is too slow or fails, Laravel switches to its own local check. So nothing goes out unchecked.The storyChecking AI answers in Python, with a local check as backup
- Study guides
- A saved guide is shown only while it still matches the lesson as it is now. It must also match the current AI provider, model and settings.The storiesWhy the study guide worker wouldn’t startWhy a ready study guide looked unavailable
- Privacy
- Logs and saved conversations blank out private text. Evaluation exports, the files used to judge answer quality, keep summaries instead of full answers.The storyProtecting learner text in saved conversations and evaluation reports
02The journey
What broke, and what changed.
Broke, then fixedA decisionA milestone
- 01 of 15BuiltLMS
Course edits get their own copy
What I builtProposed edits now stay in a separate editable copyLMS · The platformReview and publishingEdits wait in a separate copy of the course. After review, they all go live in one step, so either every change is saved or none is.See it in the map above until someone reviews them. Publishing locks the course and the copy. Then it saves every change in one A technical worddatabase transactionA group of database changes saved together, so either all of them are saved or none are., so either all of it is saved or none is.
- 02 of 15BrokeLMS
The browser could mark a lesson complete
What went wrongReading lessons and resource lessons took a “ready to complete” signal from the learner’s browser. The server had not recorded enough time on each page. It had not recorded the learner opening the resource at all.
What changedThe server now records when a lesson is opened and times every page itself. A resource now needs a record that it was opened and real progress. It must also pass its own time check.
ProofThe tests send “complete” too early and expect the server to refuse. Then they move the clock forward and check that completing now works.
- 03 of 15BrokeLMS
An instructor could delete their own learner thread
What went wrongAn instructor can also post in a course’s discussionsLMS · The platformDiscussionsQuestions and answers on each course. Instructors moderate them, but never a thread they posted as a learner.See it in the map above as a learner. Replying, approving and changing a thread’s status already refused to let them manage their own learner thread. The two delete actions did not.
What changedBoth delete actions now follow the same rule.
ProofFirst I wrote a test that showed the bug. The tests now expect a refusal and check that the thread or reply is still there.
Read the full story - 04 of 15BrokeLMS
Older content skipped the safety check
What went wrongAnnouncements and newsletters were cleaned when savedLMS · The platformContent safetyFormatted text is cleaned of unsafe code when it is saved, and again when it is shown. Uploaded files are renamed, restricted and re-encoded into fresh copies.See it in the map above. Older or imported A technical wordHTMLThe code that describes what is on a web page., the code behind a web page, had never been through that step. The page showed it exactly as it was stored.
What changedThe same cleaner now runs when content is shown, including the newsletter preview line.
ProofThe tests write unsafe markup straight into the database. Then they check that scripts are removed and the useful text stays.
Read the full story - 05 of 15BuiltLMS
A staff role that can add learners and nothing more
What I builtThe Enrollment Manager is a staff role that adds learners and puts them on courses. The server refuses any attempt to set roles or audiences through it, even from a faked request. It works on my own computer and is not released yet.
- 06 of 15DecidedLMS AI Core
Give the checking its own service, keep access in Laravel
The questionThe checks could live inside Laravel or in a separate service.
What I choseThe Python service gets a narrow job. It ranks the passagesLMS · LMS AI Core · The AI servicePassage rankingPuts the passages Laravel sends in order, best match first. It looks at matching phrases and keywords. It also looks at each passage’s title and source.See it in the map above it is given and checks claimsLMS · LMS AI Core · The AI serviceClaim checkingSplits an answer into claims, which are single statements, and checks that the lesson supports each one. It also spots clashes in numbers, dates and names. And it spots clashes in quotes, in the order of things, and where one side says “not”.See it in the map above. Laravel keeps enrolmentLMS · The platformEnrolment and accessEvery request is checked against the learner’s enrolment, or the course the instructor is assigned to.See it in the map above and storage. It also makes the calls to the AI provider and decides the final answer. The service can be tested on its own, and it has no power to give a learner access.
- 07 of 15DecidedLMS AI Core
Check the claims, not just the search results
The questionA passage that ranked well was treated as support for everything in the answer.
What I choseRankingLMS · LMS AI Core · The AI servicePassage rankingPuts the passages Laravel sends in order, best match first. It looks at matching phrases and keywords. It also looks at each passage’s title and source.See it in the map above and checking are now separate steps. The checkerLMS · LMS AI Core · The AI serviceClaim checkingSplits an answer into claims, which are single statements, and checks that the lesson supports each one. It also spots clashes in numbers, dates and names. And it spots clashes in quotes, in the order of things, and where one side says “not”.See it in the map above reports which passages support each claim. Laravel then trims the answer, or offers suggestions for what to review instead.
- 08 of 15DecidedLMS AI Core
Never let a service failure mean an unchecked answer
The questionA new service is one more thing that can fail.
What I choseThe local checkLMS · LMS AI Core · The Laravel sideGateway and fallbackIn live mode, Laravel uses the result from the Python service. If the service is too slow or fails, Laravel switches to its own local check. So nothing goes out unchecked.See it in the map above inside Laravel stays. In shadow mode, both checks run and their results are compared, without changing the answer. If the service is too slow or fails, Laravel falls back to the local check.
- 09 of 15BrokeLMS AI Core
The background worker would not start
What went wrongThe worker is a program that keeps running and works through queues of background jobs. On the test site, it kept failing because its start command used an option Laravel does not support. The script that puts new code on the site still finished, so nothing warned anyone.
What changedThe worker’s start command now uses checked queue names, checked numbers and supported options. The one-off job that clears the old waiting jobs stays separate.
ProofThe recorded test for this bug covers both files that put the code on the site, with 79 checks.
Read the full story - 10 of 15BrokeLMS AI Core
A finished study guide showed as unavailable
What went wrongThe learner page followed an older failed attempt, even though a good, current guideLMS · LMS AI Core · The Laravel sideStudy guidesA saved guide is shown only while it still matches the lesson as it is now. It must also match the current AI provider, model and settings.See it in the map above was already saved. The admin filter then disagreed with the page.
What changedThe page now looks first for a saved guide that still matches the lesson. The guide must also match the current AI provider, model and rules. The admin filter now reads the same worked-out status.
ProofThe record shows eight checks passing in the test for whether a guide is ready, then 87 in the admin tests.
Read the full story - 11 of 15BrokeLMS AI Core
A repaired transcript was ignored
What went wrongA transcriptLMS · LMS AI Core · The Laravel sideLesson sourcesEach lesson is saved as a source with a version number, split into small chunks of text. Each chunk gets a fingerprint, a short code that changes when its content changes. Searches look only inside the learner’s own courses.See it in the map above is the written text of a lesson’s video or file. When a lesson was rebuilt, the LMS set up a fresh import of its transcript. It did this before checking whether an admin had already fixed the transcript by hand. Fixing that showed two more cases. One was a source marked ready but with no text. The other was text still attached to a video that had been replaced.
What changedA rebuild now checks for usable text first and refuses empty sources. It also checks each transcript against the current video or file. Study guidesLMS · LMS AI Core · The Laravel sideStudy guidesA saved guide is shown only while it still matches the lesson as it is now. It must also match the current AI provider, model and settings.See it in the map above and the AI assistant skip material that is out of date.
ProofEach fix started with a test that showed the bug. Afterwards, six, three and four checks passed across the three cases.
Read the full story - 12 of 15BrokeLMS AI Core
The service answered without an access key
What went wrongWith no access keyLMS · LMS AI Core · The AI serviceKey-only accessEvery request to the service’s main web addresses, the ones with a version number, must carry an access key. If no key has been set up, the service refuses the request. Its public documentation pages are switched off.See it in the map above set up, the service still accepted requests. Its A technical wordAPIA set of web addresses that one program uses to ask another program for data, or to ask it to do something. documentation, the pages that list the web addresses other programs can call, was public too. Saved conversations and evaluation exportsLMS · LMS AI Core · The Laravel sidePrivacyLogs and saved conversations blank out private text. Evaluation exports, the files used to judge answer quality, keep summaries instead of full answers.See it in the map above also kept private text that the query log had already blanked out.
What changedNow, with no access key set up, every request is refused. The documentation pages are off. Saved messages are blanked out in the same way, and the exports keep summaries.
ProofThe recorded run had 12 Python tests, and 54 Laravel tests written in A technical wordPHPThe programming language that Laravel, a popular web framework, is written in., the language Laravel uses, with 360 checks.
Read the full story - 13 of 15BrokeLMS AI Core
Rebuilding unchanged text made a good guide look out of date
What went wrongEach guideLMS · LMS AI Core · The Laravel sideStudy guidesA saved guide is shown only while it still matches the lesson as it is now. It must also match the current AI provider, model and settings.See it in the map above has a fingerprint, a short code that changes when the lesson changes. It shows whether the guide is still up to date. The fingerprint included the IDs of database rows. Rebuilding the same lesson text created new rows, so the fingerprint changed.
What changedThe fingerprint is now built from the content itself. It uses the source’s type and key, and a fingerprint of the content. It also uses each piece’s position, its times and the text that was picked.
ProofThe test for this bug rebuilds the rows from the same material. It expects exactly the same fingerprint.
- 14 of 15BrokeLMS AI Core
One bad quiz question hid a whole study guide
What went wrongA study guideLMS · LMS AI Core · The Laravel sideStudy guidesA saved guide is shown only while it still matches the lesson as it is now. It must also match the current AI provider, model and settings.See it in the map above and its practice questions passed or failed as one. A single unsupported answer hid lesson points that had passed their own checks.
What changedPractice questions are now optional. Unsupported questions are dropped, and the checked guide still shows.
ProofThe test for this bug gives a supported guide with one unsupported question. It expects the guide to show, with no questions.
- 15 of 15DecidedLMS AI Core
Let AI word a recommendation, not choose where it leads
The questionRecommendations need friendly wording. But the AI model should not decide where a learner is sent.
What I choseLaravel first picks what to recommend, and in what order. The AI model only writes the wording. Laravel puts each piece of wording back by its place in the list.
03Today
Where it stands.
When a course is published, its chapters and lessonsLMS · The platformCourse builderInstructors build courses from chapters and lessons, using video, documents and reading material.See it in the map above are rebuilt, so every lesson gets a new ID. I have not yet shown that a learner’s progressLMS · The platformLesson player and progressThe server decides how much of a lesson counts as done. It uses how long a video played and how long each page was open.See it in the map above carries over when that happens. Media files sit in the server’s public storage area, and where they should be kept is still to be decided. The Enrollment Manager role works on my own computer but is not released yet.