A seamless, real-time announcement platform for students of the ST Faculty (Univ Bejaïa).
An independent student-led initiative to modernize university communications.
ST Affichage is a highly optimized, automated scraper and web application designed to bridge the gap between the university's Moodle e-learning platform and student accessibility.
Instead of forcing students to repeatedly log into a clunky web interface, this application autonomously monitors the university's announcement board in the background, extracts vital information (text, PDFs, images), and delivers it via a beautiful, native-feeling mobile interface with real-time push notifications.
- 🔄 Autonomous Scraping Engine: Runs a continuous background thread that polls the Moodle HTML, intelligently extracting and cleaning data, links, and images while ignoring system UI junk.
- 🔔 Push Notifications: Integrated with Firebase Cloud Messaging (FCM). When a new announcement is detected, a high-priority alert is instantly broadcasted to all users.
- 📱 Premium Glassmorphism UI: A sleek, dark-mode-exclusive interface built with Tailwind CSS, featuring heavy background blurs (
backdrop-filter), smooth hardware-accelerated animations, and modern typography (Inter & Syne). - 🔗 Hybrid Share System: Uses the native Web Share API on browsers, and automatically falls back to an intelligent Custom Share Sheet with deep-linking (
tg://,whatsapp://) when running inside the Android APK WebView. - 🛡️ Hardening Measures: IP rate limiting (
Flask-Limiter) and security headers (X-Frame-Options,X-Content-Type-Options,Strict-Transport-Security); announcement HTML is sanitized withbleachbefore display.
Backend Architecture
- Python 3 (Core Logic)
- Flask (API & Routing)
- BeautifulSoup4 & Bleach (HTML Parsing & Sanitization)
- Firebase Admin SDK (Push Notifications)
- Gunicorn (Production WSGI Server)
Frontend Architecture
- HTML5 / Vanilla JavaScript (Zero heavy frameworks, blazing fast)
- Tailwind CSS (Utility-first styling)
- Google Fonts (Syne for headings, Inter for readability)
- Background Polling: Every 10 minutes, a daemon thread fetches the target Moodle URL.
- Parsing & Hashing: Beautiful Soup extracts
li.activitynodes. The raw text is hashed via SHA-256 to create a unique ID. - Sanitization:
bleachsafely strips malicious or broken HTML tags, preserving only safe formatting (<b>,<i>,<br>). - State Comparison: If a new SHA-256 hash is detected that wasn't in the previous cycle, the app triggers the
send_fcm_notificationfunction. - Client Fetch: The frontend dynamically fetches the
/api/announcementsendpoint and paints the UI using pure JavaScript DOM manipulation.
If you wish to run this project locally for development or testing:
git clone https://github.com/linuxcoding-ADAM/moodle-notifier.git
cd moodle-notifierpython -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activatepip install -r requirements.txtCreate a .env file (or set them in your hosting platform) with your Firebase Service Account JSON credentials and Moodle account:
FIREBASE_CREDENTIALS={"type": "service_account", "project_id": "...", ...}
MOODLE_USERNAME=your_moodle_username
MOODLE_PASSWORD=your_moodle_password
ADMIN_PASSWORD=your_secure_password
PORT=5000python app.pyThe app will be available at http://localhost:5000.
Returns the latest scraped announcements for a department (e.g. technologie, hydraulique, genie-civil, genie-mecanique, electrotechnique, ate) in JSON format, sorted by timestamp (newest first).
Response (Example):
[
{
"id": "e4d909c290d0fb1c",
"title": "Avis aux étudiants des groupes H8, D6",
"body": "Interrogation N° 02 du module de chimie 02...",
"date": "16 Avril 2026",
"timestamp": 1776340800.0,
"images": ["https://elearning.univ-bejaia.dz/.../image.png"],
"links": ["https://elearning.univ-bejaia.dz/.../document.pdf"],
"source": "https://elearning.univ-bejaia.dz/course/view.php?id=19989#module-12345"
}
]Designed, developed, and maintained independently by Adam Mila.
This application is an independent initiative to help students and is not officially affiliated with the administration of Université de Bejaïa.
For bug reports, feature requests, or collaboration, please reach out via Instagram or Email.
Built with ❤️ for the students.