EduPortal is a student portal + admin panel built with Flask and SQLite.
It includes a student-facing portal (dashboard/news/schedules/exams/library/profile) and an admin dashboard (students, news, schedules, exam forms, admit card windows, teachers, etc.).
This repository is designed to be easy to run locally and includes a script to generate a full dummy database for end-to-end testing.
- Backend: Python + Flask
- Database: SQLite (
eduportal.db) - Server (optional production-style): Waitress (
wsgi.py) - Frontend: Jinja2 templates + Tailwind (CDN) + Iconify
- UX: GitHub-style navigation progress bar for smooth transitions
- Python 3.10+ recommended
Install dependencies:
pip install -r requirements.txtrequirements.txt:
- Flask
- waitress
- Install dependencies
pip install -r requirements.txt- Run the app
python app.py- Open in browser
- Student portal:
http://127.0.0.1:5000/ - Admin portal:
http://127.0.0.1:5000/admin
python wsgi.pyDefaults:
HOST=0.0.0.0PORT=8000
SECRET_KEY- Flask session secret.
- If not set, defaults to a dev key.
HOST- Dev default:
127.0.0.1 - Waitress default:
0.0.0.0
- Dev default:
PORT- Dev default:
5000 - Waitress default:
8000
- Dev default:
DEBUG/FLASK_DEBUG- Set to
1ortrueto enable debug.
- Set to
By default the app uses:
eduportal.db(next toapp.py)
The DB is created automatically at runtime.
The DB schema is maintained in:
app.py→init_db()
init_db():
- creates tables (if missing)
- applies small schema migrations (adds columns if required)
- inserts baseline demo rows if the database is empty
To test the entire project with realistic data, generate a full dummy DB using:
python seed_dummy_db.py --forceWhat it does:
- recreates
eduportal.db - runs
init_db()to create schema - inserts multiple dummy rows across major tables (students, schedules, timetable, library, exams, etc.)
Flags:
--force: overwrite existing DB--db <path>: generate DB to a custom path
Example:
python seed_dummy_db.py --db demo.db --force- URL:
/admin - Username:
admin - Password:
admin123
Seeded students exist in the DB (created by init_db() / seed_dummy_db.py).
- Password:
student123 - Example roll numbers:
CS-2024-042CS-2024-043CS-2024-044CS-2024-045
- Dashboard
- overview widgets
- attendance heatmap
- news highlights
- News
- DB-backed feed
- priority-based items
- advanced filters (priority, type, sender, tags, date range)
- Schedules
- personalized weekly timetable based on the student’s
schedule_id - global monthly events & holidays (
calendar_items) - calendar view
- personalized weekly timetable based on the student’s
- Exams
- semester results view
- admit card view
- exam form availability + application links (if open)
- Library
- resources list with search and filters
- PDF resources via:
- external URL
- uploaded file under
static/uploads/
- Profile
- student details + profile data
- Navigation UX
- GitHub-style progress bar on page transitions
- Smooth animations and responsive design
- Dashboard: counts + quick overview
- Students: view / edit / delete student records (includes cleanup of related rows and uploaded vault files)
- News: create / edit / delete posts
- advanced search and filtering
- improved header alignment and UI
- Schedules:
- manage global monthly events/holidays
- manage weekly timetable per schedule group
- Exam Forms:
- open/close windows
- delete forms
- manage admit card openings
- Teachers: add / delete teachers
schedule_groupstable defines schedule groups (e.g., B.Tech CSE Sem-4 Section A).- Each student row has
students.schedule_id. - Weekly timetable rows are stored in
weekly_timetableand linked byschedule_id.
During registration, a student selects their Weekly Schedule (schedule group). The portal then shows the timetable for that schedule group.
- Uploads are saved to:
static/uploads/
The DB stores library_resources.pdf_url as either:
- External URL (starts with
http:///https://), or - Local relative path such as
uploads/<file>.pdf(served via/static/uploads/...)
README.md– Project overview, setup, and feature listrequirements.txt– Python dependencies.env.example– Environment variable templateapp.py– Main Flask application (routes, DB schema, auth)wsgi.py– Production server entry (Waitress)seed_dummy_db.py– Dummy data generator for testing
templates/base.html– Base layout for student portal (includes Iconify, Tailwind)templates/admin_base.html– Base layout for admin paneltemplates/*.html– Page templates (dashboard, news, schedules, library, vault, exams, profile, admin pages)
static/app.js– Shared client-side interactionsstatic/app_icon/logo.png– Logo used in UIstatic/uploads/– Runtime uploads (news attachments, library PDFs) – do not commituploads/vault/– Student vault files – do not commit
eduportal.db– SQLite database (auto-created) – do not commit
- All source files (
*.py,templates/,static/except runtime uploads) README.md,requirements.txt,.env.example- Documentation files (if any)
static/app_icon/logo.pngand other static assets- Any custom CSS/JS under
static/that are part of the app
*.db(SQLite databases)uploads/andstatic/uploads/(user uploads).env(environment secrets)__pycache__/,*.pyc- IDE/editor files (
.vscode/,.idea/, etc.) - OS-generated files (
.DS_Store,Thumbs.db) - Temporary files and logs
- Use
seed_dummy_db.py --forceto generate a fresh demo DB after cloning. - Never commit real user data or production databases.
app.py- Flask routes
- DB schema + migrations (
init_db())
wsgi.py- Waitress entrypoint
- calls
init_db()on startup
seed_dummy_db.py- generates a fresh demo DB for complete testing
templates/- Jinja templates for student + admin UIs
static/- static assets
There is a root index.html in this repo that can be treated as a legacy/static prototype.
The Flask app uses templates/ for rendering pages and does not serve the root index.html as an application route.
- Stop all running instances of the app.
- Ensure the DB file isn’t opened by another process.
If you want a clean reset:
python seed_dummy_db.py --force- Check the file exists under
static/uploads/ - Verify the DB value is either:
- a full external URL, or
- a relative path
uploads/<file>.pdf
- Local DB files
*.dbare ignored - User uploads under
static/uploads/are ignored
If you want to distribute a demo DB, use seed_dummy_db.py rather than committing a .db file.