A lightweight, full-stack Flask web application designed for managing college portal interactions. The application features role-based access control (RBAC) for Students, Staff, and Administrators, enabling seamless profile management, announcement publishing, resource sharing, and contact message handling backed by a local SQLite database.
-
Role-Based Access Control (RBAC): Customized dashboards and permissions for
student,staff, andadminroles. -
User Authentication & Management: Secure registration and login workflows powered by Werkzeug password hashing.
-
Resource Sharing & File Management: Upload and download capabilities for notes, academic calendars, and timetables.
-
Announcements & Notice Board: System-wide notice publishing managed by staff and administrators.
-
Profile Management: Independent profile creation and updates for both students and staff.
-
Staff Attendance & Contact Handling: Tools for recording staff attendance and receiving user inquiries via a contact form.
-
Python 3.x: Core backend programming language.
-
Flask (3.x): Micro web framework handling routing, sessions, and request lifecycles.
-
Werkzeug: Utility library utilized for secure password hashing/verification and safe file uploads.
-
SQLite (
portal.db): Serverless, zero-configuration embedded database for persistent local storage.
-
Jinja2: Templating engine for dynamic rendering of HTML pages.
-
Bootstrap 5: Mobile-first CSS framework for responsive layout and pre-built UI components.
-
Custom CSS (
style.css): Supplemental styling tailored to custom UI components.
college-website/
│
├── app.py # Core backend application (routes, DB setup, RBAC logic)
├── requirements.txt # Python package dependencies
├── README.md # Project documentation
├── portal.db # Local SQLite database (created automatically)
│
├── static/
│ └── style.css # Custom stylesheets
│
├── templates/ # Jinja2 HTML templates
│ ├── base.html # Shared layout (Navbar, Footer, Flash messages)
│ ├── index.html # Homepage with previews
│ ├── login.html # Login and registration forms
│ ├── dashboard.html # Role-specific user dashboard
│ ├── contact.html # Contact form page
│ └── admin.html # Admin redirect handler
│
└── uploads/ # Local storage for uploaded documents (auto-generated)
├── notes/ # Lecture notes and study materials
├── calendars/ # Academic calendar documents
└── timetables/ # Class and exam schedules
```[cite: 1]
---
## Step-by-Step Installation & Setup Guide
Follow these steps to set up and run the project locally on your machine[cite: 1].
### Step 1: Prerequisites
Ensure you have **Python 3.8+** installed on your operating system. You can verify your installation by running:
```bash
python --version
Navigate to your desired workspace folder and clone or extract the project:
git clone https://github.com/StudentCoderr/college-website-.git
cd college-website-
Isolate project dependencies by setting up a Python virtual environment:
- On Windows (PowerShell):
python -m venv venv
.\venv\Scripts\Activate.ps1- On macOS / Linux:
python3 -m venv venv
source venv/bin/activate
Upgrade pip and install all necessary Python libraries specified in requirements.txt:
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
When starting the application for the first time, app.py automatically initializes the portal.db SQLite database with the required tables and populates default test accounts:
-
Database Tables Created:
users,student_profiles,staff_profiles,announcements,resources,staff_attendance,contact_messages,exam_schedules,courses. -
Default Test Accounts:
-
Admin: Username:
admin| Password:admin123 -
Staff: Username:
staff| Password:staff123 -
Student: Username:
student| Password:student123
- Execute the main application file:
python app.py
- Open your web browser and navigate to:
http://localhost:8000/
- The server will launch in Debug Mode on port
8000.
| Feature / Action | Student | Staff | Admin |
|---|---|---|---|
| View Announcements & Resources | Yes | Yes | Yes |
| Submit Contact Messages | Yes | Yes | Yes |
| Manage Own Profile | Yes | Yes | — |
| Upload Resources (Notes/Calendars) | — | Yes | — |
| Publish System Announcements | — | Yes | Yes |
| Record Staff Attendance | — | Yes | — |
| Create & Delete User Accounts | — | — | Yes |
| Delete Announcements & Resources | — | — | Yes |
-
GET /— Homepage presenting announcements and resource previews. -
GET, POST /login/<role>— Role-specific user authentication. -
GET, POST /register/<role>— Registration page for students and staff. -
GET, POST /contact— Public inquiry form. -
GET /logout— Session termination.
-
GET /dashboard— Main control panel customized per logged-in user role. -
POST /dashboard/student-profile— Create or update student profile details. -
POST /dashboard/staff-profile— Create or update staff profile details. -
POST /dashboard/staff-attendance— Submit staff attendance records. -
POST /dashboard/notice— Create and publish portal notices. -
POST /dashboard/upload/<kind>— Upload resources (notes,calendars, ortimetables). -
GET /download/<path>— Secure document downloading. -
POST /dashboard/create-user— Admin endpoint to create user accounts. -
POST /dashboard/user/<id>/delete— Admin endpoint to delete user accounts.
-
Modular Refactoring: Restructure
app.pyinto Flask Blueprints for improved scalability. -
Database Migrations: Integrate
Flask-Migrate/Alembicfor database schema management. -
Enhanced Security: Implement CSRF protection, HTTPS redirect, and advanced input validation.
-
Unit & Integration Testing: Introduce
pytestsuites to automate test coverage.
The College Portal Web Application provides a reliable, centralized, and lightweight administrative system for institutional operations. By combining Role-Based Access Control (RBAC), secure Werkzeug authentication, dynamic notice broadcasting, and document sharing, the platform streamlines digital workflows across Students, Staff, and Administrators. Built on a clean Flask architecture with SQLite and a responsive Bootstrap UI, it serves as an efficient and extensible framework for modern academic portal management.
Developed and maintained by Poornashree J P (StudentCoderr).
- GitHub Profile: StudentCoderr
- Repository: college-website-
- Live Demo: college-website-poorna4.vercel.app
- Email: `ammupoorna14@gmail.com'
Feel free to reach out, submit an issue, or open a pull request for feedback and suggestions.