Superior Erp Automated Marks Entry
A high-performance, dual-interface (Desktop GUI and Web Dashboard) automation suite designed for academic management within the Superior University ERP ecosystem. It provides faculty with a centralize
About the Project
A high-performance, dual-interface (Desktop GUI and Web Dashboard) automation suite designed for academic management within the Superior University ERP ecosystem. It provides faculty with a centralized, secure interface to sync attendance records, fetch active student rosters, verify assessment marks comparisons, and deploy results directly from Excel data matrices to the ERP.
ð Executive Summary
Academic administration often involves repetitive data-entry tasks that are prone to human error and server timeouts. The Superior ERP Automated Command Center solves this by establishing a robust, programmatic integration layer directly with the Superior University ERP.
By utilizing direct HTTP session requests and BeautifulSoup parsing rather than heavy browser automation engines (like Selenium), the suite operates at maximum efficiency. It features:
- A Desktop GUI Application powered by CustomTkinter for faculty who prefer local desktop execution.
- A Responsive Web Application built with Flask, Vanilla CSS, and JS for a modern, browser-based management experience.
- An Asynchronous Worker Pool with thread-safe execution, request retries, and isolation to prevent ERP server bottlenecks.
ðï¸ System Architecture
The project consists of three core components:
ââââââââââââââââââââââââââââââââ
â SuperiorERPAPI â
â (erp_api_client.py) â
ââââââââââââââââ¬ââââââââââââââââ
â
âââââââââââââââââââââââââ´ââââââââââââââââââââââââ
â¼ â¼
ââââââââââââââââââââ ââââââââââââââââââââ
â Desktop GUI â â Web Dashboard â
â (erp_gui.py) â â (erp_web.py) â
ââââââââââââââââââââ ââââââââââ¬ââââââââââ
â
ââââââââââââââââ´âââââââââââââââ
â¼ â¼
âââââââââââââââââââ âââââââââââââââââââ
â HTML Templates â â Static Assets â
â (templates/) â â (css/, js/) â
âââââââââââââââââââ âââââââââââââââââââ
1. Unified API Client (erp_api_client.py)
The backbone of the suite. It maintains authenticated HTTP sessions (requests.Session) and handles all communication with the Superior ERP domain (https://erp.superior.edu.pk):
- Authentication: Secures logins, fetches CSRF tokens, and tracks active session status.
- Metadata Queries: Extracts active sessions/terms, course lists, class-specific assessment structures, and attendance percentages.
- Roster Builder: Compiles student rosters with names, registration numbers, existing marks, and final grades.
- Safe Submission: Executes HTTP posts to commit grade lists, using a thread lock where necessary to ensure safe state transitions.
2. Desktop Interface (erp_gui.py)
A custom desktop application styled with a dark theme, custom fonts (Outfit & Inter), glassmorphism-inspired widgets, and slide-in toast notifications:
- Implements a
ThreadPoolExecutorto execute API requests asynchronously, avoiding main-loop UI freezing. - Offers real-time progress logging directly in a feedback text console.
3. Web Dashboard (erp_web.py + templates/ + static/)
A Flask web application matching the aesthetics of the desktop environment:
- Dashboard Control: Browse active terms, view courses, track attendance metrics, and inspect class sheets.
- Visual Diff Tool: Allows previewing exact grade differences (ERP vs. Excel) before committing the sync.
- Upload Handler: Securely processes Excel uploads and matches columns dynamically.
â¡ Key Features
ð Automated Attendance Sync
The command center parses attendance sheets directly and compares the number of marked lectures against the total. High-visibility progress bars color-code compliance (Emerald for >80%, Amber for >50%, Rose for critical).
ð Global Excel Mapping Matrix
When uploading a grading spreadsheet, the system parses structural metadata:
- Auto-Discovery: Identifies columns representing Mids, Finals, Quizzes, Projects, and Labs by matching text keywords (
task,mid,final, etc.). - Dynamic Dropdowns: Allows manual reassignment or corrections to mapping indices before deployment.
- Sanitization: Standardizes student registration formats (e.g., stripping concatenated names or normalizing casing) to guarantee exact match keys.
ð Intelligent Comparison & Dry-Run
Before committing changes, the web portal generates a detailed comparison:
- Highlights additions, modifications, and matching grades.
- Allows faculty to verify and proceed only when data integrity is fully checked.
ð¡ï¸ Resilient Threading & Retries
The ERP server occasionally drops connections. To handle this, the suite features isolated sessions per worker thread. If a request fails, it attempts a 3-stage retry automatically back-to-back before returning a failure status to the user.
âï¸ Installation & Setup
Prerequisites
- Python 3.10 or higher installed.
Step-by-Step Configuration
-
Clone/Move to the Repository Directory:
cd "E:\zPythonStuff\Superior - ERP Automated" -
Initialize a Virtual Environment:
python -m venv venv -
Activate the Virtual Environment:
# On Windows PowerShell: .\venv\Scripts\activate -
Install Required Packages:
pip install -r requirements.txt
ð Running the Applications
Always ensure your virtual environment is activated before launching either application.
Syntax Check Command
Before running or making modifications, you can quickly compile and check code syntax:
python -m py_compile erp_api_client.py erp_gui.py erp_web.py
Launching the Desktop GUI
To launch the CustomTkinter desktop interface:
python erp_gui.py
Launching the Web Server
To spin up the local Flask web development server:
python erp_web.py
Once running, navigate to http://127.0.0.1:5000 in your web browser.
ð Project Structure
Superior - ERP Automated/
âââ erp_api_client.py # Core ERP API abstraction (requests + BeautifulSoup)
âââ erp_gui.py # CustomTkinter Desktop Client
âââ erp_web.py # Flask Web Dashboard Application
âââ requirements.txt # Project dependencies
âââ AGENTS.md # Instructions for agent-led development syntax checks
âââ data/ # Standardized data and sample grading sheets
âââ uploads/ # Temporary directory for uploaded Excel sheets
âââ static/ # Assets for Flask Web Application
â âââ css/
â â âââ style.css # Dark-theme layout stylesheet
â âââ js/
â âââ main.js # AJAX requests, dropdown actions, and comparison logic
âââ templates/ # Jinja2 HTML Templates
â âââ base.html # Base layout with sidebar and headers
â âââ login.html # Glassmorphic login viewport
â âââ dashboard.html # Roster mapping view and sync consoles
âââ output*/ # Auto-generated script outputs (ignored)
[!NOTE] All Selenium ChromeDriver binaries and script versions (
erp_login.py,Chromedriver/) have been removed from the repository. The tool operates completely under a lightweight requests architecture, removing the need for local web drivers.
Project Timeline
Technologies
External Links
Related Projects
Projects built with similar technologies.
Online Html Editor And Viewer
The Online HTML Editor and Viewer is a simple web application built with Flask that allows users to write and preview HTML code in real-time.
Qrgen
A premium, feature-rich QR Code Generator engineered with Python (Flask) and a pristine Glassmorphism frontend.
Examina Ai
Using AI, It transforms raw study materials into structured, verified examination sets with support for institutional export formats like Moodle XML.