Moodle Notifier
Python/Flask Moodle scraper with real-time push — predecessor to StAffichage V2
What is this project?
Moodle Notifier started as a Telegram bot for monitoring university updates and grew into a Python/Flask app that autonomously scrapes the ST Faculty Moodle announcement board, extracts and sanitizes new posts, and pushes real-time notifications to a mobile-friendly web interface. It shipped publicly as v1.9.9 Beta and became the proof-of-concept that was later rebuilt as StAffichage V2.
The Problem
ST Faculty students had to keep logging into Moodle to check for new announcements, and there was no fast, mobile-friendly way to know when something new was posted.
The Solution
A Python/Flask app that autonomously monitors the Moodle announcement board, extracts and cleans new posts (text, PDFs, images), and pushes real-time notifications to a mobile-friendly web interface.
Feature Walkthrough
Autonomous Moodle announcement scraping
Extracts text, PDFs, and images
Real-time push notifications (FCM)
JSON API (/api/announcements)
HTML sanitization (bleach allow-list)
Rate limiting + CSP hardening
Dark-mode glassmorphism web UI
Technology Stack
Frontend
Tailwind CSS
Utility-first CSS for consistent, responsive styling.
Languages
Python
Language powering the scripts and logic.
Backend & Services
Flask
Python web framework serving the API and pages.
Firebase (FCM)
Real-time push notifications.
Gunicorn
Production WSGI server for the Flask app.
Tooling
BeautifulSoup4
HTML parsing for the Moodle scraper.
bleach
Sanitizes scraped HTML before display.
Architecture
A Flask backend with a background daemon polling Moodle, BeautifulSoup extraction, bleach sanitization, SHA-256 change detection, Firebase Admin SDK for push, served via Gunicorn with a vanilla-JS + Tailwind front-end.
Scraper
Polls Moodle
Backend
Notifications
Client
Challenges & Solutions
Reliable scraping of Moodle HTML and ignoring UI noise; detecting genuinely new posts via SHA-256 hashing to avoid duplicate alerts; sanitizing untrusted HTML safely (bleach allow-list); delivering push notifications through Firebase Cloud Messaging; and hardening a public endpoint with IP rate limiting and Content-Security-Policy headers.
What I Learned
Tying core logic to a single external page structure makes a system fragile — when the page changes, it breaks. That lesson directly motivated the cleaner, more maintainable V2 architecture.
Results & Impact
A working, publicly deployed proof-of-concept (v1.9.9 Beta) that validated the idea and became the foundation for StAffichage V2.
More Projects
LhadjCAD
A polished portfolio-worthy project that demonstrates technical skill, UI organization, and full-stack thinking.
LhadjCAD is a technical web platform designed to help create, manage, and present structured CAD-style content with a clean and efficient workflow.
Base Converter
A sleek, modern, and highly functional base converter built with pure Vanilla JavaScript, HTML, and CSS.
StAffichage V2
Active production platform that replaced the original Moodle Notifier. Live at stbejaia.up.railway.app, with a dedicated install page and an Android APK. Source code kept private.
A mobile-first platform for university schedules, classroom info, and announcements — with search, dark mode, and real-time push notifications.